Small fix on FieldList label.

This commit is contained in:
mateuswetah 2018-03-12 15:50:21 -03:00
parent db2d785dbc
commit a4f9043a34
2 changed files with 23 additions and 25 deletions

View File

@ -14,31 +14,29 @@
class="active-field-item" class="active-field-item"
:class="{'not-sortable-item': field.id == undefined || openedFieldId == field.id, 'inherited-field': field.collection_id != collectionId}" :class="{'not-sortable-item': field.id == undefined || openedFieldId == field.id, 'inherited-field': field.collection_id != collectionId}"
v-for="(field, index) in activeFieldList" :key="index"> v-for="(field, index) in activeFieldList" :key="index">
<div class="handle"> <div class="handle">
<b-icon type="is-gray" class="is-pulled-left" icon="drag"></b-icon> <b-icon type="is-gray" class="is-pulled-left" icon="drag"></b-icon>
<span class="field-name">{{ field.name }}</span> <span class="field-name">{{ field.name }}</span>
<span class="label-details">{{ $i18n.get(field.field_type_object.component)}}<span class="loading-spinner" v-if="field.id == undefined"></span></span> <span class="label-details">{{ $i18n.get(field.field_type_object.component)}}<span class="loading-spinner" v-if="field.id == undefined"></span></span>
<span class="controls"> <span class="controls">
<b-switch size="is-small" v-model="field.disabled" @input="onChangeEnable($event, index)">{{ field.disabled ? $i18n.get('label_disabled') : $i18n.get('label_enabled') }}</b-switch> <b-switch size="is-small" v-model="field.disabled" @input="onChangeEnable($event, index)">{{ field.disabled ? $i18n.get('label_disabled') : $i18n.get('label_enabled') }}</b-switch>
<a @click.prevent="removeField(field)" v-if="field.id != undefined"> <a @click.prevent="removeField(field)" v-if="field.id != undefined">
<b-icon icon="delete"></b-icon> <b-icon icon="delete"></b-icon>
</a> </a>
<a @click.prevent="editField(field)" v-if="field.id != undefined"> <a @click.prevent="editField(field)" v-if="field.id != undefined">
<b-icon icon="pencil" v-if="field.id != undefined"></b-icon> <b-icon icon="pencil" v-if="field.id != undefined"></b-icon>
</a> </a>
</span> </span>
</div>
<b-field v-if="openedFieldId == field.id">
<field-edition-form
:collectionId="collectionId"
:isRepositoryLevel="isRepositoryLevel"
@onEditionFinished="onEditionFinished()"
@onEditionCanceled="onEditionCanceled()"
:field="editForm"></field-edition-form>
</b-field>
</div> </div>
<b-field v-if="openedFieldId == field.id">
<!-- <div class="not-sortable-item" slot="footer">{{ $i18n.get('instruction_dragndrop_fields_collection') }}</div> --> <field-edition-form
:collectionId="collectionId"
:isRepositoryLevel="isRepositoryLevel"
@onEditionFinished="onEditionFinished()"
@onEditionCanceled="onEditionCanceled()"
:field="editForm"></field-edition-form>
</b-field>
</div>
</draggable> </draggable>
</b-field> </b-field>
</div> </div>

View File

@ -76,7 +76,7 @@ return [
'label_items_per_page' => __('Items per Page:', 'tainacan'), 'label_items_per_page' => __('Items per Page:', 'tainacan'),
'label_active_fields' => __('Active Fields', 'tainacan'), 'label_active_fields' => __('Active Fields', 'tainacan'),
'label_available_fields' => __('Available Fields', 'tainacan'), 'label_available_fields' => __('Available Fields', 'tainacan'),
'label_available_fields_types' => __('Available Field Types', 'tainacan'), 'label_available_field_types' => __('Available Field Types', 'tainacan'),
'label_active_filters' => __('Active Filters', 'tainacan'), 'label_active_filters' => __('Active Filters', 'tainacan'),
'label_available_filters' => __('Available Filters', 'tainacan'), 'label_available_filters' => __('Available Filters', 'tainacan'),
'label_available_filter_types' => __('Available Filter Types', 'tainacan'), 'label_available_filter_types' => __('Available Filter Types', 'tainacan'),