diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb index 787a4fb1..620e35e0 100644 --- a/app/controllers/posts_controller.rb +++ b/app/controllers/posts_controller.rb @@ -90,8 +90,13 @@ def admin @placeholder_post = Post.new #todo re-implement the paging mongoid style all_published = nil + booleanify_params(params) unless params[:tag] - all_published = Post.where(:draft=>false, :page=>false).order_by(:posted_at=>:desc).entries + if (not params[:by_kudos]) + all_published = Post.where(:draft=>false, :page=>false).order_by(:posted_at=>:desc).entries + else + all_published = Post.loved.entries + end else all_published = Post.any_in({:tags_array => [params[:tag]]}).descending(:posted_at).entries #BUG, this will currently include static pages diff --git a/app/views/posts/admin.html.haml b/app/views/posts/admin.html.haml index 985a2603..e1bb2932 100644 --- a/app/views/posts/admin.html.haml +++ b/app/views/posts/admin.html.haml @@ -21,7 +21,11 @@ #published %h1 Published - = link_to 'Home', root_url, :class => 'button' + %div + Show + =link_to("the loved", '/admin/?by_kudos=true') + \/ + =link_to("all", '/admin/') .tags_list -if @tags.size > 0 %ul.tags_list