diff --git a/app/models/category.rb b/app/models/category.rb index 9f1c7be..5bd02b0 100644 --- a/app/models/category.rb +++ b/app/models/category.rb @@ -47,7 +47,13 @@ class Category < ActiveRecord::Base end def total_items + # FIXME this can be SLOW (??) articles.count + comments.count + enterprises.count + people.count + communities.count + products.count end + def display_in_menu? + # FIXME don't hardcode like this. Should be a setting of the environment, maybe + total_items >= 10 + end + end diff --git a/app/views/profile_editor/index.rhtml b/app/views/profile_editor/index.rhtml index 793a5c6..b331bd4 100644 --- a/app/views/profile_editor/index.rhtml +++ b/app/views/profile_editor/index.rhtml @@ -14,8 +14,6 @@ <%= file_manager_button(_('Manage Content'), 'icons-app/cms.png', :controller => 'cms') %> - <%= file_manager_button(_('My Interests'), 'icons-app/categories.png', :controller => 'profile_editor', :action => 'edit_categories') %> - <%= file_manager_button(_('Change Password'), 'icons-app/change-password.png', :controller => 'account', :action => 'change_password') if profile.person? %> <%= file_manager_button(_('Manage friends'), 'icons-app/friends.png', :controller => 'friends', :action => 'index') if profile.person? %> diff --git a/app/views/shared/categories_menu.rhtml b/app/views/shared/categories_menu.rhtml index 624975d..a79b10c 100644 --- a/app/views/shared/categories_menu.rhtml +++ b/app/views/shared/categories_menu.rhtml @@ -4,7 +4,7 @@
  • > <%= item.name %>