Specify display_name and tag explicitly when generating pagination links

as they don't always seem to be default correctly. Closes #561.
This commit is contained in:
Tom Hughes 2007-11-30 01:27:14 +00:00
parent cb7436602d
commit 6d6c9ddc8c
2 changed files with 9 additions and 1 deletions

View file

@ -6,4 +6,12 @@ module TraceHelper
return link_to(tag, :tag => tag, :display_name => @display_name, :page => nil) return link_to(tag, :tag => tag, :display_name => @display_name, :page => nil)
end end
end end
def link_to_page(page)
if @action == "mine"
return link_to(page, :tag => @tag, :page => page)
else
return link_to(page, :tag => @tag, :display_name => @display_name, :page => page)
end
end
end end

View file

@ -8,5 +8,5 @@ end %>
of <%= @trace_pages.item_count %>) of <%= @trace_pages.item_count %>)
<% if @trace_pages.page_count > 1 %> <% if @trace_pages.page_count > 1 %>
| <%= pagination_links(@trace_pages) %> | <%= pagination_links_each(@trace_pages, {}) { |n| link_to_page(n) } %>
<% end %> <% end %>