From 1dcc399cf5b310dcea827f49f44fa32701fb5522 Mon Sep 17 00:00:00 2001 From: Jesse Leite Date: Thu, 10 Sep 2020 16:31:29 -0400 Subject: [PATCH 01/16] Add save and continue dropdown component. --- .../publish/SaveAndContinueOptions.vue | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 resources/js/components/publish/SaveAndContinueOptions.vue diff --git a/resources/js/components/publish/SaveAndContinueOptions.vue b/resources/js/components/publish/SaveAndContinueOptions.vue new file mode 100644 index 0000000000..7daea7fbf0 --- /dev/null +++ b/resources/js/components/publish/SaveAndContinueOptions.vue @@ -0,0 +1,73 @@ + + + + + From bbf3945ff6ae8e5c3a6af83373feb76506b2a5f6 Mon Sep 17 00:00:00 2001 From: Jesse Leite Date: Thu, 10 Sep 2020 16:31:53 -0400 Subject: [PATCH 02/16] Add save and continue dropdown to entry publish form. --- .../js/components/entries/PublishForm.vue | 35 +++++++++++++------ 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/resources/js/components/entries/PublishForm.vue b/resources/js/components/entries/PublishForm.vue index d53274946d..294839933c 100644 --- a/resources/js/components/entries/PublishForm.vue +++ b/resources/js/components/entries/PublishForm.vue @@ -20,15 +20,19 @@ @@ -384,13 +383,33 @@ export default { saveText() { if (this.revisionsEnabled) return __('Save Changes'); - if (this.published) return __('Save & Publish'); + if (this.isCreating && this.published && this.afterSaveOption === 'create_another') { + return __('Publish & Create Another') + } + if (this.isCreating && this.published && this.afterSaveOption === 'continue_editing') { + return __('Publish & Continue') + } - if (!this.published && this.initialPublished) return __('Save & Unpublish'); + if (this.isCreating && this.published && ! this.afterSaveOption) { + return __('Publish') + } + + if (this.published && this.afterSaveOption === 'create_another') { + return __('Save & Create Another') + } + if (this.published && this.afterSaveOption === 'continue_editing') { + return __('Save & Continue') + } + + if (this.isUnpublishing) return __('Save & Unpublish'); return __('Save'); }, + isUnpublishing() { + return !this.published && this.initialPublished; + }, + saveButtonClass() { return { 'btn': this.revisionsEnabled, From d2571ac6bb81ec20a190a17114cbccdb1714605e Mon Sep 17 00:00:00 2001 From: Jack McDade Date: Fri, 11 Sep 2020 11:46:05 -0400 Subject: [PATCH 10/16] =?UTF-8?q?=F0=9F=93=9D=20Continue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/js/components/entries/PublishForm.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/js/components/entries/PublishForm.vue b/resources/js/components/entries/PublishForm.vue index 6611c135a1..7abb4749d1 100644 --- a/resources/js/components/entries/PublishForm.vue +++ b/resources/js/components/entries/PublishForm.vue @@ -387,7 +387,7 @@ export default { return __('Publish & Create Another') } if (this.isCreating && this.published && this.afterSaveOption === 'continue_editing') { - return __('Publish & Continue') + return __('Publish & Continue Editing') } if (this.isCreating && this.published && ! this.afterSaveOption) { @@ -398,7 +398,7 @@ export default { return __('Save & Create Another') } if (this.published && this.afterSaveOption === 'continue_editing') { - return __('Save & Continue') + return __('Save & Continue Editing') } if (this.isUnpublishing) return __('Save & Unpublish'); From 5f0b8cafc9738a9b5bdde8c0551531cc28703a04 Mon Sep 17 00:00:00 2001 From: Jack McDade Date: Fri, 11 Sep 2020 11:55:18 -0400 Subject: [PATCH 11/16] =?UTF-8?q?=F0=9F=93=9D=20I=20only=20missed=20half?= =?UTF-8?q?=20of=20the=20states.=20NBD.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../js/components/entries/PublishForm.vue | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/resources/js/components/entries/PublishForm.vue b/resources/js/components/entries/PublishForm.vue index 7abb4749d1..17b0b96aaf 100644 --- a/resources/js/components/entries/PublishForm.vue +++ b/resources/js/components/entries/PublishForm.vue @@ -390,6 +390,18 @@ export default { return __('Publish & Continue Editing') } + if (this.isCreating && ! this.published && this.afterSaveOption === 'create_another') { + return ('Save & Create Another'); + } + + if (this.isCreating && ! this.published && this.afterSaveOption === 'continue_editing') { + return ('Save & Continue Editing'); + } + + if (this.isCreating && ! this.published && ! this.afterSaveOption) { + return ('Save'); + } + if (this.isCreating && this.published && ! this.afterSaveOption) { return __('Publish') } @@ -401,7 +413,17 @@ export default { return __('Save & Continue Editing') } - if (this.isUnpublishing) return __('Save & Unpublish'); + if (this.isUnpublishing && this.afterSaveOption === 'create_another') { + return __('Unpublish & Create Another') + } + + if (this.isUnpublishing && this.afterSaveOption === 'continue_editing') { + return __('Unpublish & Continue Editing') + } + + if (this.isUnpublishing && ! this.afterSaveOption) { + return __('Unpublish') + } return __('Save'); }, From 5a197ee5823b1fdd0dba724cf4c2ee6e764495bb Mon Sep 17 00:00:00 2001 From: Jack McDade Date: Fri, 11 Sep 2020 13:21:34 -0400 Subject: [PATCH 12/16] =?UTF-8?q?=F0=9F=92=84=20Using=20buttons=20instead?= =?UTF-8?q?=20of=20text=20to=20convey=20next=20action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../js/components/entries/PublishForm.vue | 82 +++++++------------ .../components/publish/SaveButtonOptions.vue | 13 ++- resources/svg/micro-add-circle.svg | 1 + resources/svg/micro-arrow-go-back.svg | 1 + 4 files changed, 43 insertions(+), 54 deletions(-) create mode 100644 resources/svg/micro-add-circle.svg create mode 100644 resources/svg/micro-arrow-go-back.svg diff --git a/resources/js/components/entries/PublishForm.vue b/resources/js/components/entries/PublishForm.vue index 17b0b96aaf..65ff5b5360 100644 --- a/resources/js/components/entries/PublishForm.vue +++ b/resources/js/components/entries/PublishForm.vue @@ -181,15 +181,16 @@