Skip to content
Snippets Groups Projects
Unverified Commit 63d4ebd0 authored by Arnaud Levy's avatar Arnaud Levy Committed by GitHub
Browse files

Merge pull request #1132 from noesya/menu-item-with-parent

Amélioration de la création d'élément de menu
parents 730e67f0 354c0445
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,6 @@
<%= f.error_notification %>
<%= f.error_notification message: f.object.errors[:base].to_sentence if f.object.errors[:base].present? %>
<%= f.input :parent_id, as: :hidden, wrapper: false %>
<%= f.input :kind,
as: :hidden,
input_html: {
......@@ -35,6 +34,11 @@
<div class="row pure__row--small">
<div class="col-lg-6">
<%= f.input :title %>
<%= f.association :parent,
collection: collection_tree(@item.menu.items, @item),
label_method: ->(p) { sanitize p[:label] },
value_method: ->(p) { p[:id] } %>
</div>
<div class="col-lg-6">
<div data-kind-if="url">
......
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