@@ -1108,12 +1108,14 module ApplicationHelper | |||
|
1108 | 1108 | pcts = pcts.collect(&:round) |
|
1109 | 1109 | pcts[1] = pcts[1] - pcts[0] |
|
1110 | 1110 | pcts << (100 - pcts[1] - pcts[0]) |
|
1111 | titles = options[:titles].to_a | |
|
1112 | titles[0] = "#{pcts[0]}%" if titles[0].blank? | |
|
1111 | 1113 | legend = options[:legend] || '' |
|
1112 | 1114 | content_tag('table', |
|
1113 | 1115 | content_tag('tr', |
|
1114 | (pcts[0] > 0 ? content_tag('td', '', :style => "width: #{pcts[0]}%;", :class => 'closed') : ''.html_safe) + | |
|
1115 | (pcts[1] > 0 ? content_tag('td', '', :style => "width: #{pcts[1]}%;", :class => 'done') : ''.html_safe) + | |
|
1116 | (pcts[2] > 0 ? content_tag('td', '', :style => "width: #{pcts[2]}%;", :class => 'todo') : ''.html_safe) | |
|
1116 | (pcts[0] > 0 ? content_tag('td', '', :style => "width: #{pcts[0]}%;", :class => 'closed', :title => titles[0]) : ''.html_safe) + | |
|
1117 | (pcts[1] > 0 ? content_tag('td', '', :style => "width: #{pcts[1]}%;", :class => 'done', :title => titles[1]) : ''.html_safe) + | |
|
1118 | (pcts[2] > 0 ? content_tag('td', '', :style => "width: #{pcts[2]}%;", :class => 'todo', :title => titles[2]) : ''.html_safe) | |
|
1117 | 1119 | ), :class => "progress progress-#{pcts[0]}").html_safe + |
|
1118 | 1120 | content_tag('p', legend, :class => 'percent').html_safe |
|
1119 | 1121 | end |
@@ -16,6 +16,9 | |||
|
16 | 16 | |
|
17 | 17 | <% if version.issues_count > 0 %> |
|
18 | 18 | <%= progress_bar([version.closed_percent, version.completed_percent], |
|
19 | :titles => | |
|
20 | ["%s: %0.0f%" % [l(:label_closed_issues_plural), version.closed_percent], | |
|
21 | "%s: %0.0f%" % [l(:field_done_ratio), version.completed_percent]], | |
|
19 | 22 | :legend => ('%0.0f%' % version.completed_percent)) %> |
|
20 | 23 | <p class="progress-info"> |
|
21 | 24 | <%= link_to(l(:label_x_issues, :count => version.issues_count), |
General Comments 0
You need to be logged in to leave comments.
Login now