Project

General

Profile

Actions

Defect #35545

closed

Fix css class assignment in issue custom field rendering in show view

Defect #35545: Fix css class assignment in issue custom field rendering in show view

Added by Liane Hampe over 5 years ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
-
Resolution:
Fixed
Affected version:

Description

Rendering the issue custom fields in the show view is done by the
class IssueFieldsRow, which can be found in issues_helper.rb.

The method IssueFieldRow#to_html has an error because the
class 'splitcontentright' will never be assigned.

This patch fixes this error by modifying the class in the respective
content_tag of the helper method. Thus, it is a one liner.


Files

fix_issue_custom_field_rendering.patch (559 Bytes) fix_issue_custom_field_rendering.patch Patches css class assignment Liane Hampe, 2021-07-08 17:23
35545-layout-issue.png (164 KB) 35545-layout-issue.png Go MAEDA, 2021-07-13 23:56
35545-layout-issue-flex-css.png (73.4 KB) 35545-layout-issue-flex-css.png Liane Hampe, 2021-07-14 09:35
fix_issue_custom_field_css.patch (722 Bytes) fix_issue_custom_field_css.patch Liane Hampe, 2021-07-14 10:30

Related issues 1 (0 open — 1 closed)

Related to Redmine - Defect #43588: Right column in issue view uses splitcontentleft CSS class instead of splitcontentrightClosedGo MAEDAActions

Updated by Liane Hampe over 5 years ago Actions #1

This is the content of the patch file:

diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb
index 756d7ed4c..d43a7db8b 100755
--- a/app/helpers/issues_helper.rb
+++ b/app/helpers/issues_helper.rb
@@ -332,7 +332,7 @@ module IssuesHelper
     def to_html
       content =
         content_tag('div', @left.reduce(&:+), :class => 'splitcontentleft') +
-        content_tag('div', @right.reduce(&:+), :class => 'splitcontentleft')
+        content_tag('div', @right.reduce(&:+), :class => 'splitcontentright')

       content_tag('div', content, :class => 'splitcontent')
     end

Updated by Go MAEDA over 5 years ago Actions #2

The suggested change causes a layout issue. See the screenshot below.

Updated by Liane Hampe over 5 years ago Actions #3

Hi Go MAEDA,

Thank you for this important information.

I have fixed it with some more css:

Old styles:
.splitcontent {overflow: auto; display: flex; flex-wrap: wrap}
.splitcontentleft {flex: 1; margin-right: 5px;}
.splitcontentright {flex: 1; margin-left: 5px;}

New styles:
.splitcontent {overflow: auto; display: flex; flex-wrap: wrap;justify-content: space-between}
.splitcontentleft, .splitcontentright {width: 49.5%}

This is how it looks like now:

It also looks nice on the project overview page where the same css classes are used.

Best Regards
Liane

Updated by Liane Hampe over 5 years ago Actions #4

Here is the patch file for the css changes.

Updated by Go MAEDA 5 months ago Actions #5

  • Related to Defect #43588: Right column in issue view uses splitcontentleft CSS class instead of splitcontentright added

Updated by Go MAEDA 5 months ago Actions #6

  • Status changed from New to Closed
  • Resolution set to Fixed

This issue was fixed in r24224.

Actions

Also available in: PDF Atom