Hide disabled categories.
This commit is contained in:
parent
2dcfaabb66
commit
90660a9036
|
@ -38,7 +38,7 @@ class Admin::ArchiveFilesController < OrbitAdminController
|
||||||
end
|
end
|
||||||
@choose = ArchiveSortOrder.first['sort_order']
|
@choose = ArchiveSortOrder.first['sort_order']
|
||||||
@table_fields = [:status, :category, :title, :updated_at,:last_modified,"archive.downloaded_times"]
|
@table_fields = [:status, :category, :title, :updated_at,:last_modified,"archive.downloaded_times"]
|
||||||
@categories = @module_app.categories
|
@categories = @module_app.categories.enabled
|
||||||
@tags = @module_app.tags
|
@tags = @module_app.tags
|
||||||
@filter_fields = filter_fields(@categories, @tags)
|
@filter_fields = filter_fields(@categories, @tags)
|
||||||
@archives = ArchiveFile.order_by(sort)
|
@archives = ArchiveFile.order_by(sort)
|
||||||
|
@ -54,14 +54,14 @@ class Admin::ArchiveFilesController < OrbitAdminController
|
||||||
def new
|
def new
|
||||||
@archive_file = ArchiveFile.new
|
@archive_file = ArchiveFile.new
|
||||||
@tags = @module_app.tags
|
@tags = @module_app.tags
|
||||||
@categories = @module_app.categories
|
@categories = @module_app.categories.enabled
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
@archive_file = ArchiveFile.find(params[:id])
|
@archive_file = ArchiveFile.find(params[:id])
|
||||||
if can_edit_or_delete?(@archive_file)
|
if can_edit_or_delete?(@archive_file)
|
||||||
@tags = @module_app.tags
|
@tags = @module_app.tags
|
||||||
@categories = @module_app.categories
|
@categories = @module_app.categories.enabled
|
||||||
else
|
else
|
||||||
render_401
|
render_401
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue