Updates metadata type labels and taxonomies number box #483

This commit is contained in:
mateuswetah 2021-03-05 09:29:45 -03:00
parent 641d58f5c4
commit 7eefdc8abf
3 changed files with 14 additions and 2 deletions

View File

@ -14,6 +14,11 @@
</span> </span>
&nbsp;{{ $i18n.get(entityType) }} &nbsp;{{ $i18n.get(entityType) }}
</p> </p>
<p
v-if="entityType == 'taxonomies'"
class="subtitle is-6">
{{ $i18n.get('label_used') + ': ' + summary.totals[entityType].used + ' | ' + $i18n.get('label_not_used') + ': ' + summary.totals[entityType].not_used }}
</p>
<ul class="has-text-gray status-list"> <ul class="has-text-gray status-list">
<li <li
v-for="(statusOption, index) of $statusHelper.getStatuses()" v-for="(statusOption, index) of $statusHelper.getStatuses()"
@ -82,6 +87,9 @@ export default {
padding-left: 0; padding-left: 0;
padding-right: 0; padding-right: 0;
} }
.subtitle.is-6 {
margin-bottom: 0px;
}
.status-list { .status-list {
display: flex; display: flex;
justify-content: center; justify-content: center;

View File

@ -193,8 +193,8 @@ export default {
let metadataTypeLabels = []; let metadataTypeLabels = [];
for (const metadataType in this.metadata.totals.metadata_per_type) { for (const metadataType in this.metadata.totals.metadata_per_type) {
metadataTypeValues.push(this.metadata.totals.metadata_per_type[metadataType]); metadataTypeValues.push(this.metadata.totals.metadata_per_type[metadataType].count);
metadataTypeLabels.push(metadataType); metadataTypeLabels.push(this.metadata.totals.metadata_per_type[metadataType].name);
} }
this.metadataTypeChartSeries = metadataTypeValues; this.metadataTypeChartSeries = metadataTypeValues;

View File

@ -500,6 +500,10 @@ return apply_filters( 'tainacan-admin-i18n', [
'label_metadata_fill_distribution' => __( 'Metadata fill distribution', 'tainacan' ), 'label_metadata_fill_distribution' => __( 'Metadata fill distribution', 'tainacan' ),
'label_not_filled' => __( 'Not filled yet', 'tainacan' ), 'label_not_filled' => __( 'Not filled yet', 'tainacan' ),
'label_filled' => __( 'Already filled', 'tainacan' ), 'label_filled' => __( 'Already filled', 'tainacan' ),
/* translators: To be displayed with the number of Taxonomies not used in the colllection */
'label_not_used' => __( 'Not used', 'tainacan' ),
/* translators: To be displayed with the number of Taxonomies used in the colllection */
'label_used' => __( 'Used', 'tainacan' ),
// Instructions. More complex sentences to guide user and placeholders // Instructions. More complex sentences to guide user and placeholders
'instruction_delete_selected_collections' => __( 'Delete selected collections', 'tainacan' ), 'instruction_delete_selected_collections' => __( 'Delete selected collections', 'tainacan' ),