.container
h3.title {{ schema.title }}
.flex.align-center.justify-space-around
.left(v-if="enabledNew")
button.button.is-primary(@click="newModel")
i.icon.fa.fa-plus
| {{ schema.resources.addCaption || _("Add") }}
.right {{ _("SelectedOfAll", { selected: selected.length, all: rows.length } ) }}
data-table(:schema="schema.table", :rows="rows", :order="order", :search="search", :selected="selected", :select="select", :select-all="selectAll")
.form(v-if="model")
vue-form-generator(:schema='schema.form', :model='model', :options='options', :multiple="selected.length > 1", ref="form", :is-new-model="isNewModel")
.errors.text-center
div.alert.alert-danger(v-for="(item, index) in validationErrors", :key="index") {{ item.field.label }}:
strong {{ item.error }}
.buttons.flex.justify-space-around
button.button.primary(@click="saveModel", :disabled="!enabledSave")
i.icon.fa.fa-save
| {{ schema.resources.saveCaption || _("Save") }}
button.button.outline(@click="cloneModel", :disabled="!enabledClone")
i.icon.fa.fa-copy
| {{ schema.resources.cloneCaption || _("Clone") }}
button.button.danger(@click="deleteModel", :disabled="!enabledDelete")
i.icon.fa.fa-trash
| {{ schema.resources.deleteCaption || _("Delete") }}