diff --git a/app/views/default_widget/default_widget.html.erb b/app/views/default_widget/default_widget.html.erb index 835246bd0..8188b2ddd 100644 --- a/app/views/default_widget/default_widget.html.erb +++ b/app/views/default_widget/default_widget.html.erb @@ -1,8 +1,9 @@ -<%= render :partial => 'shared/search_header',:locals=>{:items=>@data} %> - -<%= render @partial %> -<% if @paginate and !@data.blank? %> - <%= 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) %> +<% if @data.present? %> + <%= render :partial => 'shared/search_header',:locals=>{:items=>@data} %> + <%= render @partial %> + <% 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 %> diff --git a/lib/parsers/parser_common.rb b/lib/parsers/parser_common.rb index 7a5310b2f..e8d869894 100644 --- a/lib/parsers/parser_common.rb +++ b/lib/parsers/parser_common.rb @@ -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('&')