From: Andy Allan Date: Wed, 15 Jan 2020 10:58:47 +0000 (+0100) Subject: Rework issues display page to be responsive X-Git-Tag: live~2280^2 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/cd801b2c12eae0f11fadf4b247e1403f9e3a5b78?ds=sidebyside Rework issues display page to be responsive This change uses the bootstrap grid to make the issues page responsive, and avoids having lots of custom widths of divs specified via CSS. It also changes the display of the reports and comments to be more like diary entry comments, by having all metadata on one line and shown before the comment / report text. --- diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index d7984436a..5ab07e5cf 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -2689,20 +2689,7 @@ input.richtext_title[type="text"] { opacity: 0.7; } -.report-related-block { - display:inline-block; -} - -.report-block { - width:475px; - float:left; - margin-right:100px; -} - .related-reports { - width: 280px; - float: right; - ul { padding-left: $lineheight; margin-bottom: 0; @@ -2713,10 +2700,6 @@ input.richtext_title[type="text"] { } } -.issue-comments { - width:475px; -} - .issues-list { td:nth-child(2) { white-space: nowrap; diff --git a/app/views/issues/_comments.html.erb b/app/views/issues/_comments.html.erb index 7ff0948db..54932cc56 100644 --- a/app/views/issues/_comments.html.erb +++ b/app/views/issues/_comments.html.erb @@ -1,15 +1,15 @@
<% comments.each do |comment| %>
-
+
<%= link_to user_thumbnail(comment.user), user_path(comment.user) %>
- <%= link_to comment.user.display_name, user_path(comment.user) %>
- <%= comment.body %> +

+ <%= t ".comment_from_html", :user_link => link_to(comment.user.display_name, user_path(comment.user)), + :comment_created_at => l(comment.created_at.to_datetime, :format => :friendly) %> +

+

<%= comment.body %>

- - <%= t(".created_at", :datetime => l(comment.created_at.to_datetime, :format => :friendly)) %> -
<% end %>
diff --git a/app/views/issues/_reports.html.erb b/app/views/issues/_reports.html.erb index 1a43a73c7..143f2d887 100644 --- a/app/views/issues/_reports.html.erb +++ b/app/views/issues/_reports.html.erb @@ -1,16 +1,14 @@ <% reports.each do |report| %>
-
+
<%= link_to user_thumbnail(report.user), user_path(report.user) %>
- <%= t ".reported_by_html", :category => report.category, :user => link_to(report.user.display_name, user_path(report.user)) %> -
- - <%= t(".updated_at", :datetime => l(report.updated_at.to_datetime, :format => :friendly)) %> - -
- <%= report.details %> -
+

+ <%= t ".reported_by_html", :category => report.category, + :user => link_to(report.user.display_name, user_path(report.user)), + :updated_at => l(report.updated_at.to_datetime, :format => :friendly) %> +

+

<%= report.details %>


<% end %> diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 3e2f5ef48..24a74c728 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -19,9 +19,8 @@

<%= link_to t(".reopen"), reopen_issue_url(@issue), :method => :post if @issue.may_reopen? %>

<% end %> -