diff --git a/src/admin/js/utilities.js b/src/admin/js/utilities.js index c5f887159..33da89e80 100644 --- a/src/admin/js/utilities.js +++ b/src/admin/js/utilities.js @@ -352,8 +352,8 @@ StatusHelperPlugin.install = function (Vue, options = {}) { statuses: [ { name: tainacan_plugin.i18n['status_publish'], slug: 'publish' }, // { name: tainacan_plugin.i18n['status_private'], slug: 'private' }, - // { name: tainacan_plugin.i18n['status_draft'], slug: 'draft' }, - // { name: tainacan_plugin.i18n['status_trash'], slug: 'trash' } + { name: tainacan_plugin.i18n['status_draft'], slug: 'draft' }, + { name: tainacan_plugin.i18n['status_trash'], slug: 'trash' } ], getIcon(status) { switch (status) { @@ -383,14 +383,18 @@ StatusHelperPlugin.install = function (Vue, options = {}) { this.statuses.push(loadedStatus['private']); this.statuses.concat(Object.values(loadedStatus).filter((status) => { - return !['publish','private','draft','trash'].includes(status.slug); + return !['publish','private', 'draft', 'trash'].includes(status.slug); })); - if (loadedStatus['draft'] != undefined) - this.statuses.push(loadedStatus['draft']); - - if (loadedStatus['trash'] != undefined) - this.statuses.push(loadedStatus['trash']); + // We always show draft and trash + this.statuses.push({ + name: tainacan_plugin.i18n['status_draft'], + slug: 'draft' + }); + this.statuses.push({ + name: tainacan_plugin.i18n['status_trash'], + slug: 'trash'} + ); }) .catch(error => { console.error( error ); diff --git a/src/admin/pages/lists/collections-page.vue b/src/admin/pages/lists/collections-page.vue index 8ce6c689c..4eeacbc6b 100644 --- a/src/admin/pages/lists/collections-page.vue +++ b/src/admin/pages/lists/collections-page.vue @@ -143,7 +143,7 @@ :key="index" @click="onChangeTab(statusOption.slug)" :class="{ 'is-active': status == statusOption.slug}" - :style="{ marginRight: statusOption.slug == 'private' ? 'auto' : '' }" + :style="{ marginRight: statusOption.slug == 'private' ? 'auto' : '', marginLeft: statusOption.slug == 'draft' ? 'auto' : '' }" v-tooltip="{ content: $i18n.getWithVariables('info_%s_tab_' + statusOption.slug,[$i18n.get('collections')]), autoHide: true, diff --git a/src/admin/pages/lists/items-page.vue b/src/admin/pages/lists/items-page.vue index 8268da3e5..157ded7a4 100644 --- a/src/admin/pages/lists/items-page.vue +++ b/src/admin/pages/lists/items-page.vue @@ -636,7 +636,7 @@ :key="index" @click="onChangeTab(statusOption.slug)" :class="{ 'is-active': status == statusOption.slug}" - :style="{ marginRight: statusOption.slug == 'private' ? 'auto' : '' }" + :style="{ marginRight: statusOption.slug == 'private' ? 'auto' : '', marginLeft: statusOption.slug == 'draft' ? 'auto' : '' }" v-tooltip="{ content: $i18n.getWithVariables('info_%s_tab_' + statusOption.slug,[$i18n.get('items')]), autoHide: true, diff --git a/src/admin/pages/lists/taxonomies-page.vue b/src/admin/pages/lists/taxonomies-page.vue index 905d3ead7..4aa119c5d 100644 --- a/src/admin/pages/lists/taxonomies-page.vue +++ b/src/admin/pages/lists/taxonomies-page.vue @@ -110,7 +110,7 @@ :key="index" @click="onChangeTab(statusOption.slug)" :class="{ 'is-active': status == statusOption.slug}" - :style="{ marginRight: statusOption.slug == 'private' ? 'auto' : '' }" + :style="{ marginRight: statusOption.slug == 'private' ? 'auto' : '', marginLeft: statusOption.slug == 'draft' ? 'auto' : '' }" v-tooltip="{ content: $i18n.getWithVariables('info_%s_tab_' + statusOption.slug,[$i18n.get('taxonomies')]), autoHide: true, diff --git a/src/admin/pages/lists/term-items-page.vue b/src/admin/pages/lists/term-items-page.vue index a40f2e41a..6aeb80007 100644 --- a/src/admin/pages/lists/term-items-page.vue +++ b/src/admin/pages/lists/term-items-page.vue @@ -614,7 +614,7 @@ :key="index" @click="onChangeTab(statusOption.slug)" :class="{ 'is-active': status == statusOption.slug}" - :style="{ marginRight: statusOption.slug == 'private' ? 'auto' : '' }" + :style="{ marginRight: statusOption.slug == 'private' ? 'auto' : '', marginLeft: statusOption.slug == 'draft' ? 'auto' : '' }" v-tooltip="{ content: $i18n.getWithVariables('info_%s_tab_' + statusOption.slug,[$i18n.get('items')]), autoHide: true,