Patch #21497 » tool-tip-on-progress-bar.diff
| app/helpers/application_helper.rb (working copy) | ||
|---|---|---|
|
pcts = pcts.collect(&:round)
|
||
|
pcts[1] = pcts[1] - pcts[0]
|
||
|
pcts << (100 - pcts[1] - pcts[0])
|
||
|
titles = options[:titles].to_a
|
||
|
titles[0] = "#{pcts[0]}%" if titles[0].blank?
|
||
|
legend = options[:legend] || ''
|
||
|
content_tag('table',
|
||
|
content_tag('tr',
|
||
|
(pcts[0] > 0 ? content_tag('td', '', :style => "width: #{pcts[0]}%;", :class => 'closed') : ''.html_safe) +
|
||
|
(pcts[1] > 0 ? content_tag('td', '', :style => "width: #{pcts[1]}%;", :class => 'done') : ''.html_safe) +
|
||
|
(pcts[2] > 0 ? content_tag('td', '', :style => "width: #{pcts[2]}%;", :class => 'todo') : ''.html_safe)
|
||
|
(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)
|
||
|
), :class => "progress progress-#{pcts[0]}").html_safe +
|
||
|
content_tag('p', legend, :class => 'percent').html_safe
|
||
|
end
|
||
| app/views/versions/_overview.html.erb (working copy) | ||
|---|---|---|
|
<% if version.issues_count > 0 %>
|
||
|
<%= progress_bar([version.closed_percent, version.completed_percent],
|
||
|
:titles =>
|
||
|
["%s: %0.0f%" % [l(:label_closed_issues_plural), version.closed_percent],
|
||
|
"%s: %0.0f%" % [l(:label_done_ratio), version.completed_percent]],
|
||
|
:legend => ('%0.0f%' % version.completed_percent)) %>
|
||
|
<p class="progress-info">
|
||
|
<%= link_to(l(:label_x_issues, :count => version.issues_count),
|
||
| config/locales/en.yml (working copy) | ||
|---|---|---|
|
label_create_missing_values: Create missing values
|
||
|
label_api: API
|
||
|
label_field_format_enumeration: Key/value list
|
||
|
label_done_ratio: "Done ratio"
|
||
|
button_login: Login
|
||
|
button_submit: Submit
|
||