Adds button 'Create another item' to item page when comming from a recently created item. Ref. #237.
This commit is contained in:
parent
84d785c03a
commit
a3f8ddcb97
|
@ -845,9 +845,12 @@ export default {
|
|||
this.isLoading = false;
|
||||
|
||||
if (!this.isOnSequenceEdit) {
|
||||
if (this.form.status != 'trash')
|
||||
this.$router.push(this.$routerHelper.getItemPath(this.form.collectionId, this.itemId));
|
||||
if (this.form.status != 'trash') {
|
||||
if (previousStatus == 'auto-draft')
|
||||
this.$router.push({ path: this.$routerHelper.getItemPath(this.form.collectionId, this.itemId), query: { recent: true } });
|
||||
else
|
||||
this.$router.push(this.$routerHelper.getItemPath(this.form.collectionId, this.itemId));
|
||||
} else
|
||||
this.$router.push(this.$routerHelper.getCollectionPath(this.form.collectionId));
|
||||
}
|
||||
})
|
||||
|
|
|
@ -339,6 +339,13 @@
|
|||
</div>
|
||||
<div class="footer">
|
||||
<div class="form-submission-footer">
|
||||
<router-link
|
||||
v-if="item.current_user_can_edit && $route.query.recent == true"
|
||||
class="button is-secondary"
|
||||
style="margin-right: auto;"
|
||||
:to="{ path: $routerHelper.getNewItemPath(collectionId)}">
|
||||
{{ $i18n.get('label_create_another_item') }}
|
||||
</router-link>
|
||||
<router-link
|
||||
v-if="item.current_user_can_edit"
|
||||
class="button is-secondary"
|
||||
|
|
|
@ -409,6 +409,7 @@ return apply_filters( 'tainacan-admin-i18n', [
|
|||
'label_comparator' => __( 'Comparator', 'tainacan' ),
|
||||
'label_table_of_items' => __( 'Table of Items', 'tainacan' ),
|
||||
'label_duplicate_item' => __( 'Duplicate item', 'tainacan' ),
|
||||
'label_create_another_item' => __( 'Create another item', 'tainacan' ),
|
||||
|
||||
// Instructions. More complex sentences to guide user and placeholders
|
||||
'instruction_delete_selected_collections' => __( 'Delete selected collections', 'tainacan' ),
|
||||
|
|
Loading…
Reference in New Issue