Create sorting select on SearchControl (not implemented yet)

This commit is contained in:
Mateus Machado Luna 2018-04-05 13:41:16 -03:00
parent 24ab20c81d
commit da20e797f6
2 changed files with 47 additions and 21 deletions

View File

@ -1,26 +1,43 @@
<template>
<div class="header-item">
<b-dropdown>
<button
class="button"
slot="trigger">
<span>{{ $i18n.get('label_table_fields') }}</span>
<b-icon icon="menu-down"/>
<span>
<div class="header-item">
<b-dropdown>
<button
class="button"
slot="trigger">
<span>{{ $i18n.get('label_table_fields') }}</span>
<b-icon icon="menu-down"/>
</button>
<b-dropdown-item
v-for="(column, index) in tableFields"
:key="index"
class="control"
custom>
<b-checkbox
@input="onChangeTableFields(column)"
v-model="column.visible"
:native-value="column.field">
{{ column.label }}
</b-checkbox>
</b-dropdown-item>
</b-dropdown>
</div>
<div class="header-item">
<b-field>
<b-select :placeholder="$i18n.get('label_sorting')">
<option
v-for="(field, index) in tableFields"
:value="field"
:key="index">
{{ field.label }}
</option>
</b-select>
<button>
<b-icon icon="sort-ascending"/>
</button>
<b-dropdown-item
v-for="(column, index) in tableFields"
:key="index"
class="control"
custom>
<b-checkbox
@input="onChangeTableFields(column)"
v-model="column.visible"
:native-value="column.field">
{{ column.label }}
</b-checkbox>
</b-dropdown-item>
</b-dropdown>
</div>
</b-field>
</div>
</span>
</template>
<script>
@ -78,3 +95,11 @@ export default {
}
</script>
<style>
.header-item {
display: inline-block;
padding-right: 8em;
}
</style>

View File

@ -132,6 +132,7 @@ return [
'label_no_parent_term' => __( 'No parent term', 'tainacan' ),
'label_term_without_name' => __( 'Term without name', 'tainacan' ),
'label_inherited' => __( 'Inherited', 'tainacan' ),
'label_sorting' => __( 'Sorting', 'tainacan' ),
// Instructions. More complex sentences to guide user and placeholders
'instruction_dragndrop_fields_collection' => __( 'Drag and drop Fields here to Collection.', 'tainacan' ),