aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/refinery/blog/admin/categories/index.html.erb
diff options
context:
space:
mode:
authorUģis Ozols <ugis.ozolss@gmail.com>2013-08-07 15:57:47 +0300
committerUģis Ozols <ugis.ozolss@gmail.com>2013-08-07 16:06:10 +0300
commitc44f919890cd4e46b0420caa5fdf96c8e65af4a5 (patch)
treefe38eec557731bc8e83141aee533fe568f1a4eda /app/views/refinery/blog/admin/categories/index.html.erb
parentfaa6922bf8d71ae5c481afcbc7b2e54ec18e6930 (diff)
downloadrefinerycms-blog-c44f919890cd4e46b0420caa5fdf96c8e65af4a5.tar.gz
refinerycms-blog-c44f919890cd4e46b0420caa5fdf96c8e65af4a5.tar.bz2
refinerycms-blog-c44f919890cd4e46b0420caa5fdf96c8e65af4a5.zip
Use refinerycms-acts-as-indexed for search functionality.
Also simplify index views for posts, categories and comments by removing redundant code.
Diffstat (limited to 'app/views/refinery/blog/admin/categories/index.html.erb')
-rw-r--r--app/views/refinery/blog/admin/categories/index.html.erb22
1 files changed, 8 insertions, 14 deletions
diff --git a/app/views/refinery/blog/admin/categories/index.html.erb b/app/views/refinery/blog/admin/categories/index.html.erb
index 451abc5..f5e021a 100644
--- a/app/views/refinery/blog/admin/categories/index.html.erb
+++ b/app/views/refinery/blog/admin/categories/index.html.erb
@@ -1,21 +1,15 @@
<%= render '/refinery/blog/admin/submenu' %>
+<%= render 'refinery/admin/search_header', :url => request.path %>
<div id='records'>
- <% if searching? %>
- <h2><%= t('results_for', :scope => 'refinery.admin.search',
- :query => params[:search]) %></h2>
- <% if @categories.any? %>
- <%= render :partial => "blog_categories",
- :collection => @categories %>
- <% else %>
- <p><%= t('no_results', :scope => 'refinery.admin.search') %></p>
- <% end %>
- <% else %>
- <% if @categories.any? %>
- <%= will_paginate @categories %>
+ <% if @categories.any? %>
+ <%= will_paginate @categories %>
- <%= render "sortable_list" %>
+ <%= render "sortable_list" %>
- <%= will_paginate @categories %>
+ <%= will_paginate @categories %>
+ <% else %>
+ <% if searching? %>
+ <%= t('no_results', :scope => 'refinery.admin.search') %>
<% else %>
<p>
<strong>