diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-11-08 12:28:23 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-11-08 12:28:23 +0000 |
commit | ecb1f660ac4d8bb46e2d1b34f89a4638297cd1e4 (patch) | |
tree | cf562ed0f402d662985fc1c3cf0b50b4e514f06f /app/helpers | |
parent | e51adfdb3f2988d3a92d34f088f155871f82a870 (diff) | |
download | redmine-ecb1f660ac4d8bb46e2d1b34f89a4638297cd1e4.tar.gz redmine-ecb1f660ac4d8bb46e2d1b34f89a4638297cd1e4.zip |
Improved responsiveness for versions and roadmap (#19097).
Width of progress bars is no longer hard-coded in views.
git-svn-id: http://svn.redmine.org/redmine/trunk@14851 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-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 |
3 files changed, 3 insertions, 4 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, |