[openstreetmap/openstreetmap-website] Show changeset element counts using badges (PR #4872)

Anton Khorev notifications at github.com
Tue Mar 25 14:32:34 UTC 2025


@AntonKhorev commented on this pull request.



> +<% if pages.page_count == 1 %>
+  <h4 class="fs-5">
+    <%= t ".#{type.pluralize}_title" %>
+    <span class="badge count-number">
+      <%= pages.item_count %>
+    </span>
+  </h4>
+<% elsif pages.page_count > 1 %>
+  <h4 class="fs-5">
+    <%= t ".#{type.pluralize}_title" %>
+    <span class="badge count-number">
+      <%= t ".range", :x => pages.current_page.first_item,
+                      :y => pages.current_page.last_item,
+                      :count => pages.item_count %>
+    </span>
+  </h4>
+

This is reproducing what I removed from `browse_helper.rb`, except as a code block inside the template.

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

Message ID: <openstreetmap/openstreetmap-website/pull/4872/review/2714005202 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250325/b7aaf648/attachment.htm>


More information about the rails-dev mailing list