diff options
Diffstat (limited to 'app/controllers/admin_controller.rb')
| -rw-r--r-- | app/controllers/admin_controller.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 538e7d7..0446387 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb | |||
| @@ -5,9 +5,13 @@ class AdminController < ApplicationController | |||
| 5 | before_filter :login_required | 5 | before_filter :login_required |
| 6 | 6 | ||
| 7 | def index | 7 | def index |
| 8 | @drafts = Page.drafts | 8 | @drafts = Node.all( |
| 9 | :limit => 20, | ||
| 10 | :order => "updated_at desc", | ||
| 11 | :conditions => ["draft_id IS NOT NULL"] | ||
| 12 | ) | ||
| 9 | @recent_changes = Node.all( | 13 | @recent_changes = Node.all( |
| 10 | :limit => 50, | 14 | :limit => 20, |
| 11 | :order => "updated_at desc", | 15 | :order => "updated_at desc", |
| 12 | :conditions => [ | 16 | :conditions => [ |
| 13 | "updated_at < ? AND updated_at > ?", Time.now, Time.now-14.days | 17 | "updated_at < ? AND updated_at > ?", Time.now, Time.now-14.days |
