diff --git a/app/assets/stylesheets/responsive.css b/app/assets/stylesheets/responsive.css index b3e8bddd8..9b88df47a 100644 --- a/app/assets/stylesheets/responsive.css +++ b/app/assets/stylesheets/responsive.css @@ -764,39 +764,44 @@ text-align: left; } - /* subtasks and related issues list on issue show */ - #issue_tree .issues, #relations .issues { + /* subtasks and related issues list on issue show (without headers) */ + #issue_tree table:not(.with-headers) .issues, + #relations table:not(.with-headers) .issues { border-collapse: separate; border-spacing: 0 1em; /* vertical space between tasks */ } - #issue_tree .issue > td:not(.checkbox), #relations .issue > td:not(.checkbox) { + #issue_tree table:not(.with-headers) .issue > td:not(.checkbox), + #relations table:not(.with-headers) .issue > td:not(.checkbox) { display: block; float: left; text-align: left; padding-right: 5px; } - #issue_tree .issue > td.subject, #relations .issue > td.subject { + #issue_tree table:not(.with-headers) .issue > td.subject, + #relations table:not(.with-headers) .issue > td.subject { width: 100%; /* let subject have one full width column */ } - #issue_tree .issue:has(.buttons a) > td.subject, #relations .issue:has(.buttons a) > td.subject { + #issue_tree table:not(.with-headers) .issue:has(.buttons a) > td.subject, + #relations table:not(.with-headers) .issue:has(.buttons a) > td.subject { padding-right: 40px; } - #issue_tree .issue > td:not(.subject), #relations .issue > td:not(.subject) { + #issue_tree table:not(.with-headers) .issue > td:not(.subject), + #relations table:not(.with-headers) .issue > td:not(.subject) { width: 20%; /* three columns for all cells that are not subject */ } - #issue_tree .issues, #issue_tree .issue, - #relations .issues, #relations .issue { + #issue_tree table:not(.with-headers) .issues, #issue_tree .issue, + #relations table:not(.with-headers) .issues, #relations .issue { position: relative; /* needed for .buttons positioning */ } /* positioniong of unline button */ - #issue_tree .issue > td.buttons, - #relations .issue > td.buttons { + #issue_tree table:not(.with-headers) .issue > td.buttons, + #relations table:not(.with-headers) .issue > td.buttons { text-align: right; position: absolute; right: 0; @@ -804,11 +809,22 @@ padding-right: 0; } - #issue_tree .issue .buttons a, - #relations .issue .buttons a { + #issue_tree table:not(.with-headers) .issue .buttons a, + #relations table:not(.with-headers) .issue .buttons a { vertical-align: middle; } + /* subtasks and related issues list on issue show (with headers) */ + #issue_tree .subtasks-wrapper:has(table.with-headers), + #relations .relation-issues-wrapper:has(table.with-headers) { + overflow-x: scroll; + } + + #issue_tree table.with-headers .issue > td.subject, + #relations table.with-headers .issue > td.subject { + min-width: 15rem; + } + /* attachment upload form */ .attachments_fields span { position: relative; diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index ce3607a5d..28949e304 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -105,7 +105,10 @@ module IssuesHelper columns_list = get_related_issues_columns_for_project(issue) manage_relations = User.current.allowed_to?(:manage_subtasks, issue.project) - s = +'' + + table_classes = 'list issues odd-even' + table_classes += ' with-headers' if Setting.display_related_issues_table_headers? + s = "
" if Setting.display_related_issues_table_headers? headers = [l(:field_subject)] @@ -251,7 +254,10 @@ module IssuesHelper row_content << content_tag('td', buttons, class: 'buttons') s << content_tag('tr', row_content, id: "relation-#{relation.id}", class: css) end - content_tag('table', s, :class => 'list issues odd-even') + + table_classes = 'list issues odd-even' + table_classes += ' with-headers' if Setting.display_related_issues_table_headers? + content_tag('table', s, :class => table_classes) end def issue_estimated_hours_details(issue) diff --git a/app/views/issues/_relations.html.erb b/app/views/issues/_relations.html.erb index 902292a7f..07b633e43 100644 --- a/app/views/issues/_relations.html.erb +++ b/app/views/issues/_relations.html.erb @@ -11,7 +11,9 @@ <% if @relations.present? %> <%= form_tag({}, :data => {:cm_url => issues_context_menu_path}) do %> - <%= render_issue_relations(@issue, @relations) %> +
+ <%= render_issue_relations(@issue, @relations) %> +
<% end %> <% end %> diff --git a/app/views/issues/_subtasks.html.erb b/app/views/issues/_subtasks.html.erb index c84b5baf9..39ad286d7 100644 --- a/app/views/issues/_subtasks.html.erb +++ b/app/views/issues/_subtasks.html.erb @@ -8,5 +8,7 @@

<%= form_tag({}, :data => {:cm_url => issues_context_menu_path}) do %> - <%= render_descendants_tree(@issue) unless @issue.leaf? %> +
+ <%= render_descendants_tree(@issue) unless @issue.leaf? %> +
<% end %>