Sha256: 49a9829cbb073ee6b0ed4103c2be22d3cc47183465467e4138dc0c075c4b66db

Contents?: true

Size: 723 Bytes

Versions: 12

Compression:

Stored size: 723 Bytes

Contents

class Admin::DashboardController < Admin::ApplicationController

  layout 'admin/application'

  def index
    @admin_applications = Spud::Core.admin_applications.select do |admin_application|
      current_user.can_view_app?(admin_application)
    end
  end

  def switch
    if !params[:multisite_select].blank?
      if Spud::Core.multisite_config.select{|p| p[:site_id].to_i == params[:multisite_select].to_i}.blank? == false
        session[:admin_site] = params[:multisite_select].to_i
      else
        flash[:error] = "Site does not exist."
      end
    else
      session[:admin_site] = 0
    end
    redirect_to(back_or_default(!request.referer.blank? ? request.referer : admin_root_path)) and return
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
tb_core-1.2.1 app/controllers/admin/dashboard_controller.rb
tb_core-1.2.0 app/controllers/admin/dashboard_controller.rb
tb_core-1.1.10 app/controllers/admin/dashboard_controller.rb
tb_core-1.1.9 app/controllers/admin/dashboard_controller.rb
tb_core-1.1.8 app/controllers/admin/dashboard_controller.rb
tb_core-1.1.7 app/controllers/admin/dashboard_controller.rb
tb_core-1.1.6 app/controllers/admin/dashboard_controller.rb
tb_core-1.1.5 app/controllers/admin/dashboard_controller.rb
tb_core-1.1.4 app/controllers/admin/dashboard_controller.rb
tb_core-1.1.2 app/controllers/admin/dashboard_controller.rb
tb_core-1.1.1 app/controllers/admin/dashboard_controller.rb
tb_core-1.1.0 app/controllers/admin/dashboard_controller.rb