From 11f16cd66e86396bda09e3bdede88fd08f35bc1c Mon Sep 17 00:00:00 2001 From: Philip Arndt Date: Wed, 25 Aug 2010 16:15:02 +1200 Subject: Added categories section --- .../admin/blog/categories_controller.rb | 2 +- app/views/admin/blog/_submenu.html.erb | 8 +++--- app/views/admin/blog/categories/_category.html.erb | 13 ++++++++++ app/views/admin/blog/categories/_form.html.erb | 15 +++++++++++ .../admin/blog/categories/_sortable_list.html.erb | 7 +++++ app/views/admin/blog/categories/edit.html.erb | 1 + app/views/admin/blog/categories/index.html.erb | 30 ++++++++++++++++++++++ app/views/admin/blog/categories/new.html.erb | 1 + app/views/admin/blog/comments/index.html.erb | 22 ++++++++-------- app/views/admin/blog/posts/_form.html.erb | 20 +++++++++++---- 10 files changed, 99 insertions(+), 20 deletions(-) create mode 100644 app/views/admin/blog/categories/_category.html.erb create mode 100644 app/views/admin/blog/categories/_form.html.erb create mode 100644 app/views/admin/blog/categories/_sortable_list.html.erb create mode 100644 app/views/admin/blog/categories/edit.html.erb create mode 100644 app/views/admin/blog/categories/index.html.erb create mode 100644 app/views/admin/blog/categories/new.html.erb (limited to 'app') diff --git a/app/controllers/admin/blog/categories_controller.rb b/app/controllers/admin/blog/categories_controller.rb index 09fa802..9682e3b 100644 --- a/app/controllers/admin/blog/categories_controller.rb +++ b/app/controllers/admin/blog/categories_controller.rb @@ -1,7 +1,7 @@ class Admin::Blog::CategoriesController < Admin::BaseController crudify :blog_category, - :title_attribute => :name, + :title_attribute => :title, :order => 'created_at DESC' end diff --git a/app/views/admin/blog/_submenu.html.erb b/app/views/admin/blog/_submenu.html.erb index 7eccba7..db3064f 100644 --- a/app/views/admin/blog/_submenu.html.erb +++ b/app/views/admin/blog/_submenu.html.erb @@ -1,4 +1,4 @@ -
+
+ <% content_for :head do %>