Sha256: 025ba0cee6b65be7c6422b242010aa6e8fd7277de7736298d95d588dafdb3bd9

Contents?: true

Size: 540 Bytes

Versions: 9

Compression:

Stored size: 540 Bytes

Contents

module Sunrise
  class DashboardController < Sunrise::ApplicationController
    include Sunrise::Utils::SearchWrapper
    
    authorize_resource :class => false
    
    def index
      per_page = Sunrise::Config.audit_events_per_page
      cur_page = (params[:page] || 1).to_i
      offset = (cur_page - 1) * per_page
      
      @events = Sunrise::Config.audit_scope.limit(per_page).offset(offset)
      
      respond_with(@events) do |format|
        format.html { render :layout => params[:time].blank? }
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
sunrise-cms-0.5.3 app/controllers/sunrise/dashboard_controller.rb
sunrise-cms-0.5.2 app/controllers/sunrise/dashboard_controller.rb
sunrise-cms-0.5.1 app/controllers/sunrise/dashboard_controller.rb
sunrise-cms-0.5.0 app/controllers/sunrise/dashboard_controller.rb
sunrise-cms-0.5.0.rc5 app/controllers/sunrise/dashboard_controller.rb
sunrise-cms-0.5.0.rc4 app/controllers/sunrise/dashboard_controller.rb
sunrise-cms-0.5.0.rc3 app/controllers/sunrise/dashboard_controller.rb
sunrise-cms-0.5.0.rc2 app/controllers/sunrise/dashboard_controller.rb
sunrise-cms-0.5.0.rc1 app/controllers/sunrise/dashboard_controller.rb