aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/admin/blog/posts/index.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/admin/blog/posts/index.html.erb')
-rw-r--r--app/views/admin/blog/posts/index.html.erb43
1 files changed, 43 insertions, 0 deletions
diff --git a/app/views/admin/blog/posts/index.html.erb b/app/views/admin/blog/posts/index.html.erb
new file mode 100644
index 0000000..0bc14db
--- /dev/null
+++ b/app/views/admin/blog/posts/index.html.erb
@@ -0,0 +1,43 @@
+<div id='actions'>
+ <ul>
+ <li>
+ <%= render :partial => "/shared/admin/search",
+ :locals => {
+ :url => admin_blog_posts_url
+ } %>
+ </li>
+ <li>
+ <%= link_to t('.create_new'), new_admin_blog_post_url,
+ :class => "add_icon" %>
+ </li>
+ </ul>
+</div>
+<div id='records'>
+ <% if searching? %>
+ <h2><%= t('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') %>
+ </strong>
+ </p>
+ <% end %>
+ <% end %>
+</div> \ No newline at end of file