Fix bug: preview was always true
This commit is contained in:
parent
e9b337a385
commit
8e6fd277c2
|
@ -46,7 +46,7 @@ module ParserFrontEnd
|
||||||
# ret << "&category_id=#{page.category}" if page[:category]
|
# ret << "&category_id=#{page.category}" if page[:category]
|
||||||
ret << "&category_id=#{params[:category_id]}" if !params[:category_id].blank?
|
ret << "&category_id=#{params[:category_id]}" if !params[:category_id].blank?
|
||||||
ret << "&tag_id=#{params[:tag_id]}" if !params[:tag_id].blank?
|
ret << "&tag_id=#{params[:tag_id]}" if !params[:tag_id].blank?
|
||||||
ret << "&preview=true" if preview
|
ret << "&preview=true" if preview.eql?('true')
|
||||||
ret << "'></div>"
|
ret << "'></div>"
|
||||||
else
|
else
|
||||||
part = page.page_parts.detect{ |p| p.name.to_s == content['name'].to_s } rescue nil
|
part = page.page_parts.detect{ |p| p.name.to_s == content['name'].to_s } rescue nil
|
||||||
|
|
|
@ -27,7 +27,7 @@ class Panel::News::FrontEnd::NewsBulletinsController < OrbitWidgetController
|
||||||
if params[:preview] == "true"
|
if params[:preview] == "true"
|
||||||
preview_content
|
preview_content
|
||||||
else
|
else
|
||||||
@news_bulletins = NewsBulletin.can_display.where(_id: params[:id]).first
|
@news_bulletin = NewsBulletin.can_display.where(_id: params[:id]).first
|
||||||
get_categorys
|
get_categorys
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue