Merge branch 'develop' of https://github.com/tainacan/tainacan into develop
This commit is contained in:
commit
1747b53b2d
|
@ -47,7 +47,7 @@
|
|||
<div class="shown-items">
|
||||
{{
|
||||
$i18n.get('info_showing_items') +
|
||||
(itemsPerPage*(page - 1) + 1) +
|
||||
getFirstItem() +
|
||||
$i18n.get('info_to') +
|
||||
getLastItemNumber() +
|
||||
$i18n.get('info_of') + totalItems + '.'
|
||||
|
@ -100,6 +100,11 @@ export default {
|
|||
isLoading: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
page( value ){
|
||||
this.page = ( value > 0 ) ? value : 1;
|
||||
}
|
||||
},
|
||||
components: {
|
||||
ItemsList,
|
||||
FiltersItemsList
|
||||
|
@ -185,6 +190,12 @@ export default {
|
|||
let last = (Number(this.itemsPerPage*(this.page - 1)) + Number(this.itemsPerPage));
|
||||
|
||||
return last > this.totalItems ? this.totalItems : last;
|
||||
},
|
||||
getFirstItem(){
|
||||
if( this.totalItems == 0 )
|
||||
return 0;
|
||||
|
||||
return ( this.itemsPerPage * ( this.page - 1 ) + 1)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
|
@ -99,6 +99,7 @@
|
|||
getValuesPlainText( field_id ){
|
||||
return axios.get( '/collection/' + this.collection + '/fields/' + field_id + '?fetch=all_field_values')
|
||||
.then( res => {
|
||||
if( res.data ){
|
||||
for (let metadata of res.data) {
|
||||
let index = this.options.findIndex(itemMetadata => itemMetadata.value === metadata.mvalue);
|
||||
if( index < 0 ){
|
||||
|
@ -106,6 +107,7 @@
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.log(error);
|
||||
|
|
Loading…
Reference in New Issue