Temporary fix: show for default widget
- the task migrate:recreate_page_parts must be run - "create_parts" in page.rb must be unprotected
This commit is contained in:
		
							parent
							
								
									7105f103e1
								
							
						
					
					
						commit
						29b8fec89a
					
				| 
						 | 
				
			
			@ -11,6 +11,9 @@ class DefaultWidgetController< OrbitWidgetController
 | 
			
		|||
  end
 | 
			
		||||
 | 
			
		||||
  def default_widget
 | 
			
		||||
    if !params[:id].blank?
 | 
			
		||||
      redirect_to eval("#{@page_part.module_app.widget_fields_link_method['title']['method']}('#{params[:id]}', {inner: true})")
 | 
			
		||||
    else
 | 
			
		||||
      @tag_class = nil
 | 
			
		||||
 | 
			
		||||
      @default_widget = @page_part.module_app.get_default_widget
 | 
			
		||||
| 
						 | 
				
			
			@ -35,7 +38,7 @@ class DefaultWidgetController< OrbitWidgetController
 | 
			
		|||
        @tag_class = 'default_widget_typeC'
 | 
			
		||||
        render "typeC"
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -75,6 +75,7 @@ class PagesController < ApplicationController
 | 
			
		|||
    end
 | 
			
		||||
    @item = Item.where(module_app_id: module_app.id, app_frontend_url: params[:app_action]).all_of("tag" => {"$in" => [nil,'']},"category" => { "$in" => [nil,'']}).first unless @item
 | 
			
		||||
    @item = Item.where(module_app_id: module_app.id, app_frontend_url: params[:app_action]).first unless @item
 | 
			
		||||
    @item = Item.where(module_app_id: module_app.id, app_frontend_url: 'default_widget').first unless @item
 | 
			
		||||
    raise PageError,'Missing Frontend Page' if @item.nil?
 | 
			
		||||
  end
 | 
			
		||||
  
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -116,6 +116,7 @@ module ParserFrontEnd
 | 
			
		|||
      if (content["main"] == "true" && !page.module_app.nil?)
 | 
			
		||||
        if page.app_frontend_url == 'default_widget'
 | 
			
		||||
          url = "/panel/orbit_app/widget/#{page.frontend_style}?inner=true"
 | 
			
		||||
          url << "&id=\#{params[:id] if params[:id] && !params[:id].eql?(page.id.to_s)}"
 | 
			
		||||
        else
 | 
			
		||||
           url = "/panel/#{page.module_app.key}/front_end/#{page.app_frontend_url}\#{(\"/\" + params[:id]) if params[:id] && !params[:id].eql?(page.id.to_s)}\#{(\"/\" + params[:controller_action]) if params[:controller_action] && params[:id]}?inner=true"
 | 
			
		||||
        end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue