Added sorting for backend index table
This commit is contained in:
parent
302a2af898
commit
01d47ec113
|
@ -1,8 +1,8 @@
|
|||
class Admin::AdBannersController < OrbitAdminController
|
||||
|
||||
def index
|
||||
@banners = Banner.all.page(params[:page]).per(10)
|
||||
@table_fields = ["Banner Name","Effect","Transition Interval","Transition Speed","Size","Preview"]
|
||||
@banners = Banner.order_by(sort).page(params[:page]).per(10)
|
||||
@table_fields = ["ad_banner.banner_name","ad_banner.effect","ad_banner.transition_interval","ad_banner.transition_speed","ad_banner.size","preview"]
|
||||
end
|
||||
|
||||
def show
|
||||
|
|
|
@ -5,8 +5,8 @@ class Admin::AdImagesController < Admin::AdBannersController
|
|||
end
|
||||
|
||||
def index
|
||||
@ad_images = AdImage.all.page(params[:page]).per(10)
|
||||
@table_fields = ["Preview","Banner","Title","Start Date","End Date", "Link"]
|
||||
@ad_images = AdImage.order_by(sort).page(params[:page]).per(10)
|
||||
@table_fields = ["preview","ad_banner.banner","title","start_date","end_date", "link"]
|
||||
end
|
||||
|
||||
def edit
|
||||
|
|
Loading…
Reference in New Issue