Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

[58261] Version info shows html tag (#16900)

Henriette Darge4572465d7aaa
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index fbeabfd68b2..07903434389 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -172,12 +172,6 @@ module ApplicationHelper
end.join.html_safe
end
- def html_hours(text)
- html_safe_gsub(text,
- %r{(\d+)\.(\d+)},
- '<span class="hours hours-int">\1</span><span class="hours hours-dec">.\2</span>')
- end
-
def html_safe_gsub(string, *gsub_args, &)
html_safe = string.html_safe?
result = string.gsub(*gsub_args, &)
diff --git a/app/views/versions/show.html.erb b/app/views/versions/show.html.erb
index b1c43a297ac..63198f80c00 100644
--- a/app/views/versions/show.html.erb
+++ b/app/views/versions/show.html.erb
@@ -73,12 +73,12 @@ See COPYRIGHT and LICENSE files for more details.
<table>
<tr>
<td width="130px" align="right"><%= Version.human_attribute_name(:estimated_hours) %></td>
- <td width="240px" class="total-hours" align="right"><%= html_hours(l_hours(@version.estimated_hours)) %></td>
+ <td width="240px" class="total-hours" align="right"><%= l_hours(@version.estimated_hours) %></td>
</tr>
<% if User.current.allowed_in_project?(:view_time_entries, @project) %>
<tr>
<td width="130px" align="right"><%= t(:label_spent_time) %></td>
- <td width="240px" class="total-hours" align="right"><%= html_hours(l_hours(@version.spent_hours)) %></td>
+ <td width="240px" class="total-hours" align="right"><%= l_hours(@version.spent_hours) %></td>
</tr>
<% end %>
</table>
diff --git a/frontend/src/global_styles/content/_tables.sass b/frontend/src/global_styles/content/_tables.sass
index fc1f477de2b..18725c164da 100644
--- a/frontend/src/global_styles/content/_tables.sass
+++ b/frontend/src/global_styles/content/_tables.sass
@@ -55,8 +55,6 @@ table
font-style: normal
font-weight: var(--base-text-weight-bold)
background-color: #EEEEEE
- .hours-dec
- font-size: 0.9em
#workflow_form
.generic-table--results-container
@@ -144,8 +142,6 @@ tr
td
&.hours
font-weight: var(--base-text-weight-bold)
- .hours-dec
- font-size: 0.9em
.date
.spot-drop-modal
display: block