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

wip

parent 35ff8f57
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,8 @@ class Communication::Block::Heading < ApplicationRecord
has_many :children,
class_name: 'Communication::Block::Heading',
foreign_key: :parent_id
has_many :blocks
has_many :blocks,
dependent: :nullify
DEFAULT_LEVEL = 2
......
......@@ -34,9 +34,6 @@
</textarea>
<% content_for :action_bar_left do %>
<%= destroy_link @block %>
<%= link_to 'Dependencies',
[:admin, @block],
class: button_classes('btn-light') if current_user.server_admin? %>
<% end %>
<% content_for :action_bar_right do %>
<%= submit f %>
......
......@@ -8,6 +8,13 @@ url = heading.persisted? ? admin_communication_heading_path(heading)
<%= f.input :title %>
<%= f.input :about_type, as: :hidden %>
<%= f.input :about_id, as: :hidden %>
<% content_for :action_bar_left do %>
<%= link_to t('delete'),
admin_communication_heading_path(heading),
method: :delete,
data: { confirm: t('please_confirm') },
class: button_classes_danger if can? :destroy, heading %>
<% end %>
<% content_for :action_bar_right do %>
<%= submit f %>
<% 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