Class: Alchemy::Admin::DashboardController
Instance Method Summary
collapse
#leave
Methods included from Modules
included, #module_definition_for, register_module
#current_ability
#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
|
#info ⇒ Object
24
25
26
|
# File 'app/controllers/alchemy/admin/dashboard_controller.rb', line 24
def info
@alchemy_version = Alchemy.version
end
|
#update_check ⇒ Object
28
29
30
31
32
33
34
35
36
37
|
# File 'app/controllers/alchemy/admin/dashboard_controller.rb', line 28
def update_check
@alchemy_version = Alchemy.version
if @alchemy_version < latest_alchemy_version
render plain: "true"
else
render plain: "false"
end
rescue UpdateServiceUnavailable => e
render plain: e, status: 503
end
|