file manger preview and pagination is done.
This commit is contained in:
1 parent
800f108be3
commit
a02cd97880
6 files changed
+51
-21
No files matched your search
@@ -3,8 +3,8 @@ class Admin::AssetsController < OrbitBackendController
|
||||
before_filter :setup_vars
|
||||
|
||||
def index
|
||||
@assets = (params[:sort] || @filter) ? get_sorted_and_filtered("asset") : Asset.all.desc(:created_at).page(params[:page]).per(10)
|
||||
if params[:type] == "images"
|
||||
@assets = (params[:sort] || @filter) ? get_sorted_and_filtered("asset") : Asset.all.desc(:created_at)
|
||||
if params[:type] == "image"
|
||||
@assets = @assets.where(:content_type => /^image/)
|
||||
end
|
||||
@tag = ModuleTag.new
|
||||
@@ -12,6 +12,8 @@ class Admin::AssetsController < OrbitBackendController
|
||||
@module_app = ModuleApp.find(params[:module_app_id]) rescue nil
|
||||
raise ModuleAppError, 'Can not find ModuleApp' if @module_app.nil?
|
||||
@module_app_id = @module_app.id rescue nil
|
||||
|
||||
@assets = @assets.page(params[:page]).per(10)
|
||||
|
||||
render :layout => "assets"
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user