summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/admin_controller.rb4
-rw-r--r--app/controllers/nodes_controller.rb2
2 files changed, 4 insertions, 2 deletions
diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb
index d9cf1be6..2b35fd20 100644
--- a/app/controllers/admin_controller.rb
+++ b/app/controllers/admin_controller.rb
@@ -5,7 +5,9 @@ class AdminController < ApplicationController
5 before_action :login_required 5 before_action :login_required
6 6
7 def index 7 def index
8 @drafts = Node.drafts_and_autosaves(current_user_id: current_user.id).limit(5) 8 scope = Node.work_in_progress(current_user_id: current_user.id)
9 @drafts_total = scope.reorder(nil).count
10 @drafts = scope.includes(:head, :draft, :lock_owner).limit(5)
9 @actions = NodeAction.order(:occurred_at => :desc, :id => :desc).limit(5) 11 @actions = NodeAction.order(:occurred_at => :desc, :id => :desc).limit(5)
10 end 12 end
11 13
diff --git a/app/controllers/nodes_controller.rb b/app/controllers/nodes_controller.rb
index 50b30881..2a2cde33 100644
--- a/app/controllers/nodes_controller.rb
+++ b/app/controllers/nodes_controller.rb
@@ -231,7 +231,7 @@ class NodesController < ApplicationController
231 231
232 # Filter functions for admin views 232 # Filter functions for admin views
233 def drafts 233 def drafts
234 @nodes = index_matching(Node.drafts_and_autosaves) 234 @nodes = index_matching(Node.work_in_progress)
235 end 235 end
236 236
237 def mine 237 def mine