Fix new page form
Redirect to home when not authorized Get only module_apps with app_pages for new and edit page Change web_resource.json
This commit is contained in:
1 parent
01d0c002f5
commit
e40c76bf5f
4 files changed
+4
-5
No files matched your search
@@ -20,14 +20,14 @@ class Admin::PagesController < ApplicationController
|
||||
def new
|
||||
@item = Page.new
|
||||
@item.parent = Item.find(params[:parent_id]) rescue nil
|
||||
@apps = ModuleApp.all
|
||||
@apps = ModuleApp.excludes(app_pages: nil).entries
|
||||
@designs = Design.all.entries
|
||||
@design = Design.first
|
||||
end
|
||||
|
||||
def edit
|
||||
@item = Page.find(params[:id])
|
||||
@apps = ModuleApp.all
|
||||
@apps = ModuleApp.excludes(app_pages: nil).entries
|
||||
@designs = Design.all.entries
|
||||
@design = @item.design ? @item.design : @designs.first
|
||||
@app_frontend_urls = @item.module_app.app_pages if @item.module_app
|
||||
|
||||
Reference in new issue
Block a user