diff --git a/app/controllers/admin/galleries_controller.rb b/app/controllers/admin/galleries_controller.rb index 8a108f3..9e1f0c4 100644 --- a/app/controllers/admin/galleries_controller.rb +++ b/app/controllers/admin/galleries_controller.rb @@ -288,8 +288,8 @@ class Admin::GalleriesController < OrbitAdminController end def filter_album @tags = @module_app.tags - categories = @module_app.categories.enabled - @filter_fields = filter_fields(categories, @tags) + @categories = @module_app.categories.enabled + @filter_fields = filter_fields(@categories, @tags) @filter_fields.delete(:status) albums = Album.all.asc(:order).with_categories(filters("category")).with_tags(filters("tag")) @fiter_albums = search_data(albums,[:name]) @@ -356,7 +356,7 @@ class Admin::GalleriesController < OrbitAdminController def new @album = Album.new @tags = @module_app.tags - @categories = @module_app.categories + @categories = @module_app.categories.enabled.authorized(current_user) end def create @@ -375,7 +375,7 @@ class Admin::GalleriesController < OrbitAdminController @album = Album.find(params[:id]) if can_edit_or_delete?(@album) @tags = @module_app.tags - @categories = @module_app.categories + @categories = @module_app.categories.enabled.authorized(current_user) else render_401 end