From cb0866f31307680aad80a96d0a9d9962ac193f03 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 8 Nov 2015 11:50:36 +0000 Subject: 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 --- app/helpers/issues_helper.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'app/helpers') 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 -- cgit v1.2.3