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/helpers | |
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/helpers')
-rw-r--r-- | app/helpers/issues_helper.rb | 18 |
1 files changed, 9 insertions, 9 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 |