app/views/admin/communication/blocks/templates/timeline/_edit.html.erb
<%= block_component_edit block, :layout %>
<%= block_component_add_element block, t('.add_event') %>
<%= osuny_separator %>
<draggable class="mb-3"
:list="data.elements"
handle=".dragHandle">
<div v-for="(element, index) in data.elements" class="mb-2 ">
<div class="card draggable-item dragHandle m-0">
<div class="card-body">
<a>
<i class="<%= Icon::MOVE %> handle"></i>
{{ element.title }}
</a>
</div>
</div>
</div>
</draggable>
<%= osuny_separator %>
<div v-for="(element, index) in data.elements" class="d-flex mb-5 pb-5 border-bottom">
<div class="flex-fill">
<div class="row pure__row--small mb-n3">
<div class="col-lg-5">
<%= block_component_edit block, :title, template: @element %>
</div>
<div class="col-lg-7">
<%= block_component_edit block, :text, template: @element, summernote_config: 'mini' %>
</div>
</div>
</div>
<div>
<a class="btn btn-sm text-danger ms-3"
v-on:click="data.elements.splice(data.elements.indexOf(element), 1)"
title="<%= t '.remove_event' %>">
<i class="<%= Icon::DELETE %>"></i>
</a>
</div>
</div>
<div v-show="data.elements.length > 2">
<%= block_component_add_element block, t('.add_event') %>
</div>