Browse Source

code layout clean up ApplicationHelper#progress_bar

git-svn-id: http://svn.redmine.org/redmine/trunk@18906 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/4.1.0
Toshi MARUYAMA 4 years ago
parent
commit
b4d8ea2bd6
1 changed files with 18 additions and 3 deletions
  1. 18
    3
      app/helpers/application_helper.rb

+ 18
- 3
app/helpers/application_helper.rb 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

Loading…
Cancel
Save