Fix show page layout.
This commit is contained in:
parent
96f0dffcd3
commit
afefed700d
|
@ -2,6 +2,9 @@
|
||||||
params = OrbitHelper.params
|
params = OrbitHelper.params
|
||||||
page = Page.where(url:params['url']).first
|
page = Page.where(url:params['url']).first
|
||||||
@show_back_and_next_flag = 0
|
@show_back_and_next_flag = 0
|
||||||
|
content = ''
|
||||||
|
prev_content = ''
|
||||||
|
next_content = ''
|
||||||
if page.methods.include? 'select_option_items'.to_sym
|
if page.methods.include? 'select_option_items'.to_sym
|
||||||
ModuleApp.all.select{|tmp| tmp.key.to_s=='announcement'}.each do |modile_app|
|
ModuleApp.all.select{|tmp| tmp.key.to_s=='announcement'}.each do |modile_app|
|
||||||
@show_option_items = modile_app.show_option_items rescue nil
|
@show_option_items = modile_app.show_option_items rescue nil
|
||||||
|
@ -37,7 +40,9 @@
|
||||||
next_url = params['url'] + '/' + next_result.to_param
|
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>"
|
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
|
end
|
||||||
|
if prev_content != '' || next_content != ''
|
||||||
content = "<div class='see_more_boxTitle'>#{prev_content}#{next_content}</div>".html_safe
|
content = "<div class='see_more_boxTitle'>#{prev_content}#{next_content}</div>".html_safe
|
||||||
|
end
|
||||||
else
|
else
|
||||||
content = ''
|
content = ''
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue