diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/application_helper.rb | 3 | ||||
-rw-r--r-- | app/helpers/issues_helper.rb | 2 | ||||
-rw-r--r-- | app/helpers/queries_helper.rb | 2 | ||||
-rw-r--r-- | app/views/issues/show.html.erb | 2 | ||||
-rw-r--r-- | app/views/versions/_issue_counts.html.erb | 3 | ||||
-rw-r--r-- | app/views/versions/_overview.html.erb | 4 |
6 files changed, 8 insertions, 8 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 0d15f2cd4..f152e217b 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1108,14 +1108,13 @@ module ApplicationHelper pcts = pcts.collect(&:round) pcts[1] = pcts[1] - pcts[0] pcts << (100 - pcts[1] - pcts[0]) - width = options[:width] || '100px;' 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) - ), :class => "progress progress-#{pcts[0]}", :style => "width: #{width};").html_safe + + ), :class => "progress progress-#{pcts[0]}").html_safe + content_tag('p', legend, :class => 'percent').html_safe end diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 495dcef9e..497bea380 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -114,7 +114,7 @@ module IssuesHelper content_tag('td', link_to_issue(child, :project => (issue.project_id != child.project_id)), :class => 'subject', :style => 'width: 50%') + content_tag('td', h(child.status)) + content_tag('td', link_to_user(child.assigned_to)) + - content_tag('td', progress_bar(child.done_ratio, :width => '80px')), + content_tag('td', progress_bar(child.done_ratio)), :class => css) end s << '</table></form>' diff --git a/app/helpers/queries_helper.rb b/app/helpers/queries_helper.rb index 865b950f8..9ad2540e4 100644 --- a/app/helpers/queries_helper.rb +++ b/app/helpers/queries_helper.rb @@ -145,7 +145,7 @@ module QueriesHelper when :description issue.description? ? content_tag('div', textilizable(issue, :description), :class => "wiki") : '' when :done_ratio - progress_bar(value, :width => '80px') + progress_bar(value) when :relations content_tag('span', value.to_s(issue) {|other| link_to_issue(other, :subject => false, :tracker => false)}.html_safe, diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index b6b9ad4c1..70a7fe165 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -55,7 +55,7 @@ rows.right l(:field_due_date), format_date(@issue.due_date), :class => 'due-date' end unless @issue.disabled_core_fields.include?('done_ratio') - rows.right l(:field_done_ratio), progress_bar(@issue.done_ratio, :width => '80px', :legend => "#{@issue.done_ratio}%"), :class => 'progress' + rows.right l(:field_done_ratio), progress_bar(@issue.done_ratio, :legend => "#{@issue.done_ratio}%"), :class => 'progress' end unless @issue.disabled_core_fields.include?('estimated_hours') if @issue.estimated_hours.present? || @issue.total_estimated_hours.to_f > 0 diff --git a/app/views/versions/_issue_counts.html.erb b/app/views/versions/_issue_counts.html.erb index 7d9652250..398b2d31f 100644 --- a/app/views/versions/_issue_counts.html.erb +++ b/app/views/versions/_issue_counts.html.erb @@ -22,8 +22,7 @@ </td> <td style="width:240px;"> <%= progress_bar((count[:closed].to_f / count[:total])*100, - :legend => "#{count[:closed]}/#{count[:total]}", - :width => "#{(count[:total].to_f / max * 200).floor}px;") %> + :legend => "#{count[:closed]}/#{count[:total]}") %> </td> </tr> <% end %> diff --git a/app/views/versions/_overview.html.erb b/app/views/versions/_overview.html.erb index c3d359bb9..bb8c50c35 100644 --- a/app/views/versions/_overview.html.erb +++ b/app/views/versions/_overview.html.erb @@ -1,3 +1,4 @@ +<div class="version-overview"> <% if version.completed? %> <p><%= format_date(version.effective_date) %></p> <% elsif version.effective_date %> @@ -15,7 +16,7 @@ <% if version.issues_count > 0 %> <%= progress_bar([version.closed_percent, version.completed_percent], - :width => '40em', :legend => ('%0.0f%' % version.completed_percent)) %> + :legend => ('%0.0f%' % version.completed_percent)) %> <p class="progress-info"> <%= link_to(l(:label_x_issues, :count => version.issues_count), version_filtered_issues_path(version, :status_id => '*')) %> @@ -31,3 +32,4 @@ <% else %> <p class="progress-info"><%= l(:label_roadmap_no_issues) %></p> <% end %> +</div> |