diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-11-08 11:50:36 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-11-08 11:50:36 +0000 |
commit | cb0866f31307680aad80a96d0a9d9962ac193f03 (patch) | |
tree | 21243e698024a6f7fea2e1e3f1b063da57a1428f /app | |
parent | 161558e9d0d6f11bfbaedf71e282263077dc8577 (diff) | |
download | redmine-cb0866f31307680aad80a96d0a9d9962ac193f03.tar.gz redmine-cb0866f31307680aad80a96d0a9d9962ac193f03.zip |
Render issue attributes using divs instead of a table for responsiveness (#19097).
git-svn-id: http://svn.redmine.org/redmine/trunk@14848 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/issues_helper.rb | 18 | ||||
-rw-r--r-- | app/views/issues/show.html.erb | 4 |
2 files changed, 11 insertions, 11 deletions
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 9288db5ab..495dcef9e 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -189,18 +189,18 @@ module IssuesHelper end def to_html - html = ''.html_safe - blank = content_tag('th', '') + content_tag('td', '') - size.times do |i| - left = @left[i] || blank - right = @right[i] || blank - html << content_tag('tr', left + right) - end - html + content = + content_tag('div', @left.reduce(&:+), :class => 'splitcontentleft') + + content_tag('div', @right.reduce(&:+), :class => 'splitcontentleft') + + content_tag('div', content, :class => 'splitcontent') end def cells(label, text, options={}) - content_tag('th', label + ":", options) + content_tag('td', text, options) + options[:class] = [options[:class] || "", 'attribute'].join(' ') + content_tag 'div', + content_tag('div', label + ":", :class => 'label') + content_tag('div', text, :class => 'value'), + options end end diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 4c60587d2..b6b9ad4c1 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -33,7 +33,7 @@ <% end %> </p> -<table class="attributes"> +<div class="attributes"> <%= issue_fields_rows do |rows| rows.left l(:field_status), @issue.status.name, :class => 'status' rows.left l(:field_priority), @issue.priority.name, :class => 'priority' @@ -70,7 +70,7 @@ end %> <%= render_custom_fields_rows(@issue) %> <%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %> -</table> +</div> <% if @issue.description? || @issue.attachments.any? -%> <hr /> |