Class: Alchemy::Admin::DashboardController
Instance Method Summary
collapse
#leave
Methods included from Modules
included, #module_definition_for, register_module
#configuration, #multi_language?, #multi_site?
Instance Method Details
#index ⇒ Object
9
10
11
12
13
14
15
16
17
18
19
20
|
# File 'app/controllers/alchemy/admin/dashboard_controller.rb', line 9
def index
@last_edited_pages = Page.from_current_site.all_last_edited_from(current_alchemy_user)
@locked_pages = Page.from_current_site.all_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
22
23
24
|
# File 'app/controllers/alchemy/admin/dashboard_controller.rb', line 22
def info
@alchemy_version = Alchemy.version
end
|
#update_check ⇒ Object
26
27
28
29
30
31
32
33
34
35
|
# File 'app/controllers/alchemy/admin/dashboard_controller.rb', line 26
def update_check
@alchemy_version = Alchemy.version
if @alchemy_version < latest_alchemy_version
render :text => 'true'
else
render :text => 'false'
end
rescue UpdateServiceUnavailable => e
render :text => e, :status => 503
end
|