X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/2e2f2124728ca755b2db8f83f022eaea24b647f0..6c64a74a46c3d75c6526958b9e0474684f49386e:/app/views/trace/_trace_paging_nav.html.erb diff --git a/app/views/trace/_trace_paging_nav.html.erb b/app/views/trace/_trace_paging_nav.html.erb index 9ac80d4cd..dea4271d2 100644 --- a/app/views/trace/_trace_paging_nav.html.erb +++ b/app/views/trace/_trace_paging_nav.html.erb @@ -1,12 +1,18 @@ -<% current_page = @trace_pages.current_page %> +
-<%= t'trace.trace_paging_nav.showing' %> -<%= 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'trace.trace_paging_nav.of' %> <%= @trace_pages.item_count %>) +<% if @traces.size > 1 %> +<% if @page > 1 %> +<%= link_to t('trace.trace_paging_nav.newer'), params.merge({ :page => @page - 1 }) %> +<% else %> +<%= t('trace.trace_paging_nav.newer') %> +<% end %> + +| <%= t('trace.trace_paging_nav.showing_page', :page => @page) %> | -<% if @trace_pages.page_count > 1 %> - | <%= pagination_links_each(@trace_pages, {}) { |n| link_to_page(n) } %> +<% if @traces.size < @page_size %> +<%= t('trace.trace_paging_nav.older') %> +<% else %> +<%= link_to t('trace.trace_paging_nav.older'), params.merge({ :page => @page + 1 }) %> +<% end %> <% end %> +