Favorite groups

This commit is contained in:
Toks
2015-06-23 15:25:54 -04:00
parent e1dc51e026
commit 04fa5596e2
27 changed files with 574 additions and 15 deletions

View File

@@ -26,6 +26,8 @@ class PostPresenter < Presenter
tag_param = "?tags=#{CGI::escape(options[:tags])}"
elsif options[:pool_id] || options[:pool]
tag_param = "?pool_id=#{CGI::escape((options[:pool_id] || options[:pool].id).to_s)}"
elsif options[:favgroup_id] || options[:favgroup]
tag_param = "?favgroup_id=#{CGI::escape((options[:favgroup_id] || options[:favgroup].id).to_s)}"
else
tag_param = nil
end
@@ -203,7 +205,7 @@ class PostPresenter < Presenter
end
def has_nav_links?(template)
(CurrentUser.user.enable_sequential_post_navigation && template.params[:tags].present? && template.params[:tags] !~ /(?:^|\s)(?:order|ordfav|ordpool):/) || @post.pools.any?
(CurrentUser.user.enable_sequential_post_navigation && template.params[:tags].present? && template.params[:tags] !~ /(?:^|\s)(?:order|ordfav|ordpool):/) || @post.pools.any? || @post.favorite_groups.any?
end
def post_footer_for_pool_html(template)