aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/admin/blog/posts/index.html.erb
blob: ae825eb89ea2785fb9fc169cec61cb589dec03f8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<%= render :partial => '/admin/blog/submenu' %>
<div id='records'>
  <% if searching? %>
    <h2><%= t('shared.admin.search.results_for', :query => params[:search]) %></h2>
    <% if @blog_posts.any? %>
      <%= render :partial => "blog_posts",
                 :collection => @blog_posts %>
    <% else %>
      <p><%= t('admin.search_no_results') %></p>
    <% end %>
  <% else %>
    <% if @blog_posts.any? %>
      <%= will_paginate @blog_posts,
                        :previous_label => '&laquo;',
                        :next_label => '&raquo;' %>

      <%= render :partial => "sortable_list" %>

      <%= will_paginate @blog_posts,
                        :previous_label => '&laquo;',
                        :next_label => '&raquo;' %>
    <% else %>
      <p>
        <strong>
          <%= t('.no_items_yet', :create => t('admin.blog.submenu.posts.new')) %>
        </strong>
      </p>
    <% end %>
  <% end %>
</div>