Skip to content
Snippets Groups Projects
Commit 25cb47ce authored by Arnaud Levy's avatar Arnaud Levy
Browse files

Menu with title

parent 84374c20
No related branches found
No related tags found
No related merge requests found
...@@ -14,6 +14,11 @@ class Admin::Communication::Websites::MenusController < Admin::Communication::We ...@@ -14,6 +14,11 @@ class Admin::Communication::Websites::MenusController < Admin::Communication::We
breadcrumb breadcrumb
end end
def static
@about = @menu
render layout: false
end
def new def new
@menu.website = @website @menu.website = @website
breadcrumb breadcrumb
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
<% content_for :action_bar_left do %> <% content_for :action_bar_left do %>
<%= destroy_link @menu %> <%= destroy_link @menu %>
<%= static_link static_admin_communication_website_menu_path(@menu) %>
<% end %> <% end %>
<% content_for :action_bar_right do %> <% content_for :action_bar_right do %>
......
<%= raw @about.items <%
.root title = @about.title
.ordered items = @about.items
.map(&:to_static_hash) .root
.compact .ordered
.to_yaml %> .map(&:to_static_hash)
.compact
hash = {
'title' => title,
'items' => items
}
%>
<%= raw hash.to_yaml %>
...@@ -43,6 +43,9 @@ namespace :communication do ...@@ -43,6 +43,9 @@ namespace :communication do
end end
end end
resources :menus, controller: 'websites/menus', path: '/:lang/menus' do resources :menus, controller: 'websites/menus', path: '/:lang/menus' do
member do
get :static
end
resources :items, controller: 'websites/menus/items', except: :index do resources :items, controller: 'websites/menus/items', except: :index do
collection do collection do
get :kind_switch get :kind_switch
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment