fix widget.
This commit is contained in:
parent
194b42c1e4
commit
71fc85c24e
|
@ -102,9 +102,19 @@ module ParserFrontEnd
|
||||||
when 'text'
|
when 'text'
|
||||||
ret << part.content_translations[locale.to_s] rescue ''
|
ret << part.content_translations[locale.to_s] rescue ''
|
||||||
when 'module_widget'
|
when 'module_widget'
|
||||||
url = "/panel/\#{part.module_app.key}/widget/\#{part.widget_path}?inner=true"
|
# url = "/panel/\#{part.module_app.key}/widget/\#{part.widget_path}?inner=true"
|
||||||
|
# options = "&part_id=\#{part.id}&category_id=\#{!part[:category].blank? ? part[:category].blank? : category}&tag_id=\#{!part[:tag].blank? ? part[:tag] : tag}&page=\#{params[:page]}&search_query=\#{params[:search_query]}&part_title=\#{Rack::Utils.escape(part_title).gsub(\"\+\", \"\%20\") rescue nil}"
|
||||||
|
# ret << "<orbit_front path='#{url + options}' part_id=#{part.id}></div>"
|
||||||
|
url = case part.widget_path
|
||||||
|
when 'default_widget'
|
||||||
|
"/panel/orbit_app/widget/\#{part.widget_style}?inner=true"
|
||||||
|
else
|
||||||
|
"/panel/\#{part.module_app.key}/widget/\#{part.widget_path}?inner=true"
|
||||||
|
end
|
||||||
|
|
||||||
options = "&part_id=\#{part.id}&category_id=\#{!part[:category].blank? ? part[:category].blank? : category}&tag_id=\#{!part[:tag].blank? ? part[:tag] : tag}&page=\#{params[:page]}&search_query=\#{params[:search_query]}&part_title=\#{Rack::Utils.escape(part_title).gsub(\"\+\", \"\%20\") rescue nil}"
|
options = "&part_id=\#{part.id}&category_id=\#{!part[:category].blank? ? part[:category].blank? : category}&tag_id=\#{!part[:tag].blank? ? part[:tag] : tag}&page=\#{params[:page]}&search_query=\#{params[:search_query]}&part_title=\#{Rack::Utils.escape(part_title).gsub(\"\+\", \"\%20\") rescue nil}"
|
||||||
ret << "<orbit_front path='#{url + options}' part_id=#{part.id}></div>"
|
ret << "<orbit_front path='#{url + options}' part_id=#{part.id} class='dymanic_load widget'></orbit_front>"
|
||||||
|
|
||||||
when 'public_r_tag'
|
when 'public_r_tag'
|
||||||
ret << send("generate_#{part.public_r_tag}s", part.public_r_tag_object_id, page)
|
ret << send("generate_#{part.public_r_tag}s", part.public_r_tag_object_id, page)
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue