Sha256: 709453b57db0b520e281b1a26cc0cf26f65c46595088171541effc3bfd5ec24a

Contents?: true

Size: 1.39 KB

Versions: 16

Compression:

Stored size: 1.39 KB

Contents

class DmCore::Admin::DashboardController < DmCore::Admin::AdminController

  #------------------------------------------------------------------------------
  def index
    @users = User.all
  end

  #------------------------------------------------------------------------------
  def update_site_assets
    if is_sysadmin?
      #--- svn up can't follow a symlink, so resolve it first
      path = File.readlink("#{Rails.root}/public/#{account_site_assets(false)}")
      @results = "Updating 'site_assets'...\r\n"
      @results += `svn up #{path}`
      if File.exists?("#{Account.current.theme_path}/protected_assets")
        path = File.join(File.readlink("#{Account.current.theme_path}"), "protected_assets")
        @results += "\nUpdating 'protected_assets'...\r\n"
        @results += `svn up #{path}`
      end
    end
  end
  
  # use whatever is passed in, but strip out anything dangerous.  Value will get
  # used as a css selector
  #------------------------------------------------------------------------------
  def change_theme
    cookies[:theme] = {:value => params[:id].replace_non_alphanumeric, :expires => Time.now + 1825.days}
    redirect_to :back
  end

private
  
  # Set some values for the template based on the controller
  #------------------------------------------------------------------------------
  def template_setup
    content_for :content_title, "Dashboard".html_safe
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
dm_core-4.2.3.10 app/controllers/dm_core/admin/dashboard_controller.rb
dm_core-4.2.3.9 app/controllers/dm_core/admin/dashboard_controller.rb
dm_core-4.2.3.8 app/controllers/dm_core/admin/dashboard_controller.rb
dm_core-4.2.3.7 app/controllers/dm_core/admin/dashboard_controller.rb
dm_core-4.2.3.6 app/controllers/dm_core/admin/dashboard_controller.rb
dm_core-4.2.3.5 app/controllers/dm_core/admin/dashboard_controller.rb
dm_core-4.2.3.4 app/controllers/dm_core/admin/dashboard_controller.rb
dm_core-4.2.3.3 app/controllers/dm_core/admin/dashboard_controller.rb
dm_core-4.2.3.2 app/controllers/dm_core/admin/dashboard_controller.rb
dm_core-4.2.3.1 app/controllers/dm_core/admin/dashboard_controller.rb
dm_core-4.2.3 app/controllers/dm_core/admin/dashboard_controller.rb
dm_core-4.2.2.3 app/controllers/dm_core/admin/dashboard_controller.rb
dm_core-4.2.2.2 app/controllers/dm_core/admin/dashboard_controller.rb
dm_core-4.2.2.1 app/controllers/dm_core/admin/dashboard_controller.rb
dm_core-4.2.2 app/controllers/dm_core/admin/dashboard_controller.rb
dm_core-4.2.1.5 app/controllers/dm_core/admin/dashboard_controller.rb