Model menus, modal edit and layout improvements
This commit is contained in:
parent
7b0f05a448
commit
70500c49a1
35 changed files with 1079 additions and 148 deletions
|
|
@ -50,4 +50,8 @@ class ApplicationController < ActionController::Base
|
|||
def initialize_sidebar_items
|
||||
[]
|
||||
end
|
||||
|
||||
def render_modal(action: action_name)
|
||||
render action, layout: "modal" if turbo_frame_request_id == "modal"
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -19,7 +19,9 @@ class ElementsController < ApplicationController
|
|||
end
|
||||
|
||||
# GET /elements/1/edit
|
||||
def edit; end
|
||||
def edit
|
||||
render_modal
|
||||
end
|
||||
|
||||
# POST /elements
|
||||
def create
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ class PagesController < ApplicationController
|
|||
|
||||
# GET /pages/1/edit
|
||||
def edit
|
||||
render_modal
|
||||
end
|
||||
|
||||
# POST /pages
|
||||
|
|
|
|||
|
|
@ -18,7 +18,9 @@ class SuccessCriteriaController < ApplicationController
|
|||
end
|
||||
|
||||
# GET /success_criteria/1/edit
|
||||
def edit; end
|
||||
def edit
|
||||
render_modal()
|
||||
end
|
||||
|
||||
# POST /success_criteria
|
||||
def create
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue