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
breadcrumb
end
def static
@about = @menu
render layout: false
end
def new
@menu.website = @website
breadcrumb
......
......@@ -22,6 +22,7 @@
<% content_for :action_bar_left do %>
<%= destroy_link @menu %>
<%= static_link static_admin_communication_website_menu_path(@menu) %>
<% end %>
<% content_for :action_bar_right do %>
......
<%= raw @about.items
.root
.ordered
.map(&:to_static_hash)
.compact
.to_yaml %>
<%
title = @about.title
items = @about.items
.root
.ordered
.map(&:to_static_hash)
.compact
hash = {
'title' => title,
'items' => items
}
%>
<%= raw hash.to_yaml %>
......@@ -43,6 +43,9 @@ namespace :communication do
end
end
resources :menus, controller: 'websites/menus', path: '/:lang/menus' do
member do
get :static
end
resources :items, controller: 'websites/menus/items', except: :index do
collection do
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