Sha256: 641ee96029bf7516f920dc010e96dd24c0f10d5acae23efc8b477898e8abab2f

Contents?: true

Size: 547 Bytes

Versions: 15

Compression:

Stored size: 547 Bytes

Contents

module Sunrise
  class DashboardController < Sunrise::ApplicationController
    include Sunrise::Utils::SearchWrapper
    
    authorize_resource :class => false
    
    def index
      per_page = Sunrise::Config.activities_per_page
      cur_page = (params[:page] || 1).to_i
      offset = (cur_page - 1) * per_page
      
      @events = Sunrise.activities
      @events = @events.limit(per_page).offset(offset)

      respond_with(@events) do |format|
        format.html { render :layout => params[:time].blank? }
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
sunrise-cms-1.0.0.rc2 app/controllers/sunrise/dashboard_controller.rb
sunrise-cms-1.0.0.rc1 app/controllers/sunrise/dashboard_controller.rb
sunrise-cms-0.7.0.rc2 app/controllers/sunrise/dashboard_controller.rb
sunrise-cms-0.7.0.rc1 app/controllers/sunrise/dashboard_controller.rb
sunrise-cms-0.6.11 app/controllers/sunrise/dashboard_controller.rb
sunrise-cms-0.6.10 app/controllers/sunrise/dashboard_controller.rb
sunrise-cms-0.6.9 app/controllers/sunrise/dashboard_controller.rb
sunrise-cms-0.6.8 app/controllers/sunrise/dashboard_controller.rb
sunrise-cms-0.6.7 app/controllers/sunrise/dashboard_controller.rb
sunrise-cms-0.6.6 app/controllers/sunrise/dashboard_controller.rb
sunrise-cms-0.6.5 app/controllers/sunrise/dashboard_controller.rb
sunrise-cms-0.6.4 app/controllers/sunrise/dashboard_controller.rb
sunrise-cms-0.6.3 app/controllers/sunrise/dashboard_controller.rb
sunrise-cms-0.6.2 app/controllers/sunrise/dashboard_controller.rb
sunrise-cms-0.6.1 app/controllers/sunrise/dashboard_controller.rb