Class: Alchemy::Admin::DashboardController
- Inherits:
-
BaseController
- Object
- ApplicationController
- BaseController
- BaseController
- Alchemy::Admin::DashboardController
- Defined in:
- app/controllers/alchemy/admin/dashboard_controller.rb
Instance Method Summary collapse
Methods inherited from BaseController
Methods included from Modules
included, #module_definition_for, register_module
Methods included from Alchemy::AbilityHelper
Methods included from ConfigurationMethods
#configuration, #multi_language?, #multi_site?, #prefix_locale?
Instance Method Details
#index ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'app/controllers/alchemy/admin/dashboard_controller.rb', line 11 def index @last_edited_pages = Page.all_last_edited_from(current_alchemy_user) @all_locked_pages = Page.locked if Alchemy.user_class.respond_to?(:logged_in) @online_users = Alchemy.user_class.logged_in.to_a - [current_alchemy_user] end if current_alchemy_user.respond_to?(:sign_in_count) && current_alchemy_user.respond_to?(:last_sign_in_at) @last_sign_at = current_alchemy_user.last_sign_in_at @first_time = current_alchemy_user.sign_in_count == 1 && @last_sign_at.nil? end @sites = Site.all end |