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 %>
|
||||
<% if @paginate and !@data.blank? %>
|
||||
<% if @paginate %>
|
||||
<%= paginate @data, :param_name => :page_main, :params => {:same_page_id => @page_id} %>
|
||||
<% elsif @page_part.module_app %>
|
||||
<%= @page_part.module_app.get_registration.default_widget_setting.link_to_more_tag(request,params) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -286,8 +286,8 @@ module ParserCommon
|
|||
when 'default_widget'
|
||||
"/panel/orbit_app/widget/#{part.widget_style}?inner=true"
|
||||
else
|
||||
raise ModuleAppError,"PagePart can't find ModuleApp" if part.module_app.nil?
|
||||
"/panel/#{part.module_app.key}/widget/#{part.widget_path}?inner=true"
|
||||
# raise ModuleAppError,"PagePart can't find ModuleApp" if part.module_app.nil?
|
||||
"/panel/#{part.module_app.key}/widget/#{part.widget_path}?inner=true" rescue ''
|
||||
end
|
||||
|
||||
categories_str=(!part[:category].blank? ? part[:category] : category).collect{|t| "category_id[]=#{t}"}.join('&')
|
||||
|
|
Reference in New Issue