Fix parser common to skip not found module_app
Do not show default widget if there's no data
This commit is contained in:
parent
cce68beff1
commit
315a24556c
|
@ -1,8 +1,9 @@
|
||||||
|
<% if @data.present? %>
|
||||||
<%= render :partial => 'shared/search_header',:locals=>{:items=>@data} %>
|
<%= render :partial => 'shared/search_header',:locals=>{:items=>@data} %>
|
||||||
|
|
||||||
<%= render @partial %>
|
<%= render @partial %>
|
||||||
<% if @paginate and !@data.blank? %>
|
<% if @paginate %>
|
||||||
<%= paginate @data, :param_name => :page_main, :params => {:same_page_id => @page_id} %>
|
<%= paginate @data, :param_name => :page_main, :params => {:same_page_id => @page_id} %>
|
||||||
<% elsif @page_part.module_app %>
|
<% elsif @page_part.module_app %>
|
||||||
<%= @page_part.module_app.get_registration.default_widget_setting.link_to_more_tag(request,params) %>
|
<%= @page_part.module_app.get_registration.default_widget_setting.link_to_more_tag(request,params) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
|
|
@ -286,8 +286,8 @@ module ParserCommon
|
||||||
when 'default_widget'
|
when 'default_widget'
|
||||||
"/panel/orbit_app/widget/#{part.widget_style}?inner=true"
|
"/panel/orbit_app/widget/#{part.widget_style}?inner=true"
|
||||||
else
|
else
|
||||||
raise ModuleAppError,"PagePart can't find ModuleApp" if part.module_app.nil?
|
# raise ModuleAppError,"PagePart can't find ModuleApp" if part.module_app.nil?
|
||||||
"/panel/#{part.module_app.key}/widget/#{part.widget_path}?inner=true"
|
"/panel/#{part.module_app.key}/widget/#{part.widget_path}?inner=true" rescue ''
|
||||||
end
|
end
|
||||||
|
|
||||||
categories_str=(!part[:category].blank? ? part[:category] : category).collect{|t| "category_id[]=#{t}"}.join('&')
|
categories_str=(!part[:category].blank? ? part[:category] : category).collect{|t| "category_id[]=#{t}"}.join('&')
|
||||||
|
|
Loading…
Reference in New Issue