Update archive_files_controller.rb

This commit is contained in:
chiu 2019-09-16 20:32:26 +08:00
parent 86da89fd24
commit 94028d5eea
1 changed files with 6 additions and 2 deletions

View File

@ -1,7 +1,11 @@
class Admin::ArchiveFilesController < OrbitAdminController
def show
module_pages = Page.where(:module => 'archive').collect{|p| p.url}[0]
redirect_to '/' + I18n.locale.to_s + module_pages
module_pages = Page.where(:module => 'archive').collect{|p| p.url}
if module_pages.length<1
render :text => t('archive.no_page').to_s
else
redirect_to '/' + I18n.locale.to_s + module_pages[0] + '?title=' + params['title'].to_s
end
end
def index
if ArchiveSortOrder.count == 0