[openstreetmap/openstreetmap-website] Show "reporting user" on "issues" screen (PR #4990)

David Tsiklauri notifications at github.com
Wed Oct 23 11:52:34 UTC 2024


@nertc commented on this pull request.



> @@ -60,6 +61,13 @@
           <td class="text-nowrap"><%= link_to t(".reports_count", :count => issue.reports_count), issue %></td>
           <td><%= link_to reportable_title(issue.reportable), reportable_url(issue.reportable) %></td>
           <td><%= link_to issue.reported_user.display_name, issue.reported_user if issue.reported_user %></td>
+          <td>
+            <% unique_reporters = issue.reports.uniq { |report| report.user.id } %>
+            <% unique_reporters[..2].each_with_index do |report, index| %>
+              <%= link_to(report.user.display_name, report.user) %><%= "," unless index == 2 || index == unique_reporters.size - 1 %>
+            <% end %>
+            <%= "..." if unique_reporters.size > 3 %>

Tooltips were added to show all names, and truncation was done using CSS

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4990#discussion_r1812577030
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/4990/review/2388367043 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20241023/fb9c26d1/attachment.htm>


More information about the rails-dev mailing list