Fix show page layout.

This commit is contained in:
BoHung Chiu 2022-01-20 15:09:12 +08:00
parent 96f0dffcd3
commit afefed700d
1 changed files with 6 additions and 1 deletions

View File

@ -2,6 +2,9 @@
params = OrbitHelper.params
page = Page.where(url:params['url']).first
@show_back_and_next_flag = 0
content = ''
prev_content = ''
next_content = ''
if page.methods.include? 'select_option_items'.to_sym
ModuleApp.all.select{|tmp| tmp.key.to_s=='announcement'}.each do |modile_app|
@show_option_items = modile_app.show_option_items rescue nil
@ -37,7 +40,9 @@
next_url = params['url'] + '/' + next_result.to_param
next_content = "<a href='#{next_url}' title='#{t('announcement.next')}' class='next'><b>#{t('announcement.next')}</b><p>#{next_result['title'][I18n.locale]}</p></a>"
end
content = "<div class='see_more_boxTitle'>#{prev_content}#{next_content}</div>".html_safe
if prev_content != '' || next_content != ''
content = "<div class='see_more_boxTitle'>#{prev_content}#{next_content}</div>".html_safe
end
else
content = ''
end