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