Class: CamaleonCms::Admin::Appearances::ThemesController
Instance Method Summary
collapse
#ajax, #cama_get_i18n_frontend, #dashboard, #search
Instance Method Details
#index ⇒ Object
8
9
10
11
12
13
14
15
16
|
# File 'app/controllers/camaleon_cms/admin/appearances/themes_controller.rb', line 8
def index
add_breadcrumb I18n.t('camaleon_cms.admin.sidebar.themes')
authorize! :manage, :themes
return if params[:set].blank?
site_install_theme(params[:set])
flash.now[:notice] = t('camaleon_cms.admin.themes.message.updated')
redirect_to action: :index
end
|
#load_data ⇒ Object
18
19
20
21
22
23
24
25
26
27
|
# File 'app/controllers/camaleon_cms/admin/appearances/themes_controller.rb', line 18
def load_data
file = Rails.root.join('app', 'apps', 'themes', current_site.get_theme_slug, 'data.json')
@messages = load_file_content_to_db(
file,
{
post_types: 1, clear_post_type: 1, nav_menus: 1, clear_nav_menus: 1, slider_basic: 1,
clear_slider_basic: 1, theme_import: 1
}
)
end
|
#preview ⇒ Object
29
30
31
|
# File 'app/controllers/camaleon_cms/admin/appearances/themes_controller.rb', line 29
def preview
render layout: false
end
|