]> git.openstreetmap.org Git - rails.git/commitdiff
So the way [17620] did it sucked but [17624] broke it unless you
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Mon, 14 Sep 2009 23:36:21 +0000 (23:36 +0000)
committerÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Mon, 14 Sep 2009 23:36:21 +0000 (23:36 +0000)
didn't have any changes because .item_count is the number of edits,
not pages.

Using .page_count works though, Whee!

app/views/changeset/_changeset_paging_nav.html.erb

index 3105425e621601b29553b4a415d733dca4db8206..5a5d94f05d89a670a739111f0180517926dc5e18 100644 (file)
@@ -7,7 +7,7 @@ if (current_page.first_item < current_page.last_item) # if more than 1 changeset
   %>-<%= current_page.last_item %><% 
 end %>
 <%= t'changeset.changeset_paging_nav.of'%> <%= @edit_pages.item_count %>)
   %>-<%= current_page.last_item %><% 
 end %>
 <%= t'changeset.changeset_paging_nav.of'%> <%= @edit_pages.item_count %>)
-<% if @edit_pages.item_count > 1 %>
+<% if @edit_pages.page_count > 1 %>
  | <%= pagination_links_each(@edit_pages, {}) { |n| link_to(n, params.merge({ :page => n })) } %>
 <% end %>
 </p>
  | <%= pagination_links_each(@edit_pages, {}) { |n| link_to(n, params.merge({ :page => n })) } %>
 <% end %>
 </p>