app/views/admin/communication/blocks/templates/programs/_edit.html.erb
<%= block_component_edit block, :layout %>
<div class="mb-5">
<%= osuny_label t('admin.communication.blocks.display_options.title') %>
<%= block_component_edit block, :option_image, label: Education::Program::Localization.human_attribute_name(:featured_image) %>
<%= block_component_edit block, :option_summary, label: t('admin.summary.label') %>
<%= block_component_edit block, :option_diploma, label: Education::Program.human_attribute_name(:diploma) %>
</div>
<%= block_component_add_element block, t('.add') %>
<draggable :list="data.elements" handle=".dragHandle" class="mb-3">
<div v-for="(element, index) in data.elements" class="d-flex draggable-item">
<div>
<a class="btn ps-0 pt-0 dragHandle" title="<%= t('admin.communication.block.drag_and_drop') %>">
<i class="<%= Icon::DRAG %> handle"></i>
</a>
</div>
<div class="flex-fill mb-n3">
<%= block_component_edit block, :id, template: @element, label: false %>
</div>
<div>
<a class="btn btn-sm text-danger ms-3"
v-on:click="data.elements.splice(data.elements.indexOf(element), 1)"
title="Supprimer">
<i class="<%= Icon::DELETE %>"></i>
</a>
</div>
</div>
</draggable>
<div v-show="data.elements.length > 2">
<%= block_component_add_element block, t('.add') %>
</div>