From 837ea01a34a7dddeefe8086b2c6fc28e9a14616c Mon Sep 17 00:00:00 2001 From: Philip Arndt Date: Mon, 9 Aug 2010 16:47:56 +1200 Subject: Initial commit - you can create, edit and delete a blog post and it respects the fact that it is draft or not. --- app/views/admin/blog_posts/index.html.erb | 59 +++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 app/views/admin/blog_posts/index.html.erb (limited to 'app/views/admin/blog_posts/index.html.erb') 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 @@ +
+ +
+
+ <% if searching? %> +

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

+ <% if @blog_posts.any? %> + <%= render :partial => "blog_posts", + :collection => @blog_posts %> + <% else %> +

<%= t('admin.search_no_results') %>

+ <% end %> + <% else %> + <% if @blog_posts.any? %> + <%= will_paginate @blog_posts, + :previous_label => '«', + :next_label => '»' %> + + <%= render :partial => "sortable_list" %> + + <%= will_paginate @blog_posts, + :previous_label => '«', + :next_label => '»' %> + <% else %> +

+ + <%= t('.no_items_yet') %> + +

+ <% end %> + <% end %> +
+<%= render :partial => "/shared/admin/make_sortable", + :locals => { + :tree => false + } if !searching? and BlogPost.count > 1 %> -- cgit v1.2.3