aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/admin/blog_posts/index.html.erb
diff options
context:
space:
mode:
authorPhilip Arndt <parndt@gmail.com>2010-08-09 16:47:56 +1200
committerPhilip Arndt <parndt@gmail.com>2010-08-09 16:47:56 +1200
commit837ea01a34a7dddeefe8086b2c6fc28e9a14616c (patch)
tree26c3c55c9026518de8b0626001cc55116bc5c87e /app/views/admin/blog_posts/index.html.erb
parent9a8b95e9aa71529d7b4173a3afce49b199a60615 (diff)
downloadrefinerycms-blog-837ea01a34a7dddeefe8086b2c6fc28e9a14616c.tar.gz
refinerycms-blog-837ea01a34a7dddeefe8086b2c6fc28e9a14616c.tar.bz2
refinerycms-blog-837ea01a34a7dddeefe8086b2c6fc28e9a14616c.zip
Initial commit - you can create, edit and delete a blog post and it respects the fact that it is draft or not.
Diffstat (limited to 'app/views/admin/blog_posts/index.html.erb')
-rw-r--r--app/views/admin/blog_posts/index.html.erb59
1 files changed, 59 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..15fd775
--- /dev/null
+++ b/app/views/admin/blog_posts/index.html.erb
@@ -0,0 +1,59 @@
+<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>
+ <% if !searching? and BlogPost.count > 1 %>
+ <li>
+ <%= link_to t('refinery.reorder', :what => "BlogPost"), admin_blog_posts_url,
+ :id => "reorder_action",
+ :class => "reorder_icon" %>
+
+ <%= link_to t('refinery.reorder_done', :what => "BlogPost"), admin_blog_posts_url,
+ :id => "reorder_action_done",
+ :style => "display: none;",
+ :class => "reorder_icon" %>
+ </li>
+ <% end %>
+ </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>
+<%= render :partial => "/shared/admin/make_sortable",
+ :locals => {
+ :tree => false
+ } if !searching? and BlogPost.count > 1 %>