From c44f919890cd4e46b0420caa5fdf96c8e65af4a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ug=CC=A7is=20Ozols?= Date: Wed, 7 Aug 2013 15:57:47 +0300 Subject: Use refinerycms-acts-as-indexed for search functionality. Also simplify index views for posts, categories and comments by removing redundant code. --- .../refinery/blog/admin/comments/index.html.erb | 37 ++++++++-------------- 1 file changed, 14 insertions(+), 23 deletions(-) (limited to 'app/views/refinery/blog/admin/comments/index.html.erb') diff --git a/app/views/refinery/blog/admin/comments/index.html.erb b/app/views/refinery/blog/admin/comments/index.html.erb index 53c368e..c09e59b 100644 --- a/app/views/refinery/blog/admin/comments/index.html.erb +++ b/app/views/refinery/blog/admin/comments/index.html.erb @@ -1,30 +1,21 @@ -<%= render '/refinery/blog/admin/submenu' %> +<%= render 'refinery/blog/admin/submenu' %> +<%= render 'refinery/admin/search_header', :url => request.path %>
- <% if searching? %> -

<%= t('results_for', :scope => 'shared.admin.search', :query => params[:search]) %>

- <% if @comments.any? %> - <%= will_paginate @comments %> + <% if @comments.any? %> + <%= will_paginate @comments %> - + <%= render "sortable_list" %> - <%= will_paginate @comments %> - <% else %> -

<%= t('search_no_results', :scope => 'admin') %>

- <% end %> + <%= will_paginate @comments %> <% else %> - <% if @comments.any? %> - <%= will_paginate @comments %> - - <%= render "sortable_list" %> - - <%= will_paginate @comments %> + <% if searching? %> + <%= t('no_results', :scope => 'refinery.admin.search') %> <% else %> -

- <%= t('.no_items_yet', :type => action_name.gsub('index', 'new').downcase) %> -

- <% end %> +

+ + <%= t('.no_items_yet', :type => action_name.gsub('index', 'new').downcase) %> + +

<% end %> +<% end %>
-- cgit v1.2.3