3338: vital action missing from previous commit
authorPhil Hodgson <bitbucket@philhodgson.net>
Thu, 11 Sep 2014 21:49:15 +0000 (17:49 -0400)
committerPhil Hodgson <bitbucket@philhodgson.net>
Thu, 11 Sep 2014 21:49:15 +0000 (17:49 -0400)
apps/workbench/app/controllers/projects_controller.rb

index 573e387f08a1812a4442ed0b63ab817ce220f183..748072ed4a61bf393c8a4a9e27ae04a6af9a6668 100644 (file)
@@ -63,6 +63,13 @@ class ProjectsController < ApplicationController
     pane_list << { :name => 'Advanced' }
   end
 
+  def tab_counts
+    @tab_counts = {}
+    show_pane_list.each do |pane|
+      @tab_counts[pane[:name]] = @object.contents(filters: pane[:filters]).count if pane[:filters]
+    end
+  end
+
   def remove_item
     params[:item_uuids] = [params[:item_uuid]]
     remove_items