diff --git a/resources/js/components/navigation/View.vue b/resources/js/components/navigation/View.vue index 8ddb9a4df3..1c3c266658 100644 --- a/resources/js/components/navigation/View.vue +++ b/resources/js/components/navigation/View.vue @@ -129,6 +129,7 @@ :site="site" :collections="collections" :max-items="maxPagesSelection" + :can-select-across-sites="canSelectAcrossSites" @selected="entriesSelected" /> @@ -203,7 +204,8 @@ export default { site: { type: String, required: true }, sites: { type: Array, required: true }, blueprint: { type: Object, required: true }, - canEdit: { type: Boolean, required: true } + canEdit: { type: Boolean, required: true }, + canSelectAcrossSites: { type: Boolean, required: true } }, data() { diff --git a/resources/js/components/structures/PageSelector.vue b/resources/js/components/structures/PageSelector.vue index 7bf07c4fab..666d56b4c1 100644 --- a/resources/js/components/structures/PageSelector.vue +++ b/resources/js/components/structures/PageSelector.vue @@ -28,6 +28,7 @@ export default { props: { site: String, collections: Array, + canSelectAcrossSites: Boolean, maxItems: { type: Number, required: false, @@ -39,6 +40,7 @@ export default { config: { type: 'entries', collections: this.collections, + select_across_sites: this.canSelectAcrossSites, }, columns: [ { label: __('Title'), field: 'title' }, diff --git a/resources/lang/en/fieldtypes.php b/resources/lang/en/fieldtypes.php index a2776c2c38..050eb22567 100644 --- a/resources/lang/en/fieldtypes.php +++ b/resources/lang/en/fieldtypes.php @@ -76,6 +76,7 @@ 'entries.config.collections' => 'Choose which collections the user can select from.', 'entries.config.query_scopes' => 'Choose which query scopes should be applied when retrieving selectable entries.', 'entries.config.search_index' => 'An appropriate search index will be used automatically where possible, but you may define an explicit one.', + 'entries.config.select_across_sites' => 'Allow selecting entries from other sites. This also disables localizing options on the front-end. Learn more in the [documentation](https://statamic.dev/fieldtypes/entries#select-across-sites).', 'entries.title' => 'Entries', 'float.title' => 'Float', 'form.config.max_items' => 'Set a maximum number of selectable forms.', diff --git a/resources/lang/en/messages.php b/resources/lang/en/messages.php index b4c985c413..7610ff84c4 100644 --- a/resources/lang/en/messages.php +++ b/resources/lang/en/messages.php @@ -167,6 +167,7 @@ 'navigation_configure_collections_instructions' => 'Enable linking to entries in these collections.', 'navigation_configure_handle_instructions' => 'Used to reference this navigation on the frontend. It\'s non-trivial to change later.', 'navigation_configure_intro' => 'Navigations are multi-level lists of links that can be used to build navbars, footers, sitemaps, and other forms of frontend navigation.', + 'navigation_configure_select_across_sites' => 'Allow selecting entries from other sites.', 'navigation_configure_settings_intro' => 'Enable linking to collections, set a max depth, and other behaviors.', 'navigation_configure_title_instructions' => 'We recommend a name that matches where it will be used, like "Main Nav" or "Footer Nav".', 'navigation_documentation_instructions' => 'Learn more about building, configuring, and rendering Navigations.', diff --git a/resources/views/navigation/show.blade.php b/resources/views/navigation/show.blade.php index d262d04511..277d06323d 100644 --- a/resources/views/navigation/show.blade.php +++ b/resources/views/navigation/show.blade.php @@ -18,6 +18,7 @@ :expects-root="{{ $str::bool($expectsRoot) }}" :blueprint="{{ json_encode($blueprint) }}" :can-edit="{{ Statamic\Support\Str::bool($user->can('edit', $nav)) }}" + :can-select-across-sites="{{ Statamic\Support\Str::bool($nav->canSelectAcrossSites()) }}" >