1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-29 03:39:38 +00:00

code layout clean up ApplicationHelper#progress_bar

git-svn-id: http://svn.redmine.org/redmine/trunk@18906 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2019-11-05 14:08:57 +00:00
parent 2d0be791b6
commit b4d8ea2bd6

View File

@ -1457,9 +1457,24 @@ module ApplicationHelper
'table',
content_tag(
'tr',
(pcts[0] > 0 ? content_tag('td', '', :style => "width: #{pcts[0]}%;", :class => 'closed', :title => titles[0]) : ''.html_safe) +
(pcts[1] > 0 ? content_tag('td', '', :style => "width: #{pcts[1]}%;", :class => 'done', :title => titles[1]) : ''.html_safe) +
(pcts[2] > 0 ? content_tag('td', '', :style => "width: #{pcts[2]}%;", :class => 'todo', :title => titles[2]) : ''.html_safe)
(if pcts[0] > 0
content_tag('td', '', :style => "width: #{pcts[0]}%;",
:class => 'closed', :title => titles[0])
else
''.html_safe
end) +
(if pcts[1] > 0
content_tag('td', '', :style => "width: #{pcts[1]}%;",
:class => 'done', :title => titles[1])
else
''.html_safe
end) +
(if pcts[2] > 0
content_tag('td', '', :style => "width: #{pcts[2]}%;",
:class => 'todo', :title => titles[2])
else
''.html_safe
end)
), :class => "progress progress-#{pcts[0]}").html_safe +
content_tag('p', legend, :class => 'percent').html_safe
end