From 6c6e6e6b6c60c2067549e341895c512e75668b5f Mon Sep 17 00:00:00 2001 From: Duncan McClean <19637309+duncanmcclean@users.noreply.github.com> Date: Wed, 10 Feb 2021 16:27:16 +0000 Subject: [PATCH] Hide 'Visit URL' button when collection has no route (#3080) --- resources/js/components/entries/BaseCreateForm.vue | 2 ++ resources/js/components/entries/PublishForm.vue | 3 ++- resources/views/entries/create.blade.php | 1 + resources/views/entries/edit.blade.php | 1 + src/Fieldtypes/Entries.php | 1 + src/Http/Controllers/CP/Collections/EntriesController.php | 2 ++ 6 files changed, 9 insertions(+), 1 deletion(-) diff --git a/resources/js/components/entries/BaseCreateForm.vue b/resources/js/components/entries/BaseCreateForm.vue index ca80e9cd0f..fe4bea5d7d 100644 --- a/resources/js/components/entries/BaseCreateForm.vue +++ b/resources/js/components/entries/BaseCreateForm.vue @@ -7,6 +7,7 @@ method="post" :initial-title="__('Create Entry')" :collection-handle="collectionHandle" + :collection-has-routes="collectionHasRoutes" :initial-fieldset="fieldset" :initial-values="values" :initial-meta="meta" @@ -31,6 +32,7 @@ export default { props: [ 'actions', 'collectionHandle', + 'collectionHasRoutes', 'fieldset', 'values', 'meta', diff --git a/resources/js/components/entries/PublishForm.vue b/resources/js/components/entries/PublishForm.vue index 62e3e1634d..b4cb1f6b3d 100644 --- a/resources/js/components/entries/PublishForm.vue +++ b/resources/js/components/entries/PublishForm.vue @@ -98,7 +98,7 @@ >