add index paginates
This commit is contained in:
parent
6137eeb8b6
commit
b845b3c835
|
@ -10,15 +10,18 @@ class Admin::ActivitiesController < OrbitMemberController
|
|||
|
||||
def index
|
||||
@activities = Activity.order_by(:year => 'desc').page(params[:page]).per(10)
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.xml { render :xml => @activities }
|
||||
end
|
||||
#respond_to do |format|
|
||||
#format.html
|
||||
#format.xml { render :xml => @activities }
|
||||
#end
|
||||
end
|
||||
|
||||
def new
|
||||
@member = MemberProfile.find_by(:uid=>params['uid']) rescue nil
|
||||
@activity = Activity.new
|
||||
if params[:desktop]
|
||||
render :layout => false
|
||||
end
|
||||
end
|
||||
|
||||
def create
|
||||
|
|
|
@ -34,7 +34,8 @@ class PersonalActivitiesController < ApplicationController
|
|||
'activity_end_date' => t('personal_activity.activity_end_date'),
|
||||
'year' => t('personal_activity.year'),
|
||||
'note' => t('personal_activity.note')
|
||||
}
|
||||
},
|
||||
"total_pages" => activities.total_pages
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
@ -45,8 +45,7 @@ class Activity
|
|||
"activity_organizer",
|
||||
"activity_area",
|
||||
"activity_start_date",
|
||||
"activity_end_date",
|
||||
"year"
|
||||
"activity_end_date"
|
||||
]
|
||||
fields_to_remove = []
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ module PersonalActivity
|
|||
update_info 'some update_info'
|
||||
|
||||
frontend_enabled
|
||||
data_count 1..10
|
||||
data_count 1..30
|
||||
icon_class_no_sidebar "icons-user"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue