fix widget bug

This commit is contained in:
Matthew K. Fu JuYuan 2012-12-24 14:04:32 +08:00
parent 8381941d51
commit b89cd80800
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,7 @@ module ParserFrontEnd
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 = "&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}></div>"
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)