diff --git a/recipes/drupal_cms_person/composer.json b/recipes/drupal_cms_person/composer.json index 9b1e2bf5bdf54f3cab2e1bdb5d0333f00efca321..5f15d890c40d16feb75413e7f4fc653071690b5c 100644 --- a/recipes/drupal_cms_person/composer.json +++ b/recipes/drupal_cms_person/composer.json @@ -5,6 +5,7 @@ "license": ["GPL-2.0-or-later"], "require": { "drupal/core": ">=10.4", + "drupal/add_content_by_bundle": "^1.2.2", "drupal/drupal_cms_page": "1.x-dev" } } diff --git a/recipes/drupal_cms_person/config/views.view.person_profiles.yml b/recipes/drupal_cms_person/config/views.view.person_profiles.yml index 83bb2485eecbc683b2dfb44ce14fb514a37601ec..d4b96dbf836bc85e1366af2d4da1e7cd3a0772de 100644 --- a/recipes/drupal_cms_person/config/views.view.person_profiles.yml +++ b/recipes/drupal_cms_person/config/views.view.person_profiles.yml @@ -5,6 +5,7 @@ dependencies: - core.entity_view_mode.node.card - node.type.person module: + - add_content_by_bundle - node - user id: person_profiles @@ -178,7 +179,21 @@ display: replica: false query_tags: { } relationships: { } - header: { } + header: + add_content_by_bundle: + id: add_content_by_bundle + table: views + field: add_content_by_bundle + relationship: none + group_type: group + admin_label: '' + plugin_id: add_content_by_bundle + label: 'Add a person profile' + empty: true + bundle: person + class: button + target: '' + width: 600 footer: { } display_extenders: { } cache_metadata: diff --git a/recipes/drupal_cms_person/recipe.yml b/recipes/drupal_cms_person/recipe.yml index 30e3869157a8b1d96c677ed0f818bafbcedc6afd..a34c83d5add7ed60fc4aa4dc7e139ba31be9a0f4 100644 --- a/recipes/drupal_cms_person/recipe.yml +++ b/recipes/drupal_cms_person/recipe.yml @@ -4,6 +4,7 @@ description: Adds a person profile content type. recipes: - drupal_cms_page install: + - add_content_by_bundle - menu_link_content - telephone config: diff --git a/recipes/drupal_cms_starter/tests/src/Functional/ListingPagesTest.php b/recipes/drupal_cms_starter/tests/src/Functional/ListingPagesTest.php index c0be151e28da33916fa29988d116cae445ca1f81..6e3be98c2206658b366c2e32fb52d022b75a635d 100644 --- a/recipes/drupal_cms_starter/tests/src/Functional/ListingPagesTest.php +++ b/recipes/drupal_cms_starter/tests/src/Functional/ListingPagesTest.php @@ -41,6 +41,7 @@ class ListingPagesTest extends BrowserTestBase { * ["drupal/drupal_cms_events", "event", "Events", "/events", "Add an event"] * ["drupal/drupal_cms_news", "news", "News", "/news", "Add a news item"] * ["drupal/drupal_cms_project", "project", "Projects", "/projects", "Add a project"] + * ["drupal/drupal_cms_person", "person", "People", "/people", "Add a person profile"] */ public function testListingPages(string $recipe, string $content_type, string $link_text, string $url, string $create_link_text): void { $dir = InstalledVersions::getInstallPath($recipe);