From 6490856eac742c00e50eb8a97fa588615574acc1 Mon Sep 17 00:00:00 2001 From: Matt Poole Date: Fri, 11 Oct 2024 17:17:02 -0400 Subject: [PATCH 1/2] BSD fixes #303: Allowed uploading accreditations. --- composer.json | 3 +- composer.lock | 245 +++++++++++++----- composer.log | 2 + .../sync/config_pages.type.accreditations.yml | 17 ++ ...ay.config_pages.accreditations.default.yml | 35 +++ ...ay.config_pages.accreditations.default.yml | 47 ++++ ...ore.entity_view_mode.config_pages.full.yml | 13 + config/sync/core.extension.yml | 3 +- ...onfig_pages.accreditations.field_links.yml | 23 ++ ...onfig_pages.accreditations.field_logos.yml | 34 +++ ...field.storage.config_pages.field_links.yml | 19 ++ ...field.storage.config_pages.field_logos.yml | 28 ++ config/sync/user.role.anonymous.yml | 2 + config/sync/user.role.site_admin.yml | 2 + stories/components/footer/footer.html.twig | 49 ++-- .../custom/site_wrapper/site_wrapper.module | 1 + web/sites/default/settings.lando.php | 4 +- ...ges--field-links--accreditations.html.twig | 54 ++++ ...ges--field-logos--accreditations.html.twig | 50 ++++ 19 files changed, 538 insertions(+), 93 deletions(-) create mode 100644 config/sync/config_pages.type.accreditations.yml create mode 100644 config/sync/core.entity_form_display.config_pages.accreditations.default.yml create mode 100644 config/sync/core.entity_view_display.config_pages.accreditations.default.yml create mode 100644 config/sync/core.entity_view_mode.config_pages.full.yml create mode 100644 config/sync/field.field.config_pages.accreditations.field_links.yml create mode 100644 config/sync/field.field.config_pages.accreditations.field_logos.yml create mode 100644 config/sync/field.storage.config_pages.field_links.yml create mode 100644 config/sync/field.storage.config_pages.field_logos.yml create mode 100644 web/themes/custom/bixal_uswds/templates/field/field--config-pages--field-links--accreditations.html.twig create mode 100644 web/themes/custom/bixal_uswds/templates/field/field--config-pages--field-logos--accreditations.html.twig diff --git a/composer.json b/composer.json index 67fb5996..a6d47996 100644 --- a/composer.json +++ b/composer.json @@ -50,10 +50,10 @@ "cweagans/composer-patches": "^1.7", "drupal/admin_toolbar": "^3.4", "drupal/anchor_link": "^3.0@beta", - "drupal/autocomplete_deluxe": "^2.0", "drupal/chosen": "^4.0", "drupal/components": "^3.0@beta", "drupal/config_ignore": "^3.3", + "drupal/config_pages": "^2.16", "drupal/config_split": "^2.0", "drupal/cookies": "^1.2", "drupal/core-composer-scaffold": "^10.1", @@ -84,6 +84,7 @@ "drupal/search_api_solr": "^4.3", "drupal/seckit": "^2.0", "drupal/stable": "^2.0", + "drupal/svg_image_field": "^2.3", "drupal/twig_field_value": "^2.0", "drupal/twig_tweak": "^3.2", "drupal/view_unpublished": "^1.2", diff --git a/composer.lock b/composer.lock index 6eb57d6e..48d651f3 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "711a420f24d8d98b9b13da22122312cd", + "content-hash": "74a8ea70cade7a5b649823bf1701b830", "packages": [ { "name": "asm89/stack-cors", @@ -1685,73 +1685,6 @@ "issues": "https://www.drupal.org/project/issues/anchor_link" } }, - { - "name": "drupal/autocomplete_deluxe", - "version": "2.1.0", - "source": { - "type": "git", - "url": "https://git.drupalcode.org/project/autocomplete_deluxe.git", - "reference": "2.1.0" - }, - "dist": { - "type": "zip", - "url": "https://ftp.drupal.org/files/projects/autocomplete_deluxe-2.1.0.zip", - "reference": "2.1.0", - "shasum": "8f5d8224078740687cae9ee91e5613091e1dda5e" - }, - "require": { - "drupal/core": "^10.3 || ^11" - }, - "type": "drupal-module", - "extra": { - "drupal": { - "version": "2.1.0", - "datestamp": "1726599931", - "security-coverage": { - "status": "covered", - "message": "Covered by Drupal's security advisory policy" - } - } - }, - "notification-url": "https://packages.drupal.org/8/downloads", - "license": [ - "GPL-2.0-or-later" - ], - "authors": [ - { - "name": "Vardot", - "homepage": "https://www.drupal.org/vardot", - "role": "Maintenance for Drupal 8/9/10/11 versions" - }, - { - "name": "Mediacurrent", - "homepage": "https://www.drupal.org/mediacurrent", - "role": "Supporting organization" - }, - { - "name": "mohammed j. razem", - "homepage": "https://www.drupal.org/user/255384" - }, - { - "name": "mpriscella", - "homepage": "https://www.drupal.org/user/2354820" - }, - { - "name": "rajab natshah", - "homepage": "https://www.drupal.org/user/1414312" - }, - { - "name": "sepgil", - "homepage": "https://www.drupal.org/user/512828" - } - ], - "description": "Enhanced autocomplete using Jquery UI autocomplete.", - "homepage": "https://www.drupal.org/project/autocomplete_deluxe", - "support": { - "source": "http://cgit.drupalcode.org/autocomplete_deluxe", - "issues": "https://www.drupal.org/project/issues/autocomplete_deluxe" - } - }, { "name": "drupal/captcha", "version": "2.0.6", @@ -2088,6 +2021,67 @@ "issues": "http://drupal.org/project/config_ignore" } }, + { + "name": "drupal/config_pages", + "version": "2.16.0", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/config_pages.git", + "reference": "8.x-2.16" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/config_pages-8.x-2.16.zip", + "reference": "8.x-2.16", + "shasum": "7896a698c6b85ea0babc4676f0af82e2f2c885b3" + }, + "require": { + "drupal/core": "^8.5 | ^9 || ^10 || ^11" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "8.x-2.16", + "datestamp": "1723641125", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + }, + "drush": { + "services": { + "drush.services.yml": "^9" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "m.krestnicov", + "homepage": "https://www.drupal.org/user/3193903" + }, + { + "name": "Qwaygon", + "homepage": "https://www.drupal.org/user/636624" + }, + { + "name": "shumer", + "homepage": "https://www.drupal.org/user/2297432" + } + ], + "description": "ConfigPages module", + "homepage": "http://drupal.org/project/config_pages", + "keywords": [ + "Drupal" + ], + "support": { + "source": "http://cgit.drupalcode.org/config_pages", + "issues": "http://drupal.org/project/issues/config_pages" + } + }, { "name": "drupal/config_split", "version": "2.0.1", @@ -4402,6 +4396,76 @@ "source": "https://git.drupalcode.org/project/stable" } }, + { + "name": "drupal/svg_image_field", + "version": "2.3.3", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/svg_image_field.git", + "reference": "2.3.3" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/svg_image_field-2.3.3.zip", + "reference": "2.3.3", + "shasum": "0bd2ff25e745be388cf2106e363120bf746aa8fc" + }, + "require": { + "drupal/core": "^9.3 || ^10 || ^11", + "enshrined/svg-sanitize": "~0.15", + "php": ">=8.0" + }, + "require-dev": { + "drupal/stage_file_proxy": "^2.0" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "2.3.3", + "datestamp": "1716285826", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0+" + ], + "authors": [ + { + "name": "See contributors", + "homepage": "https://www.drupal.org/node/2863622/committers" + }, + { + "name": "dunot", + "homepage": "https://www.drupal.org/user/3562626" + }, + { + "name": "jwilson3", + "homepage": "https://www.drupal.org/user/220177" + }, + { + "name": "mandclu", + "homepage": "https://www.drupal.org/user/52136" + }, + { + "name": "romychvk", + "homepage": "https://www.drupal.org/user/361734" + }, + { + "name": "shmel210", + "homepage": "https://www.drupal.org/user/2600028" + } + ], + "description": "Provides SVG Image field.", + "homepage": "https://www.drupal.org/project/svg_image_field", + "support": { + "source": "https://git.drupalcode.org/project/svg_image_field", + "issues": "https://www.drupal.org/project/issues/svg_image_field" + } + }, { "name": "drupal/token", "version": "1.15.0", @@ -5109,6 +5173,51 @@ ], "time": "2023-10-06T06:47:41+00:00" }, + { + "name": "enshrined/svg-sanitize", + "version": "0.20.0", + "source": { + "type": "git", + "url": "https://github.com/darylldoyle/svg-sanitizer.git", + "reference": "068d9fcf912c88a0471d101d95a2caa87c50aee7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/darylldoyle/svg-sanitizer/zipball/068d9fcf912c88a0471d101d95a2caa87c50aee7", + "reference": "068d9fcf912c88a0471d101d95a2caa87c50aee7", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.5 || ^8.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "enshrined\\svgSanitize\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "Daryll Doyle", + "email": "daryll@enshrined.co.uk" + } + ], + "description": "An SVG sanitizer for PHP", + "support": { + "issues": "https://github.com/darylldoyle/svg-sanitizer/issues", + "source": "https://github.com/darylldoyle/svg-sanitizer/tree/0.20.0" + }, + "time": "2024-09-05T10:18:12+00:00" + }, { "name": "google/recaptcha", "version": "1.3.0", diff --git a/composer.log b/composer.log index e05503c4..d629f762 100644 --- a/composer.log +++ b/composer.log @@ -39,3 +39,5 @@ bb805ef6ca0a258d1c8306f0b36fafec|Matt Poole|feature/BSD-287-update-deps|Wed Sep 45572e7bbb597f5c3740a8c9063c9496|Matt Poole|feature/BSD-284-gdpr-compliance|Wed Sep 4 16:48:59 EDT 2024|./composer.sh require drupal/anchor_link:^3.0@beta a64a80ee97032a4a2898228866cf865f|Matt Poole|feature/BSD-284-gdpr-compliance|Wed Sep 4 16:49:08 EDT 2024|./composer.sh require northernco/ckeditor5-anchor-drupal e854b19c73ce4a93589f51c9e10dfd5c|Matt Poole|feature/BSD-300-update-deps|Tue Sep 24 13:02:32 EDT 2024|./composer.sh update +99a75b4859e0d6e103f45c5dc4a4bb2c|Matt Poole|feature/BSD-303-drupal-partner|Fri Oct 11 16:08:22 EDT 2024|./composer.sh require drupal/svg_image_field +320ac2f509ac26933a05babde466b2a9|Matt Poole|feature/BSD-303-drupal-partner|Fri Oct 11 17:14:30 EDT 2024|./composer.sh require drupal/config_pages diff --git a/config/sync/config_pages.type.accreditations.yml b/config/sync/config_pages.type.accreditations.yml new file mode 100644 index 00000000..79d7c8c7 --- /dev/null +++ b/config/sync/config_pages.type.accreditations.yml @@ -0,0 +1,17 @@ +uuid: 4b52e822-65df-42d9-b8d9-8245fc5acbfc +langcode: en +status: true +dependencies: { } +id: accreditations +label: Accreditations +token: false +context: + show_warning: true + group: + language: false + fallback: + language: '' +menu: + path: /admin/content/accreditations + weight: 0 + description: 'Add or remove accreditation links and images.' diff --git a/config/sync/core.entity_form_display.config_pages.accreditations.default.yml b/config/sync/core.entity_form_display.config_pages.accreditations.default.yml new file mode 100644 index 00000000..463230d9 --- /dev/null +++ b/config/sync/core.entity_form_display.config_pages.accreditations.default.yml @@ -0,0 +1,35 @@ +uuid: a605d9b4-8288-4858-9b43-d33dabbe70c9 +langcode: en +status: true +dependencies: + config: + - config_pages.type.accreditations + - field.field.config_pages.accreditations.field_links + - field.field.config_pages.accreditations.field_logos + module: + - link + - svg_image_field +id: config_pages.accreditations.default +targetEntityType: config_pages +bundle: accreditations +mode: default +content: + field_links: + type: link_default + weight: 0 + region: content + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + field_logos: + type: svg_image_field_widget + weight: 1 + region: content + settings: + progress_indicator: throbber + preview_image_max_width: 300 + preview_image_max_height: 300 + third_party_settings: { } +hidden: + label: true diff --git a/config/sync/core.entity_view_display.config_pages.accreditations.default.yml b/config/sync/core.entity_view_display.config_pages.accreditations.default.yml new file mode 100644 index 00000000..361c605e --- /dev/null +++ b/config/sync/core.entity_view_display.config_pages.accreditations.default.yml @@ -0,0 +1,47 @@ +uuid: f910d084-dd5d-42f4-867f-0bcaca3ea8dd +langcode: en +status: true +dependencies: + config: + - config_pages.type.accreditations + - field.field.config_pages.accreditations.field_links + - field.field.config_pages.accreditations.field_logos + module: + - link + - svg_image_field +id: config_pages.accreditations.default +targetEntityType: config_pages +bundle: accreditations +mode: default +content: + field_links: + type: link + label: hidden + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: nofollow + target: _blank + third_party_settings: { } + weight: 0 + region: content + field_logos: + type: svg_image_field_formatter + label: hidden + settings: + inline: false + apply_dimensions: false + width: 25 + height: 25 + enable_alt: true + enable_title: true + link: '' + force_fill: false + sanitize: true + sanitize_remote: false + third_party_settings: { } + weight: 1 + region: content +hidden: + search_api_excerpt: true diff --git a/config/sync/core.entity_view_mode.config_pages.full.yml b/config/sync/core.entity_view_mode.config_pages.full.yml new file mode 100644 index 00000000..4c90674e --- /dev/null +++ b/config/sync/core.entity_view_mode.config_pages.full.yml @@ -0,0 +1,13 @@ +uuid: 73fc7b35-ffda-4ac5-8e91-7590960ce829 +langcode: en +status: true +dependencies: + module: + - config_pages +_core: + default_config_hash: VYERDzPNi1-oUm7KMLjol4oLcjbHr-onKbitt4dZuN0 +id: config_pages.full +label: Full +description: '' +targetEntityType: config_pages +cache: true diff --git a/config/sync/core.extension.yml b/config/sync/core.extension.yml index e70a9555..a0e00719 100644 --- a/config/sync/core.extension.yml +++ b/config/sync/core.extension.yml @@ -5,7 +5,6 @@ module: admin_toolbar_search: 0 admin_toolbar_tools: 0 anchor_link: 0 - autocomplete_deluxe: 0 bixal_captcha: 0 bixal_default_content: 0 bixal_drush_commands: 0 @@ -21,6 +20,7 @@ module: components: 0 config: 0 config_ignore: 0 + config_pages: 0 config_split: 0 config_translation: 0 contact: 0 @@ -77,6 +77,7 @@ module: search_api_solr: 0 seckit: 0 site_wrapper: 0 + svg_image_field: 0 system: 0 taxonomy: 0 text: 0 diff --git a/config/sync/field.field.config_pages.accreditations.field_links.yml b/config/sync/field.field.config_pages.accreditations.field_links.yml new file mode 100644 index 00000000..05b3b8e8 --- /dev/null +++ b/config/sync/field.field.config_pages.accreditations.field_links.yml @@ -0,0 +1,23 @@ +uuid: 2069d0da-062e-4810-a8e5-10e6c11e2822 +langcode: en +status: true +dependencies: + config: + - config_pages.type.accreditations + - field.storage.config_pages.field_links + module: + - link +id: config_pages.accreditations.field_links +field_name: field_links +entity_type: config_pages +bundle: accreditations +label: Links +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + title: 2 + link_type: 17 +field_type: link diff --git a/config/sync/field.field.config_pages.accreditations.field_logos.yml b/config/sync/field.field.config_pages.accreditations.field_logos.yml new file mode 100644 index 00000000..d9ec9be9 --- /dev/null +++ b/config/sync/field.field.config_pages.accreditations.field_logos.yml @@ -0,0 +1,34 @@ +uuid: 3bd53193-c392-430c-89a3-7046f59f0cd8 +langcode: en +status: true +dependencies: + config: + - config_pages.type.accreditations + - field.storage.config_pages.field_logos + module: + - svg_image_field +id: config_pages.accreditations.field_logos +field_name: field_logos +entity_type: config_pages +bundle: accreditations +label: Logos +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:file' + handler_settings: { } + file_directory: accreditations + file_extensions: svg + max_filesize: '' + alt_field: true + alt_field_required: true + title_field: false + title_field_required: false + default_image: + uuid: '' + alt: '' + title: '' +field_type: svg_image_field diff --git a/config/sync/field.storage.config_pages.field_links.yml b/config/sync/field.storage.config_pages.field_links.yml new file mode 100644 index 00000000..6906cd7c --- /dev/null +++ b/config/sync/field.storage.config_pages.field_links.yml @@ -0,0 +1,19 @@ +uuid: 2bd37382-9108-4804-97b8-0a845da5f911 +langcode: en +status: true +dependencies: + module: + - config_pages + - link +id: config_pages.field_links +field_name: field_links +entity_type: config_pages +type: link +settings: { } +module: link +locked: false +cardinality: -1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/field.storage.config_pages.field_logos.yml b/config/sync/field.storage.config_pages.field_logos.yml new file mode 100644 index 00000000..6fa2ce83 --- /dev/null +++ b/config/sync/field.storage.config_pages.field_logos.yml @@ -0,0 +1,28 @@ +uuid: 45cd88eb-fd24-4b76-8d9e-fd3003637a2e +langcode: en +status: true +dependencies: + module: + - config_pages + - file + - svg_image_field +id: config_pages.field_logos +field_name: field_logos +entity_type: config_pages +type: svg_image_field +settings: + target_type: file + display_field: false + display_default: false + uri_scheme: public + default_image: + uuid: '' + alt: '' + title: '' +module: svg_image_field +locked: false +cardinality: -1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/sync/user.role.anonymous.yml b/config/sync/user.role.anonymous.yml index be23ffb4..d08c7075 100644 --- a/config/sync/user.role.anonymous.yml +++ b/config/sync/user.role.anonymous.yml @@ -3,6 +3,7 @@ langcode: en status: true dependencies: module: + - config_pages - contact - media - system @@ -15,4 +16,5 @@ is_admin: false permissions: - 'access content' - 'access site-wide contact form' + - 'view accreditations config page entity' - 'view media' diff --git a/config/sync/user.role.site_admin.yml b/config/sync/user.role.site_admin.yml index 512e5a31..48903a70 100644 --- a/config/sync/user.role.site_admin.yml +++ b/config/sync/user.role.site_admin.yml @@ -5,6 +5,7 @@ dependencies: module: - admin_toolbar_search - captcha + - config_pages - contact - cookies - google_tag @@ -36,5 +37,6 @@ permissions: - 'configure cookies config' - 'configure cookies widget texts' - 'create url aliases' + - 'edit accreditations config page entity' - 'use admin toolbar search' - 'view the administration theme' diff --git a/stories/components/footer/footer.html.twig b/stories/components/footer/footer.html.twig index 6e4fc7a3..ac8f7121 100644 --- a/stories/components/footer/footer.html.twig +++ b/stories/components/footer/footer.html.twig @@ -42,31 +42,38 @@ + {% endif %} diff --git a/web/modules/custom/site_wrapper/site_wrapper.module b/web/modules/custom/site_wrapper/site_wrapper.module index 54d0c8cc..8467c3ca 100644 --- a/web/modules/custom/site_wrapper/site_wrapper.module +++ b/web/modules/custom/site_wrapper/site_wrapper.module @@ -152,6 +152,7 @@ function template_preprocess_site_wrapper_footer(array &$variables): void { ], ], ]; + } /** diff --git a/web/sites/default/settings.lando.php b/web/sites/default/settings.lando.php index 46d0daba..cf4cab60 100644 --- a/web/sites/default/settings.lando.php +++ b/web/sites/default/settings.lando.php @@ -43,7 +43,7 @@ throw new \Exception('The Database type "' . $lando_info->database->type . "' is not automatically able to be configured."); } } - +/* if (isset($lando_info->cache->type)) { switch ($lando_info->cache->type) { case 'redis': @@ -69,7 +69,7 @@ throw new \Exception('The Cache type "' . $lando_info->cache->type . "' is not automatically able to be configured."); } -} +}*/ if (isset($lando_info->search->type)) { switch ($lando_info->search->type) { diff --git a/web/themes/custom/bixal_uswds/templates/field/field--config-pages--field-links--accreditations.html.twig b/web/themes/custom/bixal_uswds/templates/field/field--config-pages--field-links--accreditations.html.twig new file mode 100644 index 00000000..a21ee997 --- /dev/null +++ b/web/themes/custom/bixal_uswds/templates/field/field--config-pages--field-links--accreditations.html.twig @@ -0,0 +1,54 @@ +{# +/** + * @file + * Theme override for a field. + * + * To override output, copy the "field.html.twig" from the templates directory + * to your theme's directory and customize it, just like customizing other + * Drupal templates such as page.html.twig or node.html.twig. + * + * Instead of overriding the theming for all fields, you can also just override + * theming for a subset of fields using + * @link themeable Theme hook suggestions. @endlink For example, + * here are some theme hook suggestions that can be used for a field_foo field + * on an article node type: + * - field--node--field-foo--article.html.twig + * - field--node--field-foo.html.twig + * - field--node--article.html.twig + * - field--field-foo.html.twig + * - field--text-with-summary.html.twig + * - field.html.twig + * + * Available variables: + * - attributes: HTML attributes for the containing element. + * - label_hidden: Whether to show the field label or not. + * - title_attributes: HTML attributes for the title. + * - label: The label for the field. + * - multiple: TRUE if a field can contain multiple items. + * - items: List of all the field items. Each item contains: + * - attributes: List of HTML attributes for each item. + * - content: The field item's content. + * - entity_type: The entity type to which the field belongs. + * - field_name: The name of the field. + * - field_type: The type of the field. + * - label_display: The display settings for the label. + * + * + * @see template_preprocess_field() + */ +#} + +{% if label_hidden %} + +{% else %} + {{ label }} + +{% endif %} diff --git a/web/themes/custom/bixal_uswds/templates/field/field--config-pages--field-logos--accreditations.html.twig b/web/themes/custom/bixal_uswds/templates/field/field--config-pages--field-logos--accreditations.html.twig new file mode 100644 index 00000000..9919b72c --- /dev/null +++ b/web/themes/custom/bixal_uswds/templates/field/field--config-pages--field-logos--accreditations.html.twig @@ -0,0 +1,50 @@ +{# +/** + * @file + * Theme override for a field. + * + * To override output, copy the "field.html.twig" from the templates directory + * to your theme's directory and customize it, just like customizing other + * Drupal templates such as page.html.twig or node.html.twig. + * + * Instead of overriding the theming for all fields, you can also just override + * theming for a subset of fields using + * @link themeable Theme hook suggestions. @endlink For example, + * here are some theme hook suggestions that can be used for a field_foo field + * on an article node type: + * - field--node--field-foo--article.html.twig + * - field--node--field-foo.html.twig + * - field--node--article.html.twig + * - field--field-foo.html.twig + * - field--text-with-summary.html.twig + * - field.html.twig + * + * Available variables: + * - attributes: HTML attributes for the containing element. + * - label_hidden: Whether to show the field label or not. + * - title_attributes: HTML attributes for the title. + * - label: The label for the field. + * - multiple: TRUE if a field can contain multiple items. + * - items: List of all the field items. Each item contains: + * - attributes: List of HTML attributes for each item. + * - content: The field item's content. + * - entity_type: The entity type to which the field belongs. + * - field_name: The name of the field. + * - field_type: The type of the field. + * - label_display: The display settings for the label. + * + * + * @see template_preprocess_field() + */ +#} + +{% if label_hidden %} + {% for item in items %} + {{ item.content }} + {% endfor %} +{% else %} + {{ label }} + {% for item in items %} + {{ item.content }} + {% endfor %} +{% endif %} From 18495667459b09e42318d3c3522f1aad73df125d Mon Sep 17 00:00:00 2001 From: Matt Poole Date: Fri, 11 Oct 2024 17:21:14 -0400 Subject: [PATCH 2/2] BSD fixes #303: Allowed exporting config_pages and exported them. --- .lando.dist.yml | 1 + .../276db8f2-793f-403c-99f3-06386d106160.yml | 45 +++ .../06223de4-3425-4892-931e-2df4f3d616d3.yml | 27 ++ .../63a7579d-b46c-46fd-82ba-666092fb4767.yml | 27 ++ .../6efaede2-cc20-4bca-b456-e6bf40b14306.yml | 27 ++ .../association_certified_bronze_badge_0.svg | 1 + .../content/file/cmmi.svg | 321 ++++++++++++++++++ .../content/file/iso-certified.svg | 287 ++++++++++++++++ 8 files changed, 736 insertions(+) create mode 100644 web/modules/custom/bixal_default_content/content/config_pages/276db8f2-793f-403c-99f3-06386d106160.yml create mode 100644 web/modules/custom/bixal_default_content/content/file/06223de4-3425-4892-931e-2df4f3d616d3.yml create mode 100644 web/modules/custom/bixal_default_content/content/file/63a7579d-b46c-46fd-82ba-666092fb4767.yml create mode 100644 web/modules/custom/bixal_default_content/content/file/6efaede2-cc20-4bca-b456-e6bf40b14306.yml create mode 100644 web/modules/custom/bixal_default_content/content/file/association_certified_bronze_badge_0.svg create mode 100644 web/modules/custom/bixal_default_content/content/file/cmmi.svg create mode 100644 web/modules/custom/bixal_default_content/content/file/iso-certified.svg diff --git a/.lando.dist.yml b/.lando.dist.yml index f3794811..ffbacffd 100644 --- a/.lando.dist.yml +++ b/.lando.dist.yml @@ -45,6 +45,7 @@ tooling: - 'drush default-content:export-references node --folder=modules/custom/bixal_default_content/content' - 'drush default-content:export-references menu_link_content --folder=modules/custom/bixal_default_content/content' - 'drush default-content:export-references media --folder=modules/custom/bixal_default_content/content' + - 'drush default-content:export-references config_pages --folder=modules/custom/bixal_default_content/content' patch: service: appserver description: Apply composer patches or regenerate lock hash. diff --git a/web/modules/custom/bixal_default_content/content/config_pages/276db8f2-793f-403c-99f3-06386d106160.yml b/web/modules/custom/bixal_default_content/content/config_pages/276db8f2-793f-403c-99f3-06386d106160.yml new file mode 100644 index 00000000..28716505 --- /dev/null +++ b/web/modules/custom/bixal_default_content/content/config_pages/276db8f2-793f-403c-99f3-06386d106160.yml @@ -0,0 +1,45 @@ +_meta: + version: '1.0' + entity_type: config_pages + uuid: 276db8f2-793f-403c-99f3-06386d106160 + bundle: accreditations + depends: + 63a7579d-b46c-46fd-82ba-666092fb4767: file + 6efaede2-cc20-4bca-b456-e6bf40b14306: file + 06223de4-3425-4892-931e-2df4f3d616d3: file +default: + label: + - + value: Accreditations + type: + - + target_id: accreditations + context: + - + value: 'a:0:{}' + field_links: + - + uri: 'https://www.sba.gov/business-guide/grow-your-business/women-owned-businesses' + title: 'Woman-owned small business ' + options: { } + - + uri: 'https://www.iso.org/standard/62085.html' + title: 'ISO 9001:2015 ' + options: { } + - + uri: 'https://cmmiinstitute.com/learning/appraisals/levels' + title: 'CMMI Level 3 ' + options: { } + field_logos: + - + entity: 63a7579d-b46c-46fd-82ba-666092fb4767 + alt: 'ISO certified logo' + title: '' + - + entity: 6efaede2-cc20-4bca-b456-e6bf40b14306 + alt: 'Capability Maturity Model Integration Level 3 logo' + title: '' + - + entity: 06223de4-3425-4892-931e-2df4f3d616d3 + alt: 'Drupal Certified Bronze Partner' + title: '' diff --git a/web/modules/custom/bixal_default_content/content/file/06223de4-3425-4892-931e-2df4f3d616d3.yml b/web/modules/custom/bixal_default_content/content/file/06223de4-3425-4892-931e-2df4f3d616d3.yml new file mode 100644 index 00000000..78e9d6ae --- /dev/null +++ b/web/modules/custom/bixal_default_content/content/file/06223de4-3425-4892-931e-2df4f3d616d3.yml @@ -0,0 +1,27 @@ +_meta: + version: '1.0' + entity_type: file + uuid: 06223de4-3425-4892-931e-2df4f3d616d3 + default_langcode: en +default: + uid: + - + target_id: 1 + filename: + - + value: association_certified_bronze_badge_0.svg + uri: + - + value: 'public://accreditations/association_certified_bronze_badge_0.svg' + filemime: + - + value: image/svg+xml + filesize: + - + value: 27414 + status: + - + value: true + created: + - + value: 1728680347 diff --git a/web/modules/custom/bixal_default_content/content/file/63a7579d-b46c-46fd-82ba-666092fb4767.yml b/web/modules/custom/bixal_default_content/content/file/63a7579d-b46c-46fd-82ba-666092fb4767.yml new file mode 100644 index 00000000..384ff13e --- /dev/null +++ b/web/modules/custom/bixal_default_content/content/file/63a7579d-b46c-46fd-82ba-666092fb4767.yml @@ -0,0 +1,27 @@ +_meta: + version: '1.0' + entity_type: file + uuid: 63a7579d-b46c-46fd-82ba-666092fb4767 + default_langcode: en +default: + uid: + - + target_id: 1 + filename: + - + value: iso-certified.svg + uri: + - + value: 'public://accreditations/iso-certified.svg' + filemime: + - + value: image/svg+xml + filesize: + - + value: 27097 + status: + - + value: true + created: + - + value: 1728677424 diff --git a/web/modules/custom/bixal_default_content/content/file/6efaede2-cc20-4bca-b456-e6bf40b14306.yml b/web/modules/custom/bixal_default_content/content/file/6efaede2-cc20-4bca-b456-e6bf40b14306.yml new file mode 100644 index 00000000..e7ccbaeb --- /dev/null +++ b/web/modules/custom/bixal_default_content/content/file/6efaede2-cc20-4bca-b456-e6bf40b14306.yml @@ -0,0 +1,27 @@ +_meta: + version: '1.0' + entity_type: file + uuid: 6efaede2-cc20-4bca-b456-e6bf40b14306 + default_langcode: en +default: + uid: + - + target_id: 1 + filename: + - + value: cmmi.svg + uri: + - + value: 'public://accreditations/cmmi.svg' + filemime: + - + value: image/svg+xml + filesize: + - + value: 19104 + status: + - + value: true + created: + - + value: 1728677375 diff --git a/web/modules/custom/bixal_default_content/content/file/association_certified_bronze_badge_0.svg b/web/modules/custom/bixal_default_content/content/file/association_certified_bronze_badge_0.svg new file mode 100644 index 00000000..1371d6f1 --- /dev/null +++ b/web/modules/custom/bixal_default_content/content/file/association_certified_bronze_badge_0.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/web/modules/custom/bixal_default_content/content/file/cmmi.svg b/web/modules/custom/bixal_default_content/content/file/cmmi.svg new file mode 100644 index 00000000..e6f4039b --- /dev/null +++ b/web/modules/custom/bixal_default_content/content/file/cmmi.svg @@ -0,0 +1,321 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/web/modules/custom/bixal_default_content/content/file/iso-certified.svg b/web/modules/custom/bixal_default_content/content/file/iso-certified.svg new file mode 100644 index 00000000..eec2f00e --- /dev/null +++ b/web/modules/custom/bixal_default_content/content/file/iso-certified.svg @@ -0,0 +1,287 @@ + +image/svg+xmlISO9001:2015CERTIFICATIONTM