From d987886a9a94c6bad53ff7c7a241b85ea0b57de7 Mon Sep 17 00:00:00 2001 From: hukl Date: Tue, 10 Mar 2009 23:48:26 +0100 Subject: added list of drafts to admin overview --- app/controllers/admin_controller.rb | 1 + app/views/admin/index.html.erb | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 6694ad6..06c5390 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -2,6 +2,7 @@ class AdminController < ApplicationController before_filter :login_required def index + @drafts = Page.find(:all, :include => [:node, :user], :conditions => ["nodes.draft_id = pages.id"]) end end diff --git a/app/views/admin/index.html.erb b/app/views/admin/index.html.erb index e69de29..00a5c09 100644 --- a/app/views/admin/index.html.erb +++ b/app/views/admin/index.html.erb @@ -0,0 +1,20 @@ +
+

Drafts

+ + + + + + + + <% @drafts.each do |draft| %> + + + + + + + + <% end %> +
IDTitlePathLocked by
<%= draft.id %><%= draft.title %><%= draft.node.unique_name %><%= draft.user.login rescue "" %><%= link_to 'Show', node_path(draft.node) %>
+
\ No newline at end of file -- cgit v1.3