From c358de020b5c8bd8772cf67e432d475f62a47919 Mon Sep 17 00:00:00 2001 From: r888888888 Date: Tue, 3 Dec 2013 16:02:27 -0800 Subject: [PATCH] fixes #2044 --- app/helpers/pagination_helper.rb | 6 +++--- app/views/posts/partials/common/_secondary_links.html.erb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/helpers/pagination_helper.rb b/app/helpers/pagination_helper.rb index d863fbdea..d058448e6 100644 --- a/app/helpers/pagination_helper.rb +++ b/app/helpers/pagination_helper.rb @@ -3,11 +3,11 @@ module PaginationHelper html = '
' if records.any? - if params[:page] =~ /[ab]/ - html << '
  • ' + link_to("< Previous", params.merge(:page => "a#{records[0].id}"), :rel => "prev") + '
  • ' + if params[:page] =~ /[ab]/ && params[:f] != "1" + html << '
  • ' + link_to("< Previous", params.merge(:page => "a#{records[0].id}", :f => nil), :rel => "prev") + '
  • ' end - html << '
  • ' + link_to("Next >", params.merge(:page => "b#{records[-1].id}"), :rel => "next") + '
  • ' + html << '
  • ' + link_to("Next >", params.merge(:page => "b#{records[-1].id}", :f => nil), :rel => "next") + '
  • ' end html << "
    " diff --git a/app/views/posts/partials/common/_secondary_links.html.erb b/app/views/posts/partials/common/_secondary_links.html.erb index a997d4126..8e64d9c76 100644 --- a/app/views/posts/partials/common/_secondary_links.html.erb +++ b/app/views/posts/partials/common/_secondary_links.html.erb @@ -5,7 +5,7 @@
  • <%= link_to "Popular", popular_explore_posts_path %>
  • <%= link_to "Hot", posts_path(:tags => "order:rank") %>
  • <% unless CurrentUser.is_anonymous? %> -
  • <%= link_to "Favorites", favorites_path %>
  • +
  • <%= link_to "Favorites", favorites_path(:f => "1") %>
  • <%= link_to "Subscriptions", posts_path(:tags => "sub:#{CurrentUser.name}") %>
  • <% end %>
  • <%= link_to "Changes", post_versions_path %>