diff --git a/app/views/admin/communication/blocks/templates/features/_edit.html.erb b/app/views/admin/communication/blocks/templates/features/_edit.html.erb index 07b6ccd85f88840fcfd959752fba540d5dcfcb6e..e9a60f1c569c753464c16a159eeab64dd613273f 100644 --- a/app/views/admin/communication/blocks/templates/features/_edit.html.erb +++ b/app/views/admin/communication/blocks/templates/features/_edit.html.erb @@ -4,27 +4,32 @@ </div> </div> -<draggable :list="data.elements" handle=".dragHandle" class="mb-3 row <%= if_appstack 'list-group' %>"> - <div v-for="(element, index) in data.elements" class="col-lg-4 draggable-item <%= if_appstack 'list-group-item' %>"> +<%= block_component_add_element t('.add_element') %> +<draggable :list="data.elements" handle=".dragHandle" class="mb-3 <%= if_appstack 'list-group' %>"> + <div v-for="(element, index) in data.elements" class="draggable-item <%= if_appstack 'list-group-item' %>"> <div> - <a class="btn ps-0 pt-0 dragHandle"> - <i class="<%= Icon::DRAG %> pt-1 handle"></i> - </a>{{element.title}} + <a class="btn ps-0 pt-0 dragHandle"><i class="<%= Icon::DRAG %> handle"></i></a>{{element.title}} <a class="btn btn-sm text-danger float-end pe-0" v-on:click="data.elements.splice(data.elements.indexOf(element), 1)" title="<%= t '.remove_element' %>"> <i class="<%= Icon::DELETE %>"></i> </a> </div> - <div> - <%= block_component_edit :title, template: @element %> - <%= block_component_edit :description, template: @element %> - <%= block_component_edit :image, template: @element %> - <div v-show="element.image.id != ''"> + <div class="row pure__row--small"> + <div class="col-lg-4"> + <%= block_component_edit :title, template: @element %> + <%= block_component_edit :description, template: @element, rows: 5 %> + </div> + <div class="col-lg-4"> + <%= block_component_edit :image, template: @element %> + </div> + <div class="col-lg-4" v-show="element.image.id != ''"> <%= block_component_edit :alt, template: @element %> <%= block_component_edit :credit, template: @element %> </div> </div> </div> </draggable> -<%= block_component_add_element t('.add_element') %> +<div v-show="data.elements.length > 2"> + <%= block_component_add_element t('.add_element') %> +</div> \ No newline at end of file