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

tree

parent f90e3772
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,6 @@
display: inline
& > .treeview__children
display: none
margin-left: 15px
&--opened
& > .treeview__label
......
<% pages.each do |page| %>
<li class="<%= page.has_children? ? 'treeview__branch js-treeview-branch' : 'treeview__leaf' %>" data-id="<%= page.id %>">
<div class="d-flex align-items-center treeview__label">
<div class="d-flex align-items-center treeview__label border-bottom p-1">
<% if page.has_children? %>
<%= link_to children_admin_communication_website_page_path(website_id: page.website.id, id: page.id),
class: 'js-treeview-element', remote: true do %>
<span class="open_btn">+</span>
<span class="close_btn">-</span>
<%= page %>
class: 'js-treeview-element d-inline-block p-1 ps-0', style: 'width: 22px', remote: true do %>
<span class="open_btn"><i class="fas fa-folder"></i></span>
<span class="close_btn"><i class="fas fa-folder-open"></i></span>
<% end %>
<% else %>
<%= page %>
<% end %>
<%= link_to 'Voir', admin_communication_website_page_path(website_id: page.website.id, id: page.id), class: button_classes %>
<%= page %>
<%= link_to 'Voir', admin_communication_website_page_path(website_id: page.website.id, id: page.id), class: button_classes('btn-sm ms-3') %>
</div>
<% if page.has_children? %>
<ul class="list-unstyled treeview__children js-treeview-children">
<ul class="list-unstyled treeview__children js-treeview-children ms-4">
<li>loading...</li>
</ul>
<% end %>
......
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