Class: WelcomeController
- Inherits:
-
ApplicationController
show all
- Defined in:
- frontend/app/controllers/welcome_controller.rb,
public/app/controllers/welcome_controller.rb
Instance Method Summary
collapse
#archivesspace, can_access?, permission_mappings, set_access_control
Instance Method Details
#index ⇒ Object
4
5
6
7
8
9
10
11
12
13
14
15
|
# File 'frontend/app/controllers/welcome_controller.rb', line 4
def index
info = JSONModel::HTTP::get_json('/')
view_context.database_warning( info )
if session[:user] && @repositories.length === 0
if user_can?('create_repository')
flash.now[:info] = t("repository._frontend.messages.create_first_repository")
else
flash.now[:info] = t("repository._frontend.messages.no_access_to_repositories")
end
end
end
|
#show ⇒ Object
2
3
4
5
6
|
# File 'public/app/controllers/welcome_controller.rb', line 2
def show
@page_title = I18n.t 'brand.welcome_page_title'
@search = Search.new(params)
render
end
|