From: Anton Khorev Date: Tue, 3 Oct 2023 15:02:11 +0000 (+0300) Subject: Move bootstrap pagination list wrapper to template X-Git-Tag: live~742^2~5 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/b7ce0f09e6a06a62e054b3a1a9978eee88edd5a5?ds=inline Move bootstrap pagination list wrapper to template --- diff --git a/app/views/browse/_paging_nav.html.erb b/app/views/browse/_paging_nav.html.erb index 1f4cbee85..738d2f2ee 100644 --- a/app/views/browse/_paging_nav.html.erb +++ b/app/views/browse/_paging_nav.html.erb @@ -1,8 +1,8 @@

<%= heading %>

<% if pages.page_count > 1 %> -
+
    <%= raw pagination_links_bootstrap(pages, {}) { |n| url_for(page_param => n) } %> -
+ <% end %>
diff --git a/lib/classic_pagination/pagination_helper.rb b/lib/classic_pagination/pagination_helper.rb index 3ff7fbf4e..c691360e0 100644 --- a/lib/classic_pagination/pagination_helper.rb +++ b/lib/classic_pagination/pagination_helper.rb @@ -133,6 +133,7 @@ module ActionView # Same as above, but # - with bootstrap classes + # - no list wrapper # - invoked block returns the page url def pagination_links_bootstrap(paginator, options) options = DEFAULT_OPTIONS.merge(options) @@ -148,8 +149,6 @@ module ActionView html = "" - html << "" - html end