Sha256: 58099109546abc538812db131065aabeb45142378de736500ef8c31a14e22454

Contents?: true

Size: 972 Bytes

Versions: 67

Compression:

Stored size: 972 Bytes

Contents

class CamaleonCms::Admin::Appearances::ThemesController < CamaleonCms::AdminController
  before_action :check_theme_permission
  # list themes or update a theme status
  add_breadcrumb I18n.t("camaleon_cms.admin.sidebar.appearance")
  def index
    add_breadcrumb I18n.t("camaleon_cms.admin.sidebar.themes")
    PluginRoutes.reload
    authorize! :manage, :themes
    if params[:set].present?
      site_install_theme(params[:set])
      flash.now[:notice] = t('camaleon_cms.admin.themes.message.updated')
      redirect_to action: :index
    end
  end

  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

  def preview
    render layout: false
  end

  private
  def check_theme_permission
    authorize! :manage, :themes
  end
end

Version data entries

67 entries across 67 versions & 2 rubygems

Version Path
camaleon_cms-2.6.4 app/controllers/camaleon_cms/admin/appearances/themes_controller.rb
camaleon_cms-2.6.3 app/controllers/camaleon_cms/admin/appearances/themes_controller.rb
camaleon_cms-2.6.2 app/controllers/camaleon_cms/admin/appearances/themes_controller.rb
camaleon_cms-2.6.1 app/controllers/camaleon_cms/admin/appearances/themes_controller.rb
camaleon_cms-2.6.0.1 app/controllers/camaleon_cms/admin/appearances/themes_controller.rb
camaleon_cms-2.6.0 app/controllers/camaleon_cms/admin/appearances/themes_controller.rb
camaleon_cms-2.5.3.1 app/controllers/camaleon_cms/admin/appearances/themes_controller.rb
camaleon_cms-2.5.3 app/controllers/camaleon_cms/admin/appearances/themes_controller.rb
camaleon_cms-2.5.2 app/controllers/camaleon_cms/admin/appearances/themes_controller.rb
camaleon_cms_rails6-2.5.0 app/controllers/camaleon_cms/admin/appearances/themes_controller.rb
camaleon_cms-2.5.1 app/controllers/camaleon_cms/admin/appearances/themes_controller.rb
camaleon_cms-2.5.0 app/controllers/camaleon_cms/admin/appearances/themes_controller.rb
camaleon_cms-2.4.6.9 app/controllers/camaleon_cms/admin/appearances/themes_controller.rb
camaleon_cms-2.4.6.8 app/controllers/camaleon_cms/admin/appearances/themes_controller.rb
camaleon_cms-2.4.6.7 app/controllers/camaleon_cms/admin/appearances/themes_controller.rb
camaleon_cms-2.4.6.6 app/controllers/camaleon_cms/admin/appearances/themes_controller.rb
camaleon_cms-2.4.6.5 app/controllers/camaleon_cms/admin/appearances/themes_controller.rb
camaleon_cms-2.4.6.4 app/controllers/camaleon_cms/admin/appearances/themes_controller.rb
camaleon_cms-2.4.6.3 app/controllers/camaleon_cms/admin/appearances/themes_controller.rb
camaleon_cms-2.4.6.2 app/controllers/camaleon_cms/admin/appearances/themes_controller.rb