]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/browse/_paging_nav.html.erb
Add Bootstrap styling to changeset node/way/relation page links
[rails.git] / app / views / browse / _paging_nav.html.erb
index 50e75bff89f5bd4cca9d4ebe8ebdde24364cd9b4..02a7aa2c8e31c58f111d797152ccdb32ce55c21f 100644 (file)
@@ -1,13 +1,10 @@
-<h4 class="paginate">
-<% current_page = pages.current_page %>
-<% if pages.page_count > 1 %>
-    <%= t'browse.paging_nav.showing_page' %>
-    <%= current_page.number %> (<%= current_page.first_item %><%
-    if (current_page.first_item < current_page.last_item) # if more than 1 trace on page
-      %>-<%= current_page.last_item %><%
-    end %>
-    <%= t'browse.paging_nav.of'%> <%= pages.item_count %>)
-
-<span><%= raw pagination_links_each(pages, {}) { |n| link_to_page(n, page_param) } %></span>
-<% end %>
-</h4>
+<div class="row">
+  <div class="col">
+    <h4><%= heading %></h4>
+  </div>
+  <% if pages.page_count > 1 %>
+    <div class="col-auto">
+      <%= raw pagination_links_bootstrap(pages, {}) { |n| url_for(page_param => n) } %>
+    </div>
+  <% end %>
+</div>