Adds tooltip to specify collection items status

This commit is contained in:
mateuswetah 2021-12-03 17:45:42 -03:00
parent c4e961e9cf
commit b3e67a47a3
1 changed files with 8 additions and 4 deletions

View File

@ -34,10 +34,10 @@
aria-role="listitem">
{{ $i18n.get('label_delete_selected_collections') }}
</b-dropdown-item>
<b-dropdown-item
<!-- <b-dropdown-item
disabled
aria-role="listitem">{{ $i18n.get('label_edit_selected_collections') + ' (Not ready)' }}
</b-dropdown-item>
</b-dropdown-item> -->
</b-dropdown>
</div>
</div>
@ -292,7 +292,7 @@
show: 500,
hide: 300,
},
content: getTotalItems(collection.total_items),
content: getTotalItemsDetailed(collection.total_items),
autoHide: false,
classes: ['tainacan-tooltip', 'tooltip', 'repository-tooltip'],
placement: 'auto-start'
@ -317,7 +317,8 @@
content: $i18n.get('edit'),
autoHide: true,
classes: ['tainacan-tooltip', 'tooltip', 'repository-tooltip'],
placement: 'auto'
placement: 'auto',
html: true
}"
class="icon">
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-settings"/>
@ -414,6 +415,9 @@ export default {
getTotalItems(total_items) {
return Number(total_items['publish']) + Number(total_items['private']) + Number(total_items['draft']);
},
getTotalItemsDetailed(total_items) {
return this.$i18n.get('status_public') + ': ' + total_items['publish'] + '<br> ' + this.$i18n.get('status_private') + ': ' + total_items['private'] + '<br> ' + this.$i18n.get('status_draft') + ': ' + total_items['draft'];
},
deleteOneCollection(collectionId) {
this.$buefy.modal.open({
parent: this,