From 29eee90abacba70239efe94b937e1809ce74518a Mon Sep 17 00:00:00 2001 From: Josh Wagner Date: Fri, 19 Nov 2021 13:52:45 -0500 Subject: [PATCH 01/87] [EPAD8-1494] add scrollable tables --- .../table--scrollable/table--scrollable.md | 24 ++++++ .../table--scrollable/table--scrollable.twig | 13 ++++ .../table--scrollable/table--scrollable.yml | 74 +++++++++++++++++++ .../_patterns/03-uswds/table/table.twig | 2 + 4 files changed, 113 insertions(+) create mode 100644 services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/table/table--scrollable/table--scrollable.md create mode 100644 services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/table/table--scrollable/table--scrollable.twig create mode 100644 services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/table/table--scrollable/table--scrollable.yml diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/table/table--scrollable/table--scrollable.md b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/table/table--scrollable/table--scrollable.md new file mode 100644 index 0000000000..388dfc6ff8 --- /dev/null +++ b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/table/table--scrollable/table--scrollable.md @@ -0,0 +1,24 @@ +--- +el: .usa-table--scrollable +title: Scrollable Table +state: inreview +--- +See [https://designsystem.digital.gov/components/table/]() and +[https://components.designsystem.digital.gov/components/detail/tables.html](). + +__Variables:__ +* modifier_classes: [string] Optional additional CSS classes. +* caption: [string] Table caption. +* scrollable: [boolean] Sets scrollable container. +* header: [array] Header cells. Each item is an object containing: + * attributes: [string] HTML attributes of the cell. + * content: [string] Content of the cell. +* footer: [array] Footer cells. Each item is an object containing: + * attributes: [string] HTML attributes of the cell. + * content: [string] Content of the cell. +* rows: [array] Table rows. Each item is an object containing: + * attributes: [string] HTML attributes of the row. + * cells: [array] Table cells. Each item is an object containing: + * tag: [string] HTML tag that wraps the cell. (`th` or `td`) + * attributes: [string] HTML attributes of the cell. + * content: [string] Content of the cell. diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/table/table--scrollable/table--scrollable.twig b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/table/table--scrollable/table--scrollable.twig new file mode 100644 index 0000000000..5a7d623e66 --- /dev/null +++ b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/table/table--scrollable/table--scrollable.twig @@ -0,0 +1,13 @@ +{% set classes = [ + 'usa-table--scrollable', + modifier_classes ? modifier_classes, +]|join(' ')|trim %} + +{% include "@uswds/table/table.twig" with { + 'modifier_classes': classes, + 'caption': caption, + 'header': header, + 'footer': footer, + 'rows': rows, + 'scrollable': true, +}%} diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/table/table--scrollable/table--scrollable.yml b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/table/table--scrollable/table--scrollable.yml new file mode 100644 index 0000000000..4b2a5b1a40 --- /dev/null +++ b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/table/table--scrollable/table--scrollable.yml @@ -0,0 +1,74 @@ +modifier_classes: '' +caption: 'Scrollable table' +header: + - + attributes: ' scope="col"' + content: 'Document title' + - + attributes: ' scope="col"' + content: 'Description' + - + attributes: ' scope="col"' + content: 'Year' +footer: false +rows: + - + attributes: '' + cells: + - + tag: 'th' + attributes: ' scope="row"' + content: 'Declaration of Independence' + - + tag: 'td' + attributes: '' + content: 'Statement adopted by the Continental Congress declaring independence from the British Empire.' + - + tag: 'td' + attributes: '' + content: '1776' + - + attributes: '' + cells: + - + tag: 'th' + attributes: ' scope="row"' + content: 'Bill of Rights' + - + tag: 'td' + attributes: '' + content: 'The first ten amendments of the U.S. Constitution guaranteeing rights and freedoms.' + - + tag: 'td' + attributes: '' + content: '1791' + - + attributes: '' + cells: + - + tag: 'th' + attributes: ' scope="row"' + content: 'Declaration of Sentiments' + - + tag: 'td' + attributes: '' + content: 'A document written during the Seneca Falls Convention outlining the rights that American women should be entitled to as citizens.' + - + tag: 'td' + attributes: '' + content: '1848' + - + attributes: '' + cells: + - + tag: 'th' + attributes: ' scope="row"' + content: 'Emancipation Proclamation' + - + tag: 'td' + attributes: '' + content: 'An executive order granting freedom to slaves in designated southern states.' + - + tag: 'td' + attributes: '' + content: '1863' diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/table/table.twig b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/table/table.twig index 420ed91029..6f74884dd0 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/table/table.twig +++ b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/table/table.twig @@ -3,6 +3,7 @@ modifier_classes ? modifier_classes, ]|join(' ')|trim %} +{% if scrollable %}
{% endif %} {% if caption %} @@ -49,3 +50,4 @@ {% if sortable %}
{% endif %} +{% if scrollable %}{% endif %} From 063e69ecea00b3e6c9b2c39bd84870e6d6a24087 Mon Sep 17 00:00:00 2001 From: Josh Wagner Date: Fri, 19 Nov 2021 13:53:04 -0500 Subject: [PATCH 02/87] [EPAD8-1493] add stacked tables --- .../03-uswds/table/table~stacked-header.yml | 75 +++++++++++++++++++ .../03-uswds/table/table~stacked.yml | 75 +++++++++++++++++++ 2 files changed, 150 insertions(+) create mode 100644 services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/table/table~stacked-header.yml create mode 100644 services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/table/table~stacked.yml diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/table/table~stacked-header.yml b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/table/table~stacked-header.yml new file mode 100644 index 0000000000..4dd2d28b9e --- /dev/null +++ b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/table/table~stacked-header.yml @@ -0,0 +1,75 @@ +sortable: true +modifier_classes: 'usa-table--stacked-header' +caption: 'Stacked Header table' +header: + - + attributes: ' data-sortable scope="col"' + content: 'Document title' + - + attributes: ' data-sortable scope="col"' + content: 'Description' + - + attributes: ' data-sortable scope="col"' + content: 'Year' +footer: false +rows: + - + attributes: '' + cells: + - + tag: 'th' + attributes: ' scope="row"' + content: 'Declaration of Independence' + - + tag: 'td' + attributes: '' + content: 'Statement adopted by the Continental Congress declaring independence from the British Empire.' + - + tag: 'td' + attributes: '' + content: '1776' + - + attributes: '' + cells: + - + tag: 'th' + attributes: ' scope="row"' + content: 'Bill of Rights' + - + tag: 'td' + attributes: '' + content: 'The first ten amendments of the U.S. Constitution guaranteeing rights and freedoms.' + - + tag: 'td' + attributes: '' + content: '1791' + - + attributes: '' + cells: + - + tag: 'th' + attributes: ' scope="row"' + content: 'Declaration of Sentiments' + - + tag: 'td' + attributes: '' + content: 'A document written during the Seneca Falls Convention outlining the rights that American women should be entitled to as citizens.' + - + tag: 'td' + attributes: '' + content: '1848' + - + attributes: '' + cells: + - + tag: 'th' + attributes: ' scope="row"' + content: 'Emancipation Proclamation' + - + tag: 'td' + attributes: '' + content: 'An executive order granting freedom to slaves in designated southern states.' + - + tag: 'td' + attributes: '' + content: '1863' diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/table/table~stacked.yml b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/table/table~stacked.yml new file mode 100644 index 0000000000..86f7950593 --- /dev/null +++ b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/table/table~stacked.yml @@ -0,0 +1,75 @@ +sortable: true +modifier_classes: 'usa-table--stacked' +caption: 'Stackable table' +header: + - + attributes: ' data-sortable scope="col"' + content: 'Document title' + - + attributes: ' data-sortable scope="col"' + content: 'Description' + - + attributes: ' data-sortable scope="col"' + content: 'Year' +footer: false +rows: + - + attributes: '' + cells: + - + tag: 'th' + attributes: ' scope="row"' + content: 'Declaration of Independence' + - + tag: 'td' + attributes: '' + content: 'Statement adopted by the Continental Congress declaring independence from the British Empire.' + - + tag: 'td' + attributes: '' + content: '1776' + - + attributes: '' + cells: + - + tag: 'th' + attributes: ' scope="row"' + content: 'Bill of Rights' + - + tag: 'td' + attributes: '' + content: 'The first ten amendments of the U.S. Constitution guaranteeing rights and freedoms.' + - + tag: 'td' + attributes: '' + content: '1791' + - + attributes: '' + cells: + - + tag: 'th' + attributes: ' scope="row"' + content: 'Declaration of Sentiments' + - + tag: 'td' + attributes: '' + content: 'A document written during the Seneca Falls Convention outlining the rights that American women should be entitled to as citizens.' + - + tag: 'td' + attributes: '' + content: '1848' + - + attributes: '' + cells: + - + tag: 'th' + attributes: ' scope="row"' + content: 'Emancipation Proclamation' + - + tag: 'td' + attributes: '' + content: 'An executive order granting freedom to slaves in designated southern states.' + - + tag: 'td' + attributes: '' + content: '1863' From ff5be99ca74b8ed292549a939d8a3c8bdf31438b Mon Sep 17 00:00:00 2001 From: Josh Wagner Date: Wed, 24 Nov 2021 10:53:24 -0500 Subject: [PATCH 03/87] [EPAD8-1493] removed overriding code for header styles --- .../source/_patterns/03-uswds/table/_table.scss | 9 --------- 1 file changed, 9 deletions(-) diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/table/_table.scss b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/table/_table.scss index 8aefee038d..a4898015df 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/table/_table.scss +++ b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/table/_table.scss @@ -1,14 +1,5 @@ @import 'elements/table'; -.usa-table { - tbody { - th { - background-color: color($theme-table-header-background-color); - font-weight: $theme-font-weight-bold; - } - } -} - .usa-table--borderless { tbody { th { From b17c76248f6a74403e7ac6a40e951af17ae17360 Mon Sep 17 00:00:00 2001 From: Josh Wagner Date: Wed, 24 Nov 2021 15:07:48 -0500 Subject: [PATCH 04/87] [EPAD8-1491] fix icon component, add icon list component --- .../03-uswds/icon-list/_icon-list.scss | 4 + .../_patterns/03-uswds/icon-list/icon-list.md | 14 + .../03-uswds/icon-list/icon-list.twig | 26 ++ .../03-uswds/icon-list/icon-list.yml | 21 ++ .../03-uswds/icon-list/icon-list~large.yml | 2 + .../03-uswds/icon-list/icon-list~primary.yml | 2 + .../source/_patterns/03-uswds/icon/_icon.scss | 4 + .../source/_patterns/03-uswds/icon/icon.md | 12 + .../source/_patterns/03-uswds/icon/icon.twig | 266 ++++++++++++++++++ .../source/_patterns/03-uswds/icon/icon.yml | 6 + 10 files changed, 357 insertions(+) create mode 100644 services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon-list/_icon-list.scss create mode 100644 services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon-list/icon-list.md create mode 100644 services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon-list/icon-list.twig create mode 100644 services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon-list/icon-list.yml create mode 100644 services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon-list/icon-list~large.yml create mode 100644 services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon-list/icon-list~primary.yml create mode 100644 services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon/_icon.scss create mode 100644 services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon/icon.md create mode 100644 services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon/icon.twig create mode 100644 services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon/icon.yml diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon-list/_icon-list.scss b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon-list/_icon-list.scss new file mode 100644 index 0000000000..34f6ab30e4 --- /dev/null +++ b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon-list/_icon-list.scss @@ -0,0 +1,4 @@ +// @file +// Styles for icon list. + +@import 'components/icon-list'; diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon-list/icon-list.md b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon-list/icon-list.md new file mode 100644 index 0000000000..fd3fd2f892 --- /dev/null +++ b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon-list/icon-list.md @@ -0,0 +1,14 @@ +--- +el: .usa-icon-list +title: Icon List +state: inreview +--- + +__Variables:__ +* modifier_classes: [string] Classes to modify the default component styling. +* icon_modifier_classes: [string] Classes to modify internal icon component. +* list: [array] List items. Each item is an object containing: + * content: [string] Content of the item. + * icon: [object] Icon object containing + * name: [string] Name of the icon. + * modifier_classes: [string] Classes to modify this individual icon. diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon-list/icon-list.twig b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon-list/icon-list.twig new file mode 100644 index 0000000000..290bb6cb0f --- /dev/null +++ b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon-list/icon-list.twig @@ -0,0 +1,26 @@ +{% set classes = [ + 'usa-icon-list', + modifier_classes ? modifier_classes, +]|join(' ')|trim %} + +
    + {% for item in list %} +
  • + {% if item.icon %} +
    + {% set icon_classes = [ + icon_modifier_classes ? icon_modifier_classes, + item.icon.modifier_classes ? item.icon.modifier_classes + ]|join(' ')|trim %} + {% include '@uswds/icon/icon.twig' with { + 'icon_name': item.icon.name, + 'modifier_classes': icon_classes, + } %} +
    + {% endif %} +
    + {{ item.content }} +
    +
  • + {% endfor %} +
diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon-list/icon-list.yml b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon-list/icon-list.yml new file mode 100644 index 0000000000..7ba8ac9318 --- /dev/null +++ b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon-list/icon-list.yml @@ -0,0 +1,21 @@ +--- +modifier_classes: '' +icon_modifier_classes: '' +list: + - + content: 'List Item One' + icon: + name: 'accessibility_new' + modifier_classes: '' + - + content: 'List Item Two' + - + content: 'List Item Three' + icon: + name: 'phone' + modifier_classes: '' + - + content: 'List Item Four' + icon: + name: 'check' + modifier_classes: 'text-green' diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon-list/icon-list~large.yml b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon-list/icon-list~large.yml new file mode 100644 index 0000000000..6f3e714056 --- /dev/null +++ b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon-list/icon-list~large.yml @@ -0,0 +1,2 @@ +--- +modifier_classes: 'usa-icon-list--size-lg' diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon-list/icon-list~primary.yml b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon-list/icon-list~primary.yml new file mode 100644 index 0000000000..0074577c12 --- /dev/null +++ b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon-list/icon-list~primary.yml @@ -0,0 +1,2 @@ +--- +modifier_classes: 'usa-icon-list--primary' diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon/_icon.scss b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon/_icon.scss new file mode 100644 index 0000000000..c2ebc663f7 --- /dev/null +++ b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon/_icon.scss @@ -0,0 +1,4 @@ +// @file +// Styles for an icon. + +@import 'components/icon'; diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon/icon.md b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon/icon.md new file mode 100644 index 0000000000..eaca511205 --- /dev/null +++ b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon/icon.md @@ -0,0 +1,12 @@ +--- +el: .usa-icon +title: Icon +state: inreview +--- + +__Variables:__ +* is_demo: [boolean] Whether to show extra examples for demo. +* is_hidden: [boolean] Whether this icon has a role of aria-hidden. +* label: [string] Label used for aria-label attribute. +* modifier_classes: [string] Classes to modify the default component styling. +* icon_name: [string] The icon image name in the icons.svg sprite. diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon/icon.twig b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon/icon.twig new file mode 100644 index 0000000000..2690199df7 --- /dev/null +++ b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon/icon.twig @@ -0,0 +1,266 @@ +{% set classes = [ + 'usa-icon', + modifier_classes ? modifier_classes, +]|join(' ')|trim %} + +{% if is_demo %} + {% set icons = [ + 'accessibility_new', + 'accessible_forward', + 'account_balance', + 'account_box', + 'account_circle', + 'add', + 'add_circle', + 'add_circle_outline', + 'alarm', + 'alternate_email', + 'announcement', + 'api', + 'arrow_back', + 'arrow_downward', + 'arrow_drop_down', + 'arrow_drop_up', + 'arrow_forward', + 'arrow_upward', + 'assessment', + 'attach_file', + 'attach_money', + 'autorenew', + 'backpack', + 'bathtub', + 'bedding', + 'bookmark', + 'bug_report', + 'build', + 'calendar_today', + 'campaign', + 'camping', + 'cancel', + 'chat', + 'check', + 'check_box_outline_blank', + 'check_circle', + 'check_circle_outline', + 'checkroom', + 'chevron_left', + 'chevron_right', + 'clean_hands', + 'close', + 'closed_caption', + 'clothes', + 'cloud', + 'code', + 'comment', + 'connect_without_contact', + 'construction', + 'construction_worker', + 'contact_page', + 'content_copy', + 'coronavirus', + 'credit_card', + 'deck', + 'delete', + 'device_thermostat', + 'directions', + 'directions_bike', + 'directions_bus', + 'directions_car', + 'directions_walk', + 'do_not_disturb', + 'do_not_touch', + 'drag_handle', + 'eco', + 'edit', + 'electrical_services', + 'emoji_events', + 'error', + 'error_outline', + 'event', + 'expand_less', + 'expand_more', + 'facebook', + 'fast_forward', + 'fast_rewind', + 'favorite', + 'favorite_border', + 'file_download', + 'file_present', + 'file_upload', + 'filter_alt', + 'filter_list', + 'fingerprint', + 'first_page', + 'flag', + 'flickr', + 'flight', + 'flooding', + 'folder', + 'folder_open', + 'format_quote', + 'format_size', + 'forum', + 'github', + 'grid_view', + 'group_add', + 'groups', + 'hearing', + 'help', + 'help_outline', + 'highlight_off', + 'history', + 'home', + 'hospital', + 'hotel', + 'hourglass_empty', + 'hurricane', + 'identification', + 'image', + 'info', + 'info_outline', + 'insights', + 'instagram', + 'keyboard', + 'label', + 'language', + 'last_page', + 'launch', + 'lightbulb', + 'lightbulb_outline', + 'link', + 'link_off', + 'list', + 'local_cafe', + 'local_fire_department', + 'local_gas_station', + 'local_grocery_store', + 'local_hospital', + 'local_laundry_service', + 'local_library', + 'local_offer', + 'local_parking', + 'local_pharmacy', + 'local_police', + 'local_taxi', + 'location_city', + 'location_on', + 'lock', + 'lock_open', + 'lock_outline', + 'login', + 'logout', + 'loop', + 'mail', + 'mail_outline', + 'map', + 'masks', + 'medical_services', + 'menu', + 'military_tech', + 'more_horiz', + 'more_vert', + 'my_location', + 'navigate_before', + 'navigate_far_before', + 'navigate_far_next', + 'navigate_next', + 'near_me', + 'notifications', + 'notifications_active', + 'notifications_none', + 'notifications_off', + 'park', + 'people', + 'person', + 'pets', + 'phone', + 'photo_camera', + 'print', + 'priority_high', + 'public', + 'push_pin', + 'radio_button_unchecked', + 'rain', + 'reduce_capacity', + 'remove', + 'report', + 'restaurant', + 'rss_feed', + 'safety_divider', + 'sanitizer', + 'save_alt', + 'schedule', + 'school', + 'science', + 'search', + 'security', + 'send', + 'sentiment_dissatisfied', + 'sentiment_neutral', + 'sentiment_satisfied', + 'sentiment_satisfied_alt', + 'sentiment_very_dissatisfied', + 'settings', + 'severe_weather', + 'share', + 'shield', + 'shopping_basket', + 'snow', + 'soap', + 'social_distance', + 'sort_arrow', + 'spellcheck', + 'star', + 'star_half', + 'star_outline', + 'store', + 'support', + 'support_agent', + 'text_fields', + 'thumb_down_alt', + 'thumb_up_alt', + 'timer', + 'toggle_off', + 'toggle_on', + 'topic', + 'tornado', + 'translate', + 'trending_down', + 'trending_up', + 'twitter', + 'undo', + 'unfold_less', + 'unfold_more', + 'update', + 'upload_file', + 'verified', + 'verified_user', + 'visibility', + 'visibility_off', + 'volume_off', + 'warning', + 'wash', + 'wifi', + 'work', + 'youtube', + 'zoom_in', + 'zoom_out', + 'zoom_out_map', + ] %} + {% for icon in icons %} +

+ + {{ icon }} +

+ {% endfor %} +{%- else -%} + {% spaceless %} + + {% endspaceless %} +{%- endif -%} diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon/icon.yml b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon/icon.yml new file mode 100644 index 0000000000..042ba1cc64 --- /dev/null +++ b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon/icon.yml @@ -0,0 +1,6 @@ +--- +is_demo: true +is_hidden: false +label: '' +modifier_classes: '' +icon_name: '' From 41212e94a387735394353f9dace761da6359bdbb Mon Sep 17 00:00:00 2001 From: Josh Wagner Date: Sun, 5 Dec 2021 17:52:08 -0500 Subject: [PATCH 05/87] [EPAD8-1492] Add USWDS Modal to components --- .../_patterns/03-uswds/modal/_modal.scss | 15 ++++++ .../source/_patterns/03-uswds/modal/modal.md | 14 ++++++ .../_patterns/03-uswds/modal/modal.twig | 46 +++++++++++++++++++ .../source/_patterns/03-uswds/modal/modal.yml | 22 +++++++++ .../_patterns/03-uswds/modal/modal~force.yml | 24 ++++++++++ .../_patterns/03-uswds/modal/modal~large.yml | 3 ++ 6 files changed, 124 insertions(+) create mode 100644 services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/modal/_modal.scss create mode 100644 services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/modal/modal.md create mode 100644 services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/modal/modal.twig create mode 100644 services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/modal/modal.yml create mode 100644 services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/modal/modal~force.yml create mode 100644 services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/modal/modal~large.yml diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/modal/_modal.scss b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/modal/_modal.scss new file mode 100644 index 0000000000..6d5dacae7e --- /dev/null +++ b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/modal/_modal.scss @@ -0,0 +1,15 @@ +.usa-modal { + .usa-modal__close { + align-items: center; + align-self: flex-end; + background-color: transparent; + color: #757575; + display: flex; + flex-shrink: 0; + font-size: 0.93rem; + margin: -2rem 0 0 auto; + padding: 0.25rem; + width: auto; + } + +} diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/modal/modal.md b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/modal/modal.md new file mode 100644 index 0000000000..9d587f9847 --- /dev/null +++ b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/modal/modal.md @@ -0,0 +1,14 @@ +--- +el: .usa-modal +title: Modal +state: inreview +--- + +__Variables:__ +* modifier_classes: [string] Modifying classes for the component +* modal_id: [string] ID for modal identification, needs to be unique to page. +* button_text: [string] Label for modal activating button. +* modal_header: [string] Text in modal header. +* modal_description: [string] Text for modal body. +* modal_footer: [string] Modal footer markup. Buttons require a `data-close-modal` attribute to function. +* modal_force_action: [boolean] Flag to force a click in the footer actions. diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/modal/modal.twig b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/modal/modal.twig new file mode 100644 index 0000000000..88b8c00955 --- /dev/null +++ b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/modal/modal.twig @@ -0,0 +1,46 @@ +{% set classes = [ + 'usa-modal', + modifier_classes ? modifier_classes, +]|join(' ')|trim %} + +{{ button_text }} + diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/modal/modal.yml b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/modal/modal.yml new file mode 100644 index 0000000000..e29443e449 --- /dev/null +++ b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/modal/modal.yml @@ -0,0 +1,22 @@ +modifier_classes: '' +modal_id: 'example-modal' +button_text: 'Open Default Modal' +modal_header: 'Are you sure you want to continue?' +modal_description: 'You have unsaved changes that will be lost.' +modal_footer: |- +
    +
  • + +
  • +
  • + +
  • +
diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/modal/modal~force.yml b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/modal/modal~force.yml new file mode 100644 index 0000000000..6868c5041a --- /dev/null +++ b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/modal/modal~force.yml @@ -0,0 +1,24 @@ +modifier_classes: '' +modal_id: 'example-modal-3' +button_text: 'Open Force Action Modal' +modal_force_action: true +modal_header: 'Your session will end soon.' +modal_description: |- + You’ve been inactive for too long. Please choose to stay signed in or sign out. Otherwise, you’ll be signed out automatically in 5 minutes. +modal_footer: |- +
    +
  • + +
  • +
  • + +
  • +
diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/modal/modal~large.yml b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/modal/modal~large.yml new file mode 100644 index 0000000000..cdff2c3d18 --- /dev/null +++ b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/modal/modal~large.yml @@ -0,0 +1,3 @@ +modifier_classes: 'usa-modal--lg' +modal_id: 'example-modal-2' +button_text: 'Open Large Modal' From 91170553cb855c4c33f231b3e9bdcb917794d75f Mon Sep 17 00:00:00 2001 From: Dan Mouyard Date: Tue, 7 Dec 2021 11:55:00 -0500 Subject: [PATCH 06/87] EPAD8-1491: Tweak USWDS icon markup --- .../source/_patterns/03-uswds/icon-list/icon-list.twig | 3 ++- .../themes/epa_theme/source/_patterns/03-uswds/icon/icon.twig | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon-list/icon-list.twig b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon-list/icon-list.twig index 290bb6cb0f..0f03031a52 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon-list/icon-list.twig +++ b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon-list/icon-list.twig @@ -10,11 +10,12 @@
{% set icon_classes = [ icon_modifier_classes ? icon_modifier_classes, - item.icon.modifier_classes ? item.icon.modifier_classes + item.icon.modifier_classes ? item.icon.modifier_classes, ]|join(' ')|trim %} {% include '@uswds/icon/icon.twig' with { 'icon_name': item.icon.name, 'modifier_classes': icon_classes, + 'is_hidden': true, } %}
{% endif %} diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon/icon.twig b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon/icon.twig index 2690199df7..e22e35e364 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon/icon.twig +++ b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/icon/icon.twig @@ -249,7 +249,7 @@ ] %} {% for icon in icons %}

- Latest revision
'; +} + From fb824830a31002956113bb00cd1dbfc1f18547ff Mon Sep 17 00:00:00 2001 From: Nathan Han Date: Fri, 10 Dec 2021 12:19:45 -0800 Subject: [PATCH 12/87] [EPAD8-1558] update current revision button text --- ...h-revision-language-to-match-3252521-2899719-3252540-2.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/drupal/patches/diff-patch-revision-language-to-match-3252521-2899719-3252540-2.patch b/services/drupal/patches/diff-patch-revision-language-to-match-3252521-2899719-3252540-2.patch index 83f6672efa..982622da6a 100644 --- a/services/drupal/patches/diff-patch-revision-language-to-match-3252521-2899719-3252540-2.patch +++ b/services/drupal/patches/diff-patch-revision-language-to-match-3252521-2899719-3252540-2.patch @@ -28,7 +28,7 @@ index 45c2c66..b78dd8f 100755 + $links = []; + if ($revert_permission && !$revision->isLatestRevision()) { + $links['revert'] = [ -+ 'title' => $this->t('Copy: Set as Latest Revision'), ++ 'title' => $this->t('Copy and Set as Latest Revision'), + 'url' => $has_translations ? + Url::fromRoute('node.revision_revert_translation_confirm', ['node' => $node->id(), 'node_revision' => $vid, 'langcode' => $langcode]) : + Url::fromRoute('node.revision_revert_confirm', ['node' => $node->id(), 'node_revision' => $vid]), From 7b8a92358615d015ea05e65bab674dd9be000781 Mon Sep 17 00:00:00 2001 From: Josh Wagner Date: Fri, 10 Dec 2021 16:05:00 -0500 Subject: [PATCH 13/87] [EPAD8-1560] add standalone template --- .../epa_theme/source/_data/menu--main.yml | 249 +++++++++++++++++- .../themes/epa_theme/source/_meta/_foot.twig | 27 +- .../themes/epa_theme/source/_meta/_head.twig | 83 ++++++ .../_patterns/07-pages/standalone-template.md | 4 + .../07-pages/standalone-template.twig | 190 +++++++++++++ .../07-pages/standalone-template.yml | 64 +++++ 6 files changed, 605 insertions(+), 12 deletions(-) create mode 100644 services/drupal/web/themes/epa_theme/source/_patterns/07-pages/standalone-template.md create mode 100644 services/drupal/web/themes/epa_theme/source/_patterns/07-pages/standalone-template.twig create mode 100644 services/drupal/web/themes/epa_theme/source/_patterns/07-pages/standalone-template.yml diff --git a/services/drupal/web/themes/epa_theme/source/_data/menu--main.yml b/services/drupal/web/themes/epa_theme/source/_data/menu--main.yml index 2834580f5d..feb6d0f3a1 100644 --- a/services/drupal/web/themes/epa_theme/source/_data/menu--main.yml +++ b/services/drupal/web/themes/epa_theme/source/_data/menu--main.yml @@ -2,30 +2,257 @@ menu_name: 'main' main_items: - title: 'Environmental Topics' - url: 'https://www.epa.gov/environmental-topics' + url: '#' original_link: options: attributes: class: '' in_active_trail: false + below: + - title: 'Environmental Topics' + url: '#' + original_link: + options: + attributes: + class: '' + in_active_trail: false + - title: 'Air' + url: '#' + original_link: + options: + attributes: + class: '' + in_active_trail: false + - title: 'Bed Bugs' + url: '#' + original_link: + options: + attributes: + class: '' + in_active_trail: false + - title: 'Chemicals and Toxics' + url: '#' + original_link: + options: + attributes: + class: '' + in_active_trail: false + - title: 'Environmental Information by Location' + url: '#' + original_link: + options: + attributes: + class: '' + in_active_trail: false + - title: 'Greener Living' + url: '#' + original_link: + options: + attributes: + class: '' + in_active_trail: false + - title: 'Health' + url: '#' + original_link: + options: + attributes: + class: '' + in_active_trail: false + - title: 'Land, Waste, and Cleanup' + url: '#' + original_link: + options: + attributes: + class: '' + in_active_trail: false + - title: 'Lead' + url: '#' + original_link: + options: + attributes: + class: '' + in_active_trail: false + - title: 'Mold' + url: '#' + original_link: + options: + attributes: + class: '' + in_active_trail: false + - title: 'Pesticides' + url: '#' + original_link: + options: + attributes: + class: '' + in_active_trail: false + - title: 'Radon' + url: '#' + original_link: + options: + attributes: + class: '' + in_active_trail: false + - title: 'Science' + url: '#' + original_link: + options: + attributes: + class: '' + in_active_trail: false + - title: 'Water' + url: '#' + original_link: + options: + attributes: + class: '' + in_active_trail: false + - title: 'A-Z Index' + url: '#' + original_link: + options: + attributes: + class: '' + in_active_trail: false - title: 'Laws & Regulations' - url: 'https://www.epa.gov/laws-regulations' - original_link: - options: - attributes: - class: '' - in_active_trail: false - - title: 'Report a Violation' - url: 'https://www.epa.gov/report-violation' + url: '#' original_link: options: attributes: class: '' in_active_trail: false + below: + - title: 'Laws & Regulations' + url: '#' + original_link: + options: + attributes: + class: '' + in_active_trail: false + - title: 'By Business Sector' + url: '#' + original_link: + options: + attributes: + class: '' + in_active_trail: false + - title: 'By Topic' + url: '#' + original_link: + options: + attributes: + class: '' + in_active_trail: false + - title: 'Compliance' + url: '#' + original_link: + options: + attributes: + class: '' + in_active_trail: false + - title: 'Enforcement' + url: '#' + original_link: + options: + attributes: + class: '' + in_active_trail: false + - title: 'Laws and Executive Orders' + url: '#' + original_link: + options: + attributes: + class: '' + in_active_trail: false + - title: 'Policy and Guidance' + url: '#' + original_link: + options: + attributes: + class: '' + in_active_trail: false + - title: 'Regulations' + url: '#' + original_link: + options: + attributes: + class: '' + in_active_trail: false - title: 'About EPA' - url: 'https://www.epa.gov/aboutepa' + url: '#' original_link: options: attributes: class: '' - in_active_trail: false \ No newline at end of file + in_active_trail: false + below: + - title: 'About EPA' + url: '#' + original_link: + options: + attributes: + class: '' + in_active_trail: false + - title: 'EPA Administrator' + url: '#' + original_link: + options: + attributes: + class: '' + in_active_trail: false + - title: 'Current Leadership' + url: '#' + original_link: + options: + attributes: + class: '' + in_active_trail: false + - title: 'Organization Chart' + url: '#' + original_link: + options: + attributes: + class: '' + in_active_trail: false + - title: 'Staff Directory' + url: '#' + original_link: + options: + attributes: + class: '' + in_active_trail: false + - title: 'Planning, Budget and Results' + url: '#' + original_link: + options: + attributes: + class: '' + in_active_trail: false + - title: 'Jobs and Internships' + url: '#' + original_link: + options: + attributes: + class: '' + in_active_trail: false + - title: 'Headquarters Offices' + url: '#' + original_link: + options: + attributes: + class: '' + in_active_trail: false + - title: 'Regional Offices' + url: '#' + original_link: + options: + attributes: + class: '' + in_active_trail: false + - title: 'Labs and Research Centers' + url: '#' + original_link: + options: + attributes: + class: '' + in_active_trail: false diff --git a/services/drupal/web/themes/epa_theme/source/_meta/_foot.twig b/services/drupal/web/themes/epa_theme/source/_meta/_foot.twig index ed74683717..10bd343fab 100644 --- a/services/drupal/web/themes/epa_theme/source/_meta/_foot.twig +++ b/services/drupal/web/themes/epa_theme/source/_meta/_foot.twig @@ -1,3 +1,4 @@ +{% if not standalone_template %} @@ -19,7 +20,31 @@ - +{% else %} +{# Custom Standalone template head #} + + + + + + + + + + + + + + + + + + + + + + +{% endif %} {{ patternLabFoot | raw }} diff --git a/services/drupal/web/themes/epa_theme/source/_meta/_head.twig b/services/drupal/web/themes/epa_theme/source/_meta/_head.twig index 12fc2ce455..a8e77efaeb 100644 --- a/services/drupal/web/themes/epa_theme/source/_meta/_head.twig +++ b/services/drupal/web/themes/epa_theme/source/_meta/_head.twig @@ -1,6 +1,7 @@ + {% if not standalone_template %} @@ -30,6 +31,88 @@ + {% else %} + {# Custom Standalone template head #} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Archives | US EPA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {% endif %} {{ patternLabHead | raw }} diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/standalone-template.md b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/standalone-template.md new file mode 100644 index 0000000000..3c93e3b311 --- /dev/null +++ b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/standalone-template.md @@ -0,0 +1,4 @@ +--- +title: Standalone Template +state: inreview +--- diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/standalone-template.twig b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/standalone-template.twig new file mode 100644 index 0000000000..108e9ce20b --- /dev/null +++ b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/standalone-template.twig @@ -0,0 +1,190 @@ +{% include '@uswds/banner/banner.twig' with { + 'banner_text': 'An official website of the United States government', + 'has_expanded': true, + 'banner_action': 'Here’s how you know', + 'expanded_blocks': [ + { + 'icon': '../../../images/icon-dot-gov.svg', + 'icon_alt': 'Dot gov', + 'heading': 'Official websites use .gov', + 'content': 'A .gov website belongs to an official government organization in the United States.', + }, + { + 'icon': '../../../images/icon-https.svg', + 'icon_alt': 'HTTPS', + 'heading': 'Secure .gov websites use HTTPS', + 'content': 'A lock () or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.', + }, + ], +} %} + +{% if show_sitewide_alerts %} + {% include '@components/site-alert/site-alert--emergency/site-alert--emergency.twig' with { + 'show_close': false, + 'content': '

This is an emergency alert.

', + } %} + {% include '@components/site-alert/site-alert.twig' with { + 'show_close': true, + 'hash': 'sample-alert-1', + 'content': '

This is a warning alert.

', + } %} + {% include '@components/site-alert/site-alert--information/site-alert--information.twig' with { + 'show_close': true, + 'hash': 'sample-alert-2', + 'content': '

We’ve made some changes to EPA.gov. If the information you are looking for is not here, you may be able to find it on the EPA Web Archive or the January 19, 2017 Web Snapshot.

', + } %} +{% endif %} + +{% embed '@layouts/header/header.twig' %} + {% block logo %} + {% include "@components/site-logo/site-logo.twig" with { + 'url': '/', + } %} + {% endblock %} + {% block search %} + {% include '@components/search/search--epa/search--epa.twig' %} + {% if show_admin_info %} + {% include '@components/_toggle-admin/toggle-admin.twig' with { + 'modifier_classes': 'margin-top-1', + } %} + {% endif %} + {% endblock %} + {% block navigation %} + {% embed '@components/nav/nav--epa/nav--epa.twig' with { + 'label': 'Primary navigation', + 'extended': true + } %} + {% block menu %} + {% include '@components/menu/menu--main/menu--main.twig' with { + 'main_items': main_sl_items + } %} + {% endblock %} + {% endembed %} + {% endblock %} +{% endembed %} + +
+ {{ content }} +
+ +{% embed '@components/footer/footer.twig' %} + {% block content %} + + + + {% endblock %} +{% endembed %} + +{% include '@components/back-to-top/back-to-top.twig' %} diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/standalone-template.yml b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/standalone-template.yml new file mode 100644 index 0000000000..eccbf68be5 --- /dev/null +++ b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/standalone-template.yml @@ -0,0 +1,64 @@ +standalone_template: true +main_sl_items: + - title: 'Environmental Topics' + url: 'https://www.epa.gov/environmental-topics' + original_link: + options: + attributes: + class: '' + in_active_trail: false + - title: 'Laws & Regulations' + url: 'https://www.epa.gov/laws-regulations' + original_link: + options: + attributes: + class: '' + in_active_trail: false + - title: 'Report a Violation' + url: 'https://www.epa.gov/report-violation' + original_link: + options: + attributes: + class: '' + in_active_trail: false + - title: 'About EPA' + url: 'https://www.epa.gov/aboutepa' + original_link: + options: + attributes: + class: '' + in_active_trail: false +content: |- + From e76b45ae09f11d2d65e5c002fe45dcf0b4ee80db Mon Sep 17 00:00:00 2001 From: Nathan Han Date: Mon, 13 Dec 2021 11:09:01 -0800 Subject: [PATCH 14/87] [EPAD8-1558] Add form alter for submit button text --- .../web/modules/custom/epa_workflow/epa_workflow.module | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/services/drupal/web/modules/custom/epa_workflow/epa_workflow.module b/services/drupal/web/modules/custom/epa_workflow/epa_workflow.module index 58f1f6dd6c..68ee06ef1d 100644 --- a/services/drupal/web/modules/custom/epa_workflow/epa_workflow.module +++ b/services/drupal/web/modules/custom/epa_workflow/epa_workflow.module @@ -624,3 +624,9 @@ function epa_workflow_form_revision_overview_form_alter(&$form, FormStateInterfa $form['node_revisions_table'][0]['operations']['#prefix'] = 'Latest revision
'; } +/** + * Implements hook_form_alter(). + */ +function epa_workflow_form_node_revision_revert_confirm_alter(&$form, FormStateInterface $form_state, $form_id) { + $form['actions']['submit']['#value'] = 'Copy and Set as Latest Revision'; +} From a2da91692c0851ff0359ab8a93efbd57fcab7c4c Mon Sep 17 00:00:00 2001 From: Dan Mouyard Date: Tue, 14 Dec 2021 11:18:57 -0500 Subject: [PATCH 15/87] EPAD8-1556: Remove USWDS button @import --- .../source/_patterns/00-config/01-mixins/_mixins.button.scss | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/00-config/01-mixins/_mixins.button.scss b/services/drupal/web/themes/epa_theme/source/_patterns/00-config/01-mixins/_mixins.button.scss index 96e8a4cfb3..178307773c 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/00-config/01-mixins/_mixins.button.scss +++ b/services/drupal/web/themes/epa_theme/source/_patterns/00-config/01-mixins/_mixins.button.scss @@ -1,7 +1,6 @@ // @file // Button styles -@import 'packages/required'; -@import 'packages/usa-button'; + $button-border-radius: radius($theme-button-border-radius) !default; $button-background-color: gesso-color(button, primary, background) !default; $button-background-color-active: gesso-color( From b417347626b311734d61731998da3d54743e0d64 Mon Sep 17 00:00:00 2001 From: Dan Mouyard Date: Tue, 14 Dec 2021 11:25:56 -0500 Subject: [PATCH 16/87] EPAD8-1556: Fix typo in margins for checkboxes and radios --- .../form-item/form-item--checkboxes/_form-item--checkboxes.scss | 2 +- .../form-item/form-item--radios/_form-item--radios.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/05-components/form-item/form-item--checkboxes/_form-item--checkboxes.scss b/services/drupal/web/themes/epa_theme/source/_patterns/05-components/form-item/form-item--checkboxes/_form-item--checkboxes.scss index dbbdb462fc..da1bf7653b 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/05-components/form-item/form-item--checkboxes/_form-item--checkboxes.scss +++ b/services/drupal/web/themes/epa_theme/source/_patterns/05-components/form-item/form-item--checkboxes/_form-item--checkboxes.scss @@ -2,5 +2,5 @@ // Styles for checkboxes form item. .form-item--checkboxes { - margin: rem(gesso-spacing(0.5)) 0; + margin: rem(gesso-spacing('05')) 0; } diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/05-components/form-item/form-item--radios/_form-item--radios.scss b/services/drupal/web/themes/epa_theme/source/_patterns/05-components/form-item/form-item--radios/_form-item--radios.scss index b72edfb09e..ec39804618 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/05-components/form-item/form-item--radios/_form-item--radios.scss +++ b/services/drupal/web/themes/epa_theme/source/_patterns/05-components/form-item/form-item--radios/_form-item--radios.scss @@ -2,5 +2,5 @@ // Styles for radios form item. .form-item--radios { - margin: rem(gesso-spacing(0.5)) 0; + margin: rem(gesso-spacing('05')) 0; } From 49c848cbe810af8feac1bd0a588d74b01630d5f0 Mon Sep 17 00:00:00 2001 From: Josh Wagner Date: Tue, 14 Dec 2021 12:25:42 -0500 Subject: [PATCH 17/87] [EPAD8-1558] add spacing to first row, keep buttons inside table --- .../modules/custom/epa_workflow/css/revision-list.css | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/services/drupal/web/modules/custom/epa_workflow/css/revision-list.css b/services/drupal/web/modules/custom/epa_workflow/css/revision-list.css index e8f25dbdd3..1d056f1216 100644 --- a/services/drupal/web/modules/custom/epa_workflow/css/revision-list.css +++ b/services/drupal/web/modules/custom/epa_workflow/css/revision-list.css @@ -9,4 +9,13 @@ #edit-node-revisions-table .revision-latest .dropbutton-wrapper { font-weight: inherit; + min-width: 200px; +} + +#edit-node-revisions-table tbody tr:first-child td { + padding-bottom: 3rem; +} + +#edit-node-revisions-table .dropbutton .dropbutton-action > * { + white-space: normal; } From 6d70764fe57464515e27d858237a515a38d0165c Mon Sep 17 00:00:00 2001 From: Josh Wagner Date: Tue, 14 Dec 2021 13:43:38 -0500 Subject: [PATCH 18/87] [EPAD8-1567] add check to make .gov.* and .mil.* links render as external --- .../drupal/web/themes/epa_theme/js/src/external-links.es6.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/drupal/web/themes/epa_theme/js/src/external-links.es6.js b/services/drupal/web/themes/epa_theme/js/src/external-links.es6.js index 9f591bbb86..02959b0c39 100644 --- a/services/drupal/web/themes/epa_theme/js/src/external-links.es6.js +++ b/services/drupal/web/themes/epa_theme/js/src/external-links.es6.js @@ -5,7 +5,7 @@ import Drupal from 'drupal'; Drupal.behaviors.externalLinks = { attach(context, settings) { const externalLinks = context.querySelectorAll( - "a:not([href=''], [href*='.gov'], [href*='.mil'], [href^='#'], [href^='?'], [href^='/'], [href^='.'], [href^='javascript:'], [href^='mailto:'], [href^='tel:'], [href*='webcms-uploads-dev.s3.amazonaws.com'], [href*='webcms-uploads-stage.s3.amazonaws.com'], [href*='webcms-uploads-prod.s3.amazonaws.com'], [href*='webcms-uploads-qa.s3.amazonaws.com'])" + "a:not([href=''], [href$='.gov'], [href*='.gov/'], [href$='.mil'], [href*='.mil/'], [href^='#'], [href^='?'], [href^='/'], [href^='.'], [href^='javascript:'], [href^='mailto:'], [href^='tel:'], [href*='webcms-uploads-dev.s3.amazonaws.com'], [href*='webcms-uploads-stage.s3.amazonaws.com'], [href*='webcms-uploads-prod.s3.amazonaws.com'], [href*='webcms-uploads-qa.s3.amazonaws.com'])" ); const translate = { en: ['Exit', 'Exit EPA website'], From f6927afbcf6f1bf5f6345d872759a53d63543233 Mon Sep 17 00:00:00 2001 From: Josh Wagner Date: Tue, 14 Dec 2021 13:45:24 -0500 Subject: [PATCH 19/87] [EPAD8-1567] change no-js CSS to show .gov.* and .mil.* links as external --- .../00-config/02-variables/_variables.external-urls.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/00-config/02-variables/_variables.external-urls.scss b/services/drupal/web/themes/epa_theme/source/_patterns/00-config/02-variables/_variables.external-urls.scss index 5fea334af9..88a7d2f64b 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/00-config/02-variables/_variables.external-urls.scss +++ b/services/drupal/web/themes/epa_theme/source/_patterns/00-config/02-variables/_variables.external-urls.scss @@ -1 +1 @@ -$external-urls: ":not([href=''], [href*='.gov'], [href*='.mil'], [href^='#'], [href^='?'], [href^='/'], [href^='.'], [href^='javascript:'], [href^='mailto:'], [href^='tel:'], [href*='webcms-uploads-dev.s3.amazonaws.com'], [href*='webcms-uploads-stage.s3.amazonaws.com'], [href*='webcms-uploads-prod.s3.amazonaws.com'], [href*='webcms-uploads-qa.s3.amazonaws.com'])"; +$external-urls: ":not([href=''], [href$='.gov'], [href*='.gov/'], [href$='.mil'], [href*='.mil/'], [href^='#'], [href^='?'], [href^='/'], [href^='.'], [href^='javascript:'], [href^='mailto:'], [href^='tel:'], [href*='webcms-uploads-dev.s3.amazonaws.com'], [href*='webcms-uploads-stage.s3.amazonaws.com'], [href*='webcms-uploads-prod.s3.amazonaws.com'], [href*='webcms-uploads-qa.s3.amazonaws.com'])"; From 90f5c2a230c177f442d9a97dfae469c77e616967 Mon Sep 17 00:00:00 2001 From: Dan Mouyard Date: Tue, 14 Dec 2021 13:47:11 -0500 Subject: [PATCH 20/87] EPAD8-1560: Update standalone template content to use Pattern Lab templates --- .../07-pages/standalone-template.twig | 19 ++++++-- .../07-pages/standalone-template.yml | 43 +++++++------------ 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/standalone-template.twig b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/standalone-template.twig index 108e9ce20b..3c10e81492 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/standalone-template.twig +++ b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/standalone-template.twig @@ -38,7 +38,7 @@ {% embed '@layouts/header/header.twig' %} {% block logo %} {% include "@components/site-logo/site-logo.twig" with { - 'url': '/', + 'url': 'https://www.epa.gov/', } %} {% endblock %} {% block search %} @@ -49,6 +49,7 @@ } %} {% endif %} {% endblock %} + {% block navigation %} {% embed '@components/nav/nav--epa/nav--epa.twig' with { 'label': 'Primary navigation', @@ -56,15 +57,27 @@ } %} {% block menu %} {% include '@components/menu/menu--main/menu--main.twig' with { - 'main_items': main_sl_items + 'main_items': standalone_main_items, } %} {% endblock %} {% endembed %} {% endblock %} {% endembed %} +{% set header_info %} + {% include '@components/web-area-title/web-area-title.twig' with { + 'text': 'EPA Web Archive', + } %} +{% endset %} +
- {{ content }} + {% include '@templates/detail-pages/page.twig' with { + 'title': page_title, + 'messages': '', + 'tasks': '', + 'intro': '', + 'body': content, + } %}
{% embed '@components/footer/footer.twig' %} diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/standalone-template.yml b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/standalone-template.yml index eccbf68be5..525e04190f 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/standalone-template.yml +++ b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/standalone-template.yml @@ -1,5 +1,6 @@ standalone_template: true -main_sl_items: +has_footer: false +standalone_main_items: - title: 'Environmental Topics' url: 'https://www.epa.gov/environmental-topics' original_link: @@ -28,37 +29,23 @@ main_sl_items: attributes: class: '' in_active_trail: false +page_title: 'EPA Web Archives — Home' content: |- - From 27a2eb5dadc549ad3562162eaa5c6f090d558668 Mon Sep 17 00:00:00 2001 From: Dan Mouyard Date: Tue, 14 Dec 2021 14:38:44 -0500 Subject: [PATCH 21/87] EPAD8-1560: Update markup --- .../themes/epa_theme/source/_meta/_head.twig | 190 ++++++++---------- .../epa_theme/templates/layout/html.html.twig | 8 +- 2 files changed, 90 insertions(+), 108 deletions(-) diff --git a/services/drupal/web/themes/epa_theme/source/_meta/_head.twig b/services/drupal/web/themes/epa_theme/source/_meta/_head.twig index a8e77efaeb..0d83232a64 100644 --- a/services/drupal/web/themes/epa_theme/source/_meta/_head.twig +++ b/services/drupal/web/themes/epa_theme/source/_meta/_head.twig @@ -1,7 +1,6 @@ - {% if not standalone_template %} @@ -9,109 +8,96 @@ {{ page_title }} | {{ site_name }} - - - - - - - - - - - - - - - - - - - - + {% if not standalone_template %} + + + + + + + + + + + + + + + + + + + {% else %} - {# Custom Standalone template head #} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Archives | US EPA - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + {# Custom Standalone template head #} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + {% endif %} diff --git a/services/drupal/web/themes/epa_theme/templates/layout/html.html.twig b/services/drupal/web/themes/epa_theme/templates/layout/html.html.twig index b0fff40859..8eeb54f5f9 100644 --- a/services/drupal/web/themes/epa_theme/templates/layout/html.html.twig +++ b/services/drupal/web/themes/epa_theme/templates/layout/html.html.twig @@ -39,7 +39,7 @@ - + @@ -55,11 +55,7 @@ - + From 2d9c0dac4e99717c1dedcaa7a432ba735a372fd7 Mon Sep 17 00:00:00 2001 From: Dan Mouyard Date: Tue, 14 Dec 2021 16:02:17 -0500 Subject: [PATCH 22/87] EPAD8-1560: Update Pattern Lab foot template --- .../themes/epa_theme/source/_meta/_foot.twig | 94 ++++++++++--------- 1 file changed, 50 insertions(+), 44 deletions(-) diff --git a/services/drupal/web/themes/epa_theme/source/_meta/_foot.twig b/services/drupal/web/themes/epa_theme/source/_meta/_foot.twig index 10bd343fab..cea4e6100b 100644 --- a/services/drupal/web/themes/epa_theme/source/_meta/_foot.twig +++ b/services/drupal/web/themes/epa_theme/source/_meta/_foot.twig @@ -1,50 +1,56 @@ {% if not standalone_template %} - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + {% else %} -{# Custom Standalone template head #} - - - - - - - - - - - - - - - - - - - - - - + {# Custom Standalone template foot #} + + + + + + + + + + + + + + + + + + + + + + + + {% endif %} + {{ patternLabFoot | raw }} From e62fc25eb76717b89824deb6bf2957de10583c3e Mon Sep 17 00:00:00 2001 From: Carson Oldson Date: Wed, 15 Dec 2021 09:49:08 -0600 Subject: [PATCH 23/87] [EPAD8-1512] Changed the label of 'Box' to 'Summary Box'. Added a 'Default' option to the style for the paragraph and made it the default. --- .../config/sync/field.field.paragraph.box.field_style.yml | 4 +++- .../config/sync/field.storage.paragraph.field_style.yml | 3 +++ .../drupal/config/sync/paragraphs.paragraphs_type.box.yml | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/services/drupal/config/sync/field.field.paragraph.box.field_style.yml b/services/drupal/config/sync/field.field.paragraph.box.field_style.yml index b034fce3d2..d281d497f9 100644 --- a/services/drupal/config/sync/field.field.paragraph.box.field_style.yml +++ b/services/drupal/config/sync/field.field.paragraph.box.field_style.yml @@ -20,7 +20,9 @@ label: Style description: '' required: false translatable: false -default_value: { } +default_value: + - + value: default default_value_callback: '' settings: { } field_type: list_string diff --git a/services/drupal/config/sync/field.storage.paragraph.field_style.yml b/services/drupal/config/sync/field.storage.paragraph.field_style.yml index a81da9d98d..ab81b9ca44 100644 --- a/services/drupal/config/sync/field.storage.paragraph.field_style.yml +++ b/services/drupal/config/sync/field.storage.paragraph.field_style.yml @@ -11,6 +11,9 @@ entity_type: paragraph type: list_string settings: allowed_values: + - + value: default + label: Default - value: related-info label: 'Related Info Box' diff --git a/services/drupal/config/sync/paragraphs.paragraphs_type.box.yml b/services/drupal/config/sync/paragraphs.paragraphs_type.box.yml index 3185ee96f7..b64254c22c 100644 --- a/services/drupal/config/sync/paragraphs.paragraphs_type.box.yml +++ b/services/drupal/config/sync/paragraphs.paragraphs_type.box.yml @@ -3,7 +3,7 @@ langcode: en status: true dependencies: { } id: box -label: Box +label: 'Summary Box' icon_uuid: null icon_default: null description: '' From 9030f83c6037dca4db15d0448720edb7867c2170 Mon Sep 17 00:00:00 2001 From: Carson Oldson Date: Wed, 15 Dec 2021 10:02:41 -0600 Subject: [PATCH 24/87] [EPAD8-1512] Renaming ckeditor plugin 'Box' to 'Summary Box' per Dan's recommendation. --- .../modules/custom/epa_wysiwyg/js/plugins/epaBox/plugin.js | 4 ++-- .../custom/epa_wysiwyg/src/Plugin/CKEditorPlugin/EPABox.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/drupal/web/modules/custom/epa_wysiwyg/js/plugins/epaBox/plugin.js b/services/drupal/web/modules/custom/epa_wysiwyg/js/plugins/epaBox/plugin.js index 6960a13b7a..b96446a93d 100644 --- a/services/drupal/web/modules/custom/epa_wysiwyg/js/plugins/epaBox/plugin.js +++ b/services/drupal/web/modules/custom/epa_wysiwyg/js/plugins/epaBox/plugin.js @@ -23,14 +23,14 @@ editor.addCommand('epaBoxCommand', new CKEDITOR.dialogCommand('epaBoxDialog')); editor.ui.addButton('epaBoxButton', { - label: 'Related Info Box', + label: 'Related Info Summary Box', command: 'epaBoxCommand', icon: iconPath }); CKEDITOR.dialog.add('epaBoxDialog', function(editor) { return { - title: 'EPA Box', + title: 'Related Info Summary Box', minWidth: 400, minHeight: 200, contents: [{ diff --git a/services/drupal/web/modules/custom/epa_wysiwyg/src/Plugin/CKEditorPlugin/EPABox.php b/services/drupal/web/modules/custom/epa_wysiwyg/src/Plugin/CKEditorPlugin/EPABox.php index bdeb44a6a7..14dd26bc46 100644 --- a/services/drupal/web/modules/custom/epa_wysiwyg/src/Plugin/CKEditorPlugin/EPABox.php +++ b/services/drupal/web/modules/custom/epa_wysiwyg/src/Plugin/CKEditorPlugin/EPABox.php @@ -14,7 +14,7 @@ * * @CKEditorPlugin( * id = "epaBox", - * label = @Translation("Related Info Box") + * label = @Translation("Related Info Summary Box") * ) */ class EPABox extends CKEditorPluginBase { From bc6d6f8ddb950af024492e35044736bd9cd3870a Mon Sep 17 00:00:00 2001 From: Carson Oldson Date: Thu, 16 Dec 2021 12:28:40 -0600 Subject: [PATCH 25/87] [EPAD8-1562] Updating webform to 6.1.2. --- services/drupal/composer.lock | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/services/drupal/composer.lock b/services/drupal/composer.lock index 792c679e93..5bf14a4aea 100644 --- a/services/drupal/composer.lock +++ b/services/drupal/composer.lock @@ -9332,17 +9332,17 @@ }, { "name": "drupal/webform", - "version": "6.0.5", + "version": "6.1.2", "source": { "type": "git", "url": "https://git.drupalcode.org/project/webform.git", - "reference": "6.0.5" + "reference": "6.1.2" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/webform-6.0.5.zip", - "reference": "6.0.5", - "shasum": "a925d604e3b4a29f5a688a8e84fdb3a93490f641" + "url": "https://ftp.drupal.org/files/projects/webform-6.1.2.zip", + "reference": "6.1.2", + "shasum": "3afb96566f5d31474483e163b4e0138d43cffdcd" }, "require": { "drupal/core": "^8.8 || ^9" @@ -9352,15 +9352,15 @@ "drupal/bootstrap": "~3.0", "drupal/captcha": "~1.0", "drupal/chosen": "~3.0", - "drupal/clientside_validation": "~3.0", + "drupal/clientside_validation": "*", "drupal/clientside_validation_jquery": "*", - "drupal/devel": "~3.0", + "drupal/devel": "*", "drupal/entity": "~1.0", - "drupal/entity_print": "~2.0", + "drupal/entity_print": "*", "drupal/gnode": "*", - "drupal/group": "1.0", + "drupal/group": "*", "drupal/jquery_ui": "~1.0", - "drupal/jquery_ui_checkboxradio": "~1.0", + "drupal/jquery_ui_checkboxradio": "*", "drupal/jquery_ui_datepicker": "~1.0", "drupal/lingotek": "~3.0", "drupal/mailsystem": "~4.0", @@ -9369,7 +9369,7 @@ "drupal/smtp": "~1.0", "drupal/styleguide": "~1.0", "drupal/telephone_validation": "~2.0", - "drupal/token": "~1.0", + "drupal/token": "*", "drupal/variationcache": "~1.0", "drupal/webform_access": "*", "drupal/webform_attachment": "*", @@ -9390,8 +9390,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "6.0.5", - "datestamp": "1629909787", + "version": "6.1.2", + "datestamp": "1638988073", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" From b85c5c5d0f1bf67363e9bae8421dfa91f63dff65 Mon Sep 17 00:00:00 2001 From: Carson Oldson Date: Thu, 16 Dec 2021 12:28:58 -0600 Subject: [PATCH 26/87] [EPAD8-1562] Adding new/updated config. --- .../system.action.webform_archive_action.yml | 11 +++++++++++ .../sync/system.action.webform_close_action.yml | 11 +++++++++++ .../sync/system.action.webform_delete_action.yml | 11 +++++++++++ .../sync/system.action.webform_open_action.yml | 11 +++++++++++ .../system.action.webform_unarchive_action.yml | 11 +++++++++++ services/drupal/config/sync/webform.settings.yml | 16 ++++++++++++++++ 6 files changed, 71 insertions(+) create mode 100644 services/drupal/config/sync/system.action.webform_archive_action.yml create mode 100644 services/drupal/config/sync/system.action.webform_close_action.yml create mode 100644 services/drupal/config/sync/system.action.webform_delete_action.yml create mode 100644 services/drupal/config/sync/system.action.webform_open_action.yml create mode 100644 services/drupal/config/sync/system.action.webform_unarchive_action.yml diff --git a/services/drupal/config/sync/system.action.webform_archive_action.yml b/services/drupal/config/sync/system.action.webform_archive_action.yml new file mode 100644 index 0000000000..dcb35cc09f --- /dev/null +++ b/services/drupal/config/sync/system.action.webform_archive_action.yml @@ -0,0 +1,11 @@ +uuid: 31bd3812-ec15-436c-a1d1-054ac8cfd689 +langcode: en +status: true +dependencies: + module: + - webform +id: webform_archive_action +label: 'Archive webform' +type: webform +plugin: webform_archive_action +configuration: { } diff --git a/services/drupal/config/sync/system.action.webform_close_action.yml b/services/drupal/config/sync/system.action.webform_close_action.yml new file mode 100644 index 0000000000..f4cc20a66c --- /dev/null +++ b/services/drupal/config/sync/system.action.webform_close_action.yml @@ -0,0 +1,11 @@ +uuid: e53b9193-874c-4c17-8b3f-d4d5bdc6f1d1 +langcode: en +status: true +dependencies: + module: + - webform +id: webform_close_action +label: 'Close webform' +type: webform +plugin: webform_close_action +configuration: { } diff --git a/services/drupal/config/sync/system.action.webform_delete_action.yml b/services/drupal/config/sync/system.action.webform_delete_action.yml new file mode 100644 index 0000000000..bc51d23cff --- /dev/null +++ b/services/drupal/config/sync/system.action.webform_delete_action.yml @@ -0,0 +1,11 @@ +uuid: 475ce035-e38a-4970-982b-b9d73f3f3f28 +langcode: en +status: true +dependencies: + module: + - webform +id: webform_delete_action +label: 'Delete webform' +type: webform +plugin: webform_delete_action +configuration: { } diff --git a/services/drupal/config/sync/system.action.webform_open_action.yml b/services/drupal/config/sync/system.action.webform_open_action.yml new file mode 100644 index 0000000000..340b74ba65 --- /dev/null +++ b/services/drupal/config/sync/system.action.webform_open_action.yml @@ -0,0 +1,11 @@ +uuid: a1e07ad1-1486-4f80-bff1-7c719cd398d0 +langcode: en +status: true +dependencies: + module: + - webform +id: webform_open_action +label: 'Open webform' +type: webform +plugin: webform_open_action +configuration: { } diff --git a/services/drupal/config/sync/system.action.webform_unarchive_action.yml b/services/drupal/config/sync/system.action.webform_unarchive_action.yml new file mode 100644 index 0000000000..436c7cfceb --- /dev/null +++ b/services/drupal/config/sync/system.action.webform_unarchive_action.yml @@ -0,0 +1,11 @@ +uuid: c5503c54-fadb-4997-ba13-651c250462dd +langcode: en +status: true +dependencies: + module: + - webform +id: webform_unarchive_action +label: 'Restore webform' +type: webform +plugin: webform_unarchive_action +configuration: { } diff --git a/services/drupal/config/sync/webform.settings.yml b/services/drupal/config/sync/webform.settings.yml index a1899007ed..5fdb7b13d2 100644 --- a/services/drupal/config/sync/webform.settings.yml +++ b/services/drupal/config/sync/webform.settings.yml @@ -85,6 +85,20 @@ settings: wide: title: Wide width: 1000 + webform_bulk_form: true + webform_bulk_form_actions: + - webform_open_action + - webform_close_action + - webform_archive_action + - webform_unarchive_action + - webform_delete_action + webform_submission_bulk_form: true + webform_submission_bulk_form_actions: + - webform_submission_make_sticky_action + - webform_submission_make_unsticky_action + - webform_submission_make_lock_action + - webform_submission_make_unlock_action + - webform_submission_delete_action assets: css: '' javascript: '' @@ -123,6 +137,7 @@ batch: purge: cron_size: 100 form: + limit: 50 filter_category: '' filter_state: '' element: @@ -277,6 +292,7 @@ ui: dialog_disabled: false offcanvas_disabled: false promotions_disabled: false + support_disabled: false description_help: true toolbar_item: false libraries: From ca57ba2adf143518b17262abcfff0621d0b26bf9 Mon Sep 17 00:00:00 2001 From: Nathan Han Date: Thu, 16 Dec 2021 11:19:37 -0800 Subject: [PATCH 27/87] [EPAD8-1559] Create new Author Names field --- ..._form_display.node.perspective.default.yml | 12 +++++++ ..._view_display.node.perspective.default.yml | 25 +++++++++++++ ...ity_view_display.node.perspective.link.yml | 2 ++ ..._display.node.perspective.search_index.yml | 2 ++ ...y_view_display.node.perspective.teaser.yml | 2 ++ ...ty_view_display.node.perspective.token.yml | 2 ++ ...ld.node.perspective.field_author_names.yml | 35 +++++++++++++++++++ .../field.storage.node.field_author_names.yml | 20 +++++++++++ 8 files changed, 100 insertions(+) create mode 100644 services/drupal/config/sync/field.field.node.perspective.field_author_names.yml create mode 100644 services/drupal/config/sync/field.storage.node.field_author_names.yml diff --git a/services/drupal/config/sync/core.entity_form_display.node.perspective.default.yml b/services/drupal/config/sync/core.entity_form_display.node.perspective.default.yml index 44eb3f0bd2..54509732c1 100644 --- a/services/drupal/config/sync/core.entity_form_display.node.perspective.default.yml +++ b/services/drupal/config/sync/core.entity_form_display.node.perspective.default.yml @@ -3,6 +3,7 @@ langcode: en status: true dependencies: config: + - field.field.node.perspective.field_author_names - field.field.node.perspective.field_authors - field.field.node.perspective.field_channel - field.field.node.perspective.field_description @@ -131,6 +132,16 @@ content: help_text: '' multiple: false third_party_settings: { } + field_author_names: + type: entity_reference_autocomplete + weight: 17 + region: content + settings: + match_operator: CONTAINS + match_limit: 10 + size: 60 + placeholder: '' + third_party_settings: { } field_authors: type: paragraphs weight: 9 @@ -262,6 +273,7 @@ content: save_lineage: false hierarchy_depth: 0 required_depth: 0 + none_label: '- Please select -' third_party_settings: { } type: cshs region: content diff --git a/services/drupal/config/sync/core.entity_view_display.node.perspective.default.yml b/services/drupal/config/sync/core.entity_view_display.node.perspective.default.yml index 7e3ead893d..1b584b014e 100644 --- a/services/drupal/config/sync/core.entity_view_display.node.perspective.default.yml +++ b/services/drupal/config/sync/core.entity_view_display.node.perspective.default.yml @@ -3,6 +3,7 @@ langcode: en status: true dependencies: config: + - field.field.node.perspective.field_author_names - field.field.node.perspective.field_authors - field.field.node.perspective.field_channel - field.field.node.perspective.field_description @@ -184,6 +185,22 @@ third_party_settings: type: entity_reference_label additional: { } weight: 10 + 440c065c-cdf4-4864-bfdf-b8b1cfde144b: + uuid: 440c065c-cdf4-4864-bfdf-b8b1cfde144b + region: content + configuration: + label_display: '0' + context_mapping: + entity: layout_builder.entity + id: 'field_block:node:perspective:field_author_names' + formatter: + label: above + settings: + link: true + third_party_settings: { } + type: entity_reference_label + additional: { } + weight: 11 third_party_settings: { } layout_builder_restrictions: allowed_block_categories: { } @@ -196,6 +213,14 @@ targetEntityType: node bundle: perspective mode: default content: + field_author_names: + weight: 20 + label: above + settings: + link: true + third_party_settings: { } + type: entity_reference_label + region: content field_authors: type: entity_reference_revisions_entity_view weight: 14 diff --git a/services/drupal/config/sync/core.entity_view_display.node.perspective.link.yml b/services/drupal/config/sync/core.entity_view_display.node.perspective.link.yml index 4aaf213977..3c829023c1 100644 --- a/services/drupal/config/sync/core.entity_view_display.node.perspective.link.yml +++ b/services/drupal/config/sync/core.entity_view_display.node.perspective.link.yml @@ -4,6 +4,7 @@ status: true dependencies: config: - core.entity_view_mode.node.link + - field.field.node.perspective.field_author_names - field.field.node.perspective.field_authors - field.field.node.perspective.field_channel - field.field.node.perspective.field_description @@ -38,6 +39,7 @@ content: { } hidden: content_moderation_control: true entitygroupfield: true + field_author_names: true field_authors: true field_channel: true field_description: true diff --git a/services/drupal/config/sync/core.entity_view_display.node.perspective.search_index.yml b/services/drupal/config/sync/core.entity_view_display.node.perspective.search_index.yml index a22de329c1..8db5eb22cd 100644 --- a/services/drupal/config/sync/core.entity_view_display.node.perspective.search_index.yml +++ b/services/drupal/config/sync/core.entity_view_display.node.perspective.search_index.yml @@ -4,6 +4,7 @@ status: true dependencies: config: - core.entity_view_mode.node.search_index + - field.field.node.perspective.field_author_names - field.field.node.perspective.field_authors - field.field.node.perspective.field_channel - field.field.node.perspective.field_description @@ -48,6 +49,7 @@ content: hidden: content_moderation_control: true entitygroupfield: true + field_author_names: true field_authors: true field_channel: true field_description: true diff --git a/services/drupal/config/sync/core.entity_view_display.node.perspective.teaser.yml b/services/drupal/config/sync/core.entity_view_display.node.perspective.teaser.yml index 391f2ca04e..39d8ef624e 100644 --- a/services/drupal/config/sync/core.entity_view_display.node.perspective.teaser.yml +++ b/services/drupal/config/sync/core.entity_view_display.node.perspective.teaser.yml @@ -4,6 +4,7 @@ status: true dependencies: config: - core.entity_view_mode.node.teaser + - field.field.node.perspective.field_author_names - field.field.node.perspective.field_authors - field.field.node.perspective.field_channel - field.field.node.perspective.field_description @@ -68,6 +69,7 @@ content: hidden: content_moderation_control: true entitygroupfield: true + field_author_names: true field_channel: true field_env_laws_regs_and_treaties: true field_geographic_locations: true diff --git a/services/drupal/config/sync/core.entity_view_display.node.perspective.token.yml b/services/drupal/config/sync/core.entity_view_display.node.perspective.token.yml index e5ba4ece26..241b75e70e 100644 --- a/services/drupal/config/sync/core.entity_view_display.node.perspective.token.yml +++ b/services/drupal/config/sync/core.entity_view_display.node.perspective.token.yml @@ -4,6 +4,7 @@ status: true dependencies: config: - core.entity_view_mode.node.token + - field.field.node.perspective.field_author_names - field.field.node.perspective.field_authors - field.field.node.perspective.field_channel - field.field.node.perspective.field_description @@ -197,6 +198,7 @@ content: third_party_settings: { } hidden: content_moderation_control: true + field_author_names: true field_geographic_locations: true links: true search_api_excerpt: true diff --git a/services/drupal/config/sync/field.field.node.perspective.field_author_names.yml b/services/drupal/config/sync/field.field.node.perspective.field_author_names.yml new file mode 100644 index 0000000000..fd43b837af --- /dev/null +++ b/services/drupal/config/sync/field.field.node.perspective.field_author_names.yml @@ -0,0 +1,35 @@ +uuid: e161c8af-0210-4661-bf3f-b22c7117658a +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_author_names + - node.type.perspective + - taxonomy.vocabulary.author + module: + - custom_add_another +third_party_settings: + custom_add_another: + custom_add_another: '' + custom_remove: '' +id: node.perspective.field_author_names +field_name: field_author_names +entity_type: node +bundle: perspective +label: 'Author Names' +description: 'Hidden field, that stores the names of the Authors associated with this Perspective.' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:taxonomy_term' + handler_settings: + target_bundles: + author: author + sort: + field: name + direction: asc + auto_create: false + auto_create_bundle: '' +field_type: entity_reference diff --git a/services/drupal/config/sync/field.storage.node.field_author_names.yml b/services/drupal/config/sync/field.storage.node.field_author_names.yml new file mode 100644 index 0000000000..3192ba6d40 --- /dev/null +++ b/services/drupal/config/sync/field.storage.node.field_author_names.yml @@ -0,0 +1,20 @@ +uuid: f32dc8ea-6206-41ea-a3ff-3236ebdc3d1a +langcode: en +status: true +dependencies: + module: + - node + - taxonomy +id: node.field_author_names +field_name: field_author_names +entity_type: node +type: entity_reference +settings: + target_type: taxonomy_term +module: core +locked: false +cardinality: -1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false From b6ec50341b01b29d4b6c6e9d401efcd5ea07528f Mon Sep 17 00:00:00 2001 From: Aaron Zinck Date: Fri, 17 Dec 2021 09:37:03 -0500 Subject: [PATCH 28/87] EPAD8-1512 do not rename the ckeditor box plugin --- .../modules/custom/epa_wysiwyg/js/plugins/epaBox/plugin.js | 4 ++-- .../custom/epa_wysiwyg/src/Plugin/CKEditorPlugin/EPABox.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/drupal/web/modules/custom/epa_wysiwyg/js/plugins/epaBox/plugin.js b/services/drupal/web/modules/custom/epa_wysiwyg/js/plugins/epaBox/plugin.js index b96446a93d..6960a13b7a 100644 --- a/services/drupal/web/modules/custom/epa_wysiwyg/js/plugins/epaBox/plugin.js +++ b/services/drupal/web/modules/custom/epa_wysiwyg/js/plugins/epaBox/plugin.js @@ -23,14 +23,14 @@ editor.addCommand('epaBoxCommand', new CKEDITOR.dialogCommand('epaBoxDialog')); editor.ui.addButton('epaBoxButton', { - label: 'Related Info Summary Box', + label: 'Related Info Box', command: 'epaBoxCommand', icon: iconPath }); CKEDITOR.dialog.add('epaBoxDialog', function(editor) { return { - title: 'Related Info Summary Box', + title: 'EPA Box', minWidth: 400, minHeight: 200, contents: [{ diff --git a/services/drupal/web/modules/custom/epa_wysiwyg/src/Plugin/CKEditorPlugin/EPABox.php b/services/drupal/web/modules/custom/epa_wysiwyg/src/Plugin/CKEditorPlugin/EPABox.php index 14dd26bc46..bdeb44a6a7 100644 --- a/services/drupal/web/modules/custom/epa_wysiwyg/src/Plugin/CKEditorPlugin/EPABox.php +++ b/services/drupal/web/modules/custom/epa_wysiwyg/src/Plugin/CKEditorPlugin/EPABox.php @@ -14,7 +14,7 @@ * * @CKEditorPlugin( * id = "epaBox", - * label = @Translation("Related Info Summary Box") + * label = @Translation("Related Info Box") * ) */ class EPABox extends CKEditorPluginBase { From 2f9991a78fde191033046bcde9411d66e50361ec Mon Sep 17 00:00:00 2001 From: Josh Wagner Date: Sun, 19 Dec 2021 17:16:18 -0500 Subject: [PATCH 29/87] [EPAD8-1558] add width for 4th column --- .../web/modules/custom/epa_workflow/css/revision-list.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/services/drupal/web/modules/custom/epa_workflow/css/revision-list.css b/services/drupal/web/modules/custom/epa_workflow/css/revision-list.css index 1d056f1216..098b044605 100644 --- a/services/drupal/web/modules/custom/epa_workflow/css/revision-list.css +++ b/services/drupal/web/modules/custom/epa_workflow/css/revision-list.css @@ -12,6 +12,10 @@ min-width: 200px; } +#edit-node-revisions-table thead th:nth-child(4) { + width: 310px; +} + #edit-node-revisions-table tbody tr:first-child td { padding-bottom: 3rem; } From 8620e2fe85b414fc7b7e32da96663a51acb16db2 Mon Sep 17 00:00:00 2001 From: Nathan Han Date: Sun, 19 Dec 2021 23:50:20 -0800 Subject: [PATCH 30/87] [EPAD8-1559] Create presave --- .../custom/epa_workflow/epa_workflow.module | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/services/drupal/web/modules/custom/epa_workflow/epa_workflow.module b/services/drupal/web/modules/custom/epa_workflow/epa_workflow.module index fe43e08a04..015dad7aad 100644 --- a/services/drupal/web/modules/custom/epa_workflow/epa_workflow.module +++ b/services/drupal/web/modules/custom/epa_workflow/epa_workflow.module @@ -616,3 +616,21 @@ function epa_workflow_module_implements_alter(&$implementations, $hook) { unset($implementations['scheduled_publish']); } } + +/** + * Implements hook_entity_presave(). + */ +function epa_workflow_entity_presave(EntityInterface $entity) { + if ($entity->bundle() == 'perspective') { + $author_paragraphs = $entity->field_author_as_para->getValue(); + $tids = []; + foreach ($author_paragraphs as $author) { + array_push($tids, $author['subform']['field_a'][0]['target_id']); + } + foreach ($tids as $tid) { + $entity->field_author_names[] = [ + 'target_id' => $tid + ]; + } + } +} From 8b9f17e8384c2ebe984668d20ff90b9437549988 Mon Sep 17 00:00:00 2001 From: Dan Mouyard Date: Fri, 17 Dec 2021 16:35:35 -0500 Subject: [PATCH 31/87] EPAD8-1552: Consolidate messages and local tasks to a single admin info block --- .../sync/block.block.gesso_local_actions.yml | 4 +- .../sync/block.block.gesso_local_tasks.yml | 4 +- .../sync/block.block.gesso_messages.yml | 2 +- .../web/themes/epa_theme/includes/node.inc | 48 +++++++++++++++++++ .../epa_theme/js/src/toggle-admin.es6.js | 4 +- .../epa_theme/source/_meta/_00-head.mustache | 17 +++++++ .../epa_theme/source/_meta/_00-head.twig | 16 +++++++ .../epa_theme/source/_meta/_01-foot.mustache | 6 +++ .../epa_theme/source/_meta/_01-foot.twig | 6 +++ .../article-with-admin/article-with-admin.md | 2 +- .../article-with-sidebar.md | 2 +- .../05-components/article/article.md | 2 +- .../05-components/article/article.twig | 29 ++++++----- .../detail-pages/page-with-sidenav.twig | 9 ++-- .../06-templates/detail-pages/page.twig | 9 ++-- .../listing-pages/listing-page.twig | 12 ++--- .../web-area-homepages/microsite.twig | 14 +++--- .../resource-directory.twig | 12 ++--- .../07-pages/detail-pages/00-page.twig | 9 +--- .../detail-pages/02-page-with-sidenav.twig | 2 +- .../03-page-with-wide-template.twig | 11 ++--- .../07-pages/detail-pages/event.twig | 5 +- .../detail-pages/frequent-question.twig | 2 +- .../07-pages/detail-pages/news-release.twig | 5 +- .../perspective-with-two-authors.twig | 5 +- .../07-pages/detail-pages/perspective.twig | 5 +- .../07-pages/detail-pages/public-notice.twig | 5 +- .../07-pages/detail-pages/regulation.twig | 5 +- .../detail-pages/webform-with-sidenav.twig | 2 +- .../07-pages/detail-pages/webform.twig | 11 ++--- .../listing-pages/frequent-questions.twig | 2 +- .../07-pages/listing-pages/news-releases.twig | 2 +- .../07-pages/listing-pages/perspectives.twig | 2 +- .../listing-pages/public-notices.twig | 2 +- .../web-area-homepages/microsite.twig | 11 ++--- .../resource-directory.twig | 11 ++--- .../content/node--event--full.html.twig | 23 ++++----- .../content/node--faq--full.html.twig | 23 ++++----- .../templates/content/node--full.html.twig | 23 ++++----- .../node--news-release--full.html.twig | 23 ++++----- .../content/node--perspective--full.html.twig | 23 ++++----- .../node--public-notice--full.html.twig | 23 ++++----- .../content/node--regulation--full.html.twig | 23 ++++----- .../content/node--web-area.html.twig | 19 ++++---- .../views/views-view--search-faqs.html.twig | 15 +++--- ...views-view--search-news-releases.html.twig | 15 +++--- .../views-view--search-perspectives.html.twig | 15 +++--- ...iews-view--search-public-notices.html.twig | 15 +++--- 48 files changed, 301 insertions(+), 234 deletions(-) create mode 100644 services/drupal/web/themes/epa_theme/source/_meta/_00-head.mustache create mode 100644 services/drupal/web/themes/epa_theme/source/_meta/_00-head.twig create mode 100644 services/drupal/web/themes/epa_theme/source/_meta/_01-foot.mustache create mode 100644 services/drupal/web/themes/epa_theme/source/_meta/_01-foot.twig diff --git a/services/drupal/config/sync/block.block.gesso_local_actions.yml b/services/drupal/config/sync/block.block.gesso_local_actions.yml index d3fd83ea4d..c7f1b00242 100644 --- a/services/drupal/config/sync/block.block.gesso_local_actions.yml +++ b/services/drupal/config/sync/block.block.gesso_local_actions.yml @@ -8,8 +8,8 @@ _core: default_config_hash: PffmQ-ABSz5tFjWmVsR7NesunDnEivvopnJnBjl8KNE id: gesso_local_actions theme: epa_theme -region: disabled -weight: 0 +region: messages +weight: -16 provider: null plugin: local_actions_block settings: diff --git a/services/drupal/config/sync/block.block.gesso_local_tasks.yml b/services/drupal/config/sync/block.block.gesso_local_tasks.yml index a56d5bb9ae..e11dc40fe6 100644 --- a/services/drupal/config/sync/block.block.gesso_local_tasks.yml +++ b/services/drupal/config/sync/block.block.gesso_local_tasks.yml @@ -8,8 +8,8 @@ _core: default_config_hash: c-06bbElRY5sKmglk74ppgTW93Et4-EJFyNiUZMb8JY id: gesso_local_tasks theme: epa_theme -region: disabled -weight: 0 +region: messages +weight: -17 provider: null plugin: local_tasks_block settings: diff --git a/services/drupal/config/sync/block.block.gesso_messages.yml b/services/drupal/config/sync/block.block.gesso_messages.yml index f301c263bc..2fb42ef0c0 100644 --- a/services/drupal/config/sync/block.block.gesso_messages.yml +++ b/services/drupal/config/sync/block.block.gesso_messages.yml @@ -11,7 +11,7 @@ _core: id: gesso_messages theme: epa_theme region: messages -weight: -14 +weight: -18 provider: null plugin: system_messages_block settings: diff --git a/services/drupal/web/themes/epa_theme/includes/node.inc b/services/drupal/web/themes/epa_theme/includes/node.inc index 258cb15eb0..24a6366df3 100644 --- a/services/drupal/web/themes/epa_theme/includes/node.inc +++ b/services/drupal/web/themes/epa_theme/includes/node.inc @@ -2,6 +2,22 @@ use Drupal\Core\Link; +/** + * Implements hook_preprocess_node(). + */ +function epa_theme_preprocess_node(&$variables) { + $view_mode = $variables['view_mode']; + + // Array of view modes to add regions to. + $allowed_view_modes = ['full']; + + if (in_array($view_mode, $allowed_view_modes)) { + // Array of regions to add to node template. + $allowed_regions = ['messages']; + _add_regions_to_node($allowed_regions, $variables); + } +} + /** * Implements hook_preprocess_node__BUNDLE__VIEW_MODE(). */ @@ -95,3 +111,35 @@ function epa_theme_preprocess_node__news_release__full(&$variables) { } } } + +/** +* Custom function to add page regions to node templates. +*/ +function _add_regions_to_node($allowed_regions, &$variables) { + // Get active theme. + $theme = \Drupal::theme()->getActiveTheme()->getName(); + + // Get current theme regions. + $available_regions = system_region_list($theme, 'REGIONS_ALL'); + + // Validate allowed regions with available regions. + $regions = array_intersect(array_keys($available_regions), $allowed_regions); + + foreach ($regions as $key => $region) { + // Load blocks from this region and sort them. + $blocks = \Drupal::entityTypeManager() + ->getStorage('block') + ->loadByProperties(array('theme' => $theme, 'region' => $region)); + uasort($blocks, 'Drupal\block\Entity\Block::sort'); + + // Build blocks and assign to template variable. + $build = array(); + $builder = \Drupal::entityTypeManager()->getViewBuilder('block'); + foreach ($blocks as $key => $block) { + if ($block->access('view')) { + $build[$key] = $builder->view($block, 'block'); + } + } + $variables['region_' . $region] = $build; + } +} diff --git a/services/drupal/web/themes/epa_theme/js/src/toggle-admin.es6.js b/services/drupal/web/themes/epa_theme/js/src/toggle-admin.es6.js index b85cb820bd..cc3dcceb1e 100644 --- a/services/drupal/web/themes/epa_theme/js/src/toggle-admin.es6.js +++ b/services/drupal/web/themes/epa_theme/js/src/toggle-admin.es6.js @@ -5,9 +5,7 @@ import Drupal from 'drupal'; Drupal.behaviors.toggleAdmin = { attach(context) { const toggleButton = context.querySelector('.js-toggle-admin'); - const adminContent = context.querySelectorAll( - '.usa-alert, .button-group--base[aria-label="Primary tasks"], #content-moderation-entity-moderation-form' - ); + const adminContent = context.querySelectorAll('.js-toggle-admin-content'); if (toggleButton !== null) { toggleButton.addEventListener('click', event => { diff --git a/services/drupal/web/themes/epa_theme/source/_meta/_00-head.mustache b/services/drupal/web/themes/epa_theme/source/_meta/_00-head.mustache new file mode 100644 index 0000000000..45ce3bb7d0 --- /dev/null +++ b/services/drupal/web/themes/epa_theme/source/_meta/_00-head.mustache @@ -0,0 +1,17 @@ + + + + {{ title }} + + + + + + + + {{{ patternLabHead }}} + + + + + diff --git a/services/drupal/web/themes/epa_theme/source/_meta/_00-head.twig b/services/drupal/web/themes/epa_theme/source/_meta/_00-head.twig new file mode 100644 index 0000000000..4b49c63b7c --- /dev/null +++ b/services/drupal/web/themes/epa_theme/source/_meta/_00-head.twig @@ -0,0 +1,16 @@ + + + + {{ title }} + + + + + + + + {{ patternLabHead | raw }} + + + + diff --git a/services/drupal/web/themes/epa_theme/source/_meta/_01-foot.mustache b/services/drupal/web/themes/epa_theme/source/_meta/_01-foot.mustache new file mode 100644 index 0000000000..797d9418d9 --- /dev/null +++ b/services/drupal/web/themes/epa_theme/source/_meta/_01-foot.mustache @@ -0,0 +1,6 @@ + + +{{{ patternLabFoot }}} + + + diff --git a/services/drupal/web/themes/epa_theme/source/_meta/_01-foot.twig b/services/drupal/web/themes/epa_theme/source/_meta/_01-foot.twig new file mode 100644 index 0000000000..159dae3eb6 --- /dev/null +++ b/services/drupal/web/themes/epa_theme/source/_meta/_01-foot.twig @@ -0,0 +1,6 @@ + + +{{ patternLabFoot | raw }} + + + diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/05-components/article/article-with-admin/article-with-admin.md b/services/drupal/web/themes/epa_theme/source/_patterns/05-components/article/article-with-admin/article-with-admin.md index 74f762e60a..bc228d887c 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/05-components/article/article-with-admin/article-with-admin.md +++ b/services/drupal/web/themes/epa_theme/source/_patterns/05-components/article/article-with-admin/article-with-admin.md @@ -10,5 +10,5 @@ __Variables:__ __Blocks:__ * title: Twig block for title. -* local_tasks: Twig block for local tasks. +* admin_info: Twig block for status messages and local tasks. * content: Twig block for main content. diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/05-components/article/article-with-sidebar/article-with-sidebar.md b/services/drupal/web/themes/epa_theme/source/_patterns/05-components/article/article-with-sidebar/article-with-sidebar.md index 39405a27a2..40d77eb32c 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/05-components/article/article-with-sidebar/article-with-sidebar.md +++ b/services/drupal/web/themes/epa_theme/source/_patterns/05-components/article/article-with-sidebar/article-with-sidebar.md @@ -11,5 +11,5 @@ __Variables:__ __Blocks:__ * title: Twig block for title. -* local_tasks: Twig block for local tasks. +* admin_info: Twig block for status messages and local tasks. * content: Twig block for main content. diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/05-components/article/article.md b/services/drupal/web/themes/epa_theme/source/_patterns/05-components/article/article.md index d41a5fe023..1c1d20227a 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/05-components/article/article.md +++ b/services/drupal/web/themes/epa_theme/source/_patterns/05-components/article/article.md @@ -10,5 +10,5 @@ __Variables:__ __Blocks:__ * title: Twig block for title. -* local_tasks: Twig block for local tasks. +* admin_info: Twig block for status messages and local tasks. * content: Twig block for main content. diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/05-components/article/article.twig b/services/drupal/web/themes/epa_theme/source/_patterns/05-components/article/article.twig index f48c9bae06..82d7055281 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/05-components/article/article.twig +++ b/services/drupal/web/themes/epa_theme/source/_patterns/05-components/article/article.twig @@ -28,22 +28,21 @@ } %} {% endblock %} - {% block messages %} - {% if show_admin_info %} - {% include '@uswds/alert/alert--success/alert--success.twig' with { - 'title': 'Status message', - 'content': '

Basic page ' ~ page_title ~ ' has been updated.

', - } %} - {% endif %} - {% endblock %} - {% block local_tasks %} - {% if show_admin_info %} - {% include '@components/button-group/button-group--base/button-group--base.twig' with { - 'buttons': local_tasks, - } %} - {% endif %} - {% endblock %} + {% if show_admin_info %} +
+ {% block admin_info %} + {% include '@uswds/alert/alert--success/alert--success.twig' with { + 'title': 'Status message', + 'content': '

Basic page ' ~ page_title ~ ' has been updated.

', + } %} + + {% include '@components/button-group/button-group--base/button-group--base.twig' with { + 'buttons': local_tasks, + } %} + {% endblock %} +
+ {% endif %} {% block intro %} {% if intro %} diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/06-templates/detail-pages/page-with-sidenav.twig b/services/drupal/web/themes/epa_theme/source/_patterns/06-templates/detail-pages/page-with-sidenav.twig index fa77d11eb6..467f454ea7 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/06-templates/detail-pages/page-with-sidenav.twig +++ b/services/drupal/web/themes/epa_theme/source/_patterns/06-templates/detail-pages/page-with-sidenav.twig @@ -9,14 +9,11 @@ 'intro': intro, 'content': body, 'sidebar': sidebar, + 'show_admin_info': show_admin_info, } %} - {% block messages %} - {{ messages }} - {% endblock %} - - {% block local_tasks %} - {{ tasks }} + {% block admin_info %} + {{ admin_info }} {% endblock %} {% endembed %} {% endblock %} diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/06-templates/detail-pages/page.twig b/services/drupal/web/themes/epa_theme/source/_patterns/06-templates/detail-pages/page.twig index 80c6cf7ae4..cb8065b7fe 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/06-templates/detail-pages/page.twig +++ b/services/drupal/web/themes/epa_theme/source/_patterns/06-templates/detail-pages/page.twig @@ -4,14 +4,11 @@ 'intro': intro, 'content': body, 'sidebar': sidebar, + 'show_admin_info': show_admin_info, } %} - {% block messages %} - {{ messages }} - {% endblock %} - - {% block local_tasks %} - {{ tasks }} + {% block admin_info %} + {{ admin_info }} {% endblock %} {% endembed %} {% endset %} diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/06-templates/listing-pages/listing-page.twig b/services/drupal/web/themes/epa_theme/source/_patterns/06-templates/listing-pages/listing-page.twig index 94d29a1109..6ac0138ebe 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/06-templates/listing-pages/listing-page.twig +++ b/services/drupal/web/themes/epa_theme/source/_patterns/06-templates/listing-pages/listing-page.twig @@ -4,13 +4,11 @@ 'contextual_links': contextual_links, } %} - {% block messages %} - {{ messages }} - {% endblock %} - - {% block local_tasks %} - {{ tasks }} - {% endblock %} + {% if show_admin_info %} +
+ {{ admin_info }} +
+ {% endif %} {% block intro %} {{ intro }} diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/06-templates/web-area-homepages/microsite.twig b/services/drupal/web/themes/epa_theme/source/_patterns/06-templates/web-area-homepages/microsite.twig index 35d54d882a..2fd0b60659 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/06-templates/web-area-homepages/microsite.twig +++ b/services/drupal/web/themes/epa_theme/source/_patterns/06-templates/web-area-homepages/microsite.twig @@ -1,15 +1,13 @@ {% set content %} {% include '@components/page-title/page-title.twig' with { - 'page_title': title + 'page_title': title, } %} - {% block messages %} - {{ messages }} - {% endblock %} - - {% block local_tasks %} - {{ tasks }} - {% endblock %} + {% if show_admin_info %} +
+ {{ admin_info }} +
+ {% endif %} {{ slideshow }} {{ body }} diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/06-templates/web-area-homepages/resource-directory.twig b/services/drupal/web/themes/epa_theme/source/_patterns/06-templates/web-area-homepages/resource-directory.twig index 64b44ccc2e..7f54ae11ad 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/06-templates/web-area-homepages/resource-directory.twig +++ b/services/drupal/web/themes/epa_theme/source/_patterns/06-templates/web-area-homepages/resource-directory.twig @@ -3,13 +3,11 @@ 'page_title': title } %} - {% block messages %} - {{ messages }} - {% endblock %} - - {% block local_tasks %} - {{ tasks }} - {% endblock %} + {% if show_admin_info %} +
+ {{ admin_info }} +
+ {% endif %} {% include '@layouts/resource-directory/resource-directory.twig' with { 'has_sidebar': has_sidebar, diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/00-page.twig b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/00-page.twig index ad58254c8d..5c4c0e714c 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/00-page.twig +++ b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/00-page.twig @@ -16,17 +16,13 @@ } %} {% endset %} -{% set page_messages %} +{% set admin_info %} {% if show_admin_info %} {% include '@uswds/alert/alert--success/alert--success.twig' with { 'title': 'Status message', 'content': '

Basic page ' ~ page_title ~ ' has been updated.

', } %} - {% endif %} -{% endset %} -{% set page_tasks %} - {% if show_admin_info %} {% include '@components/button-group/button-group--base/button-group--base.twig' with { 'buttons': local_tasks, } %} @@ -54,8 +50,7 @@ {% set page_content %} {% include '@templates/detail-pages/page.twig' with { 'title': page_title, - 'messages': page_messages, - 'tasks': page_tasks, + 'admin_info': admin_info, 'intro': intro, 'body': content, } %} diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/02-page-with-sidenav.twig b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/02-page-with-sidenav.twig index aca368df80..42cef24669 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/02-page-with-sidenav.twig +++ b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/02-page-with-sidenav.twig @@ -121,5 +121,5 @@ {# pass page_content to default page wrapper #} {% include '@pages/_page-default.twig' with { - 'content': page_content + 'content': page_content, } %} diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/03-page-with-wide-template.twig b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/03-page-with-wide-template.twig index 3e3f61cc96..d474769640 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/03-page-with-wide-template.twig +++ b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/03-page-with-wide-template.twig @@ -11,17 +11,13 @@ } %} {% endset %} -{% set page_messages %} +{% set page_admin_info %} {% if show_admin_info %} {% include '@uswds/alert/alert--success/alert--success.twig' with { 'title': 'Status message', 'content': '

Basic page ' ~ page_title ~ ' has been updated.

', } %} - {% endif %} -{% endset %} -{% set page_tasks %} - {% if show_admin_info %} {% include '@components/button-group/button-group--base/button-group--base.twig' with { 'buttons': local_tasks, } %} @@ -175,8 +171,7 @@ {% set page_content %} {% include '@templates/detail-pages/page.twig' with { 'title': page_title, - 'messages': page_messages, - 'tasks': page_tasks, + 'admin_info': page_admin_info, 'intro': intro, 'body': content, } %} @@ -184,5 +179,5 @@ {# pass page_content to default page wrapper #} {% include '@pages/_page-default.twig' with { - 'content': page_content + 'content': page_content, } %} diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/event.twig b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/event.twig index ce69a4d0a7..7597f848c0 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/event.twig +++ b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/event.twig @@ -72,8 +72,7 @@ {% set page_content %} {% include '@templates/detail-pages/page.twig' with { 'title': page_title, - 'messages': page_messages, - 'tasks': page_tasks, + 'admin_info': page_admin_info, 'intro': intro, 'body': content, } %} @@ -81,5 +80,5 @@ {# pass page_content to default page wrapper #} {% include '@pages/_page-default.twig' with { - 'content': page_content + 'content': page_content, } %} diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/frequent-question.twig b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/frequent-question.twig index d2c1b3bdbb..edaace09ab 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/frequent-question.twig +++ b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/frequent-question.twig @@ -48,5 +48,5 @@ {# pass page_content to default page wrapper #} {% include '@pages/_page-default.twig' with { - 'content': page_content + 'content': page_content, } %} diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/news-release.twig b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/news-release.twig index 0d113d7e61..a18008f872 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/news-release.twig +++ b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/news-release.twig @@ -37,8 +37,7 @@ {% set page_content %} {% include '@templates/detail-pages/page.twig' with { 'title': page_title, - 'messages': page_messages, - 'tasks': page_tasks, + 'admin_info': page_admin_info, 'intro': intro, 'body': content, } %} @@ -46,5 +45,5 @@ {# pass page_content to default page wrapper #} {% include '@pages/_page-default.twig' with { - 'content': page_content + 'content': page_content, } %} diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/perspective-with-two-authors.twig b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/perspective-with-two-authors.twig index f982d2fe7e..53e5be7b84 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/perspective-with-two-authors.twig +++ b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/perspective-with-two-authors.twig @@ -68,8 +68,7 @@ {% set page_content %} {% include '@templates/detail-pages/page.twig' with { 'title': page_title, - 'messages': page_messages, - 'tasks': page_tasks, + 'admin_info': page_admin_info, 'intro': intro, 'body': content, } %} @@ -77,5 +76,5 @@ {# pass page_content to default page wrapper #} {% include '@pages/_page-default.twig' with { - 'content': page_content + 'content': page_content, } %} diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/perspective.twig b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/perspective.twig index a47d99a2a6..c2295344b1 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/perspective.twig +++ b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/perspective.twig @@ -51,8 +51,7 @@ {% set page_content %} {% include '@templates/detail-pages/page.twig' with { 'title': page_title, - 'messages': page_messages, - 'tasks': page_tasks, + 'admin_info': page_admin_info, 'intro': intro, 'body': content, } %} @@ -60,5 +59,5 @@ {# pass page_content to default page wrapper #} {% include '@pages/_page-default.twig' with { - 'content': page_content + 'content': page_content, } %} diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/public-notice.twig b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/public-notice.twig index d1ef085e47..40c1599442 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/public-notice.twig +++ b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/public-notice.twig @@ -73,8 +73,7 @@ {% set page_content %} {% include '@templates/detail-pages/page.twig' with { 'title': page_title, - 'messages': page_messages, - 'tasks': page_tasks, + 'admin_info': page_admin_info, 'intro': intro, 'body': content, } %} @@ -82,5 +81,5 @@ {# pass page_content to default page wrapper #} {% include '@pages/_page-default.twig' with { - 'content': page_content + 'content': page_content, } %} diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/regulation.twig b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/regulation.twig index f72febaa51..a53613403b 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/regulation.twig +++ b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/regulation.twig @@ -112,8 +112,7 @@ {% set page_content %} {% include '@templates/detail-pages/page.twig' with { 'title': page_title, - 'messages': page_messages, - 'tasks': page_tasks, + 'admin_info': page_admin_info, 'intro': intro, 'body': content, } %} @@ -121,5 +120,5 @@ {# pass page_content to default page wrapper #} {% include '@pages/_page-default.twig' with { - 'content': page_content + 'content': page_content, } %} diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/webform-with-sidenav.twig b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/webform-with-sidenav.twig index cac622c59c..e4f4e65db0 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/webform-with-sidenav.twig +++ b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/webform-with-sidenav.twig @@ -121,5 +121,5 @@ {# pass page_content to default page wrapper #} {% include '@pages/_page-default.twig' with { - 'content': page_content + 'content': page_content, } %} diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/webform.twig b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/webform.twig index ff50bb2aab..49b9809223 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/webform.twig +++ b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/detail-pages/webform.twig @@ -11,17 +11,13 @@ } %} {% endset %} -{% set page_messages %} +{% set page_admin_info %} {% if show_admin_info %} {% include '@uswds/alert/alert--success/alert--success.twig' with { 'title': 'Status message', 'content': '

Basic page ' ~ page_title ~ ' has been updated.

', } %} - {% endif %} -{% endset %} -{% set page_tasks %} - {% if show_admin_info %} {% include '@components/button-group/button-group--base/button-group--base.twig' with { 'buttons': local_tasks, } %} @@ -76,8 +72,7 @@ {% set page_content %} {% include '@templates/detail-pages/page.twig' with { 'title': page_title, - 'messages': page_messages, - 'tasks': page_tasks, + 'admin_info': page_admin_info, 'intro': intro, 'body': content, 'sidebar': sidebar, @@ -86,5 +81,5 @@ {# pass page_content to default page wrapper #} {% include '@pages/_page-default.twig' with { - 'content': page_content + 'content': page_content, } %} diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/listing-pages/frequent-questions.twig b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/listing-pages/frequent-questions.twig index 712a41e7c6..2262520734 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/listing-pages/frequent-questions.twig +++ b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/listing-pages/frequent-questions.twig @@ -86,5 +86,5 @@ {# pass page_content to default page wrapper #} {% include '@pages/_page-default.twig' with { - 'content': page_content + 'content': page_content, } %} diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/listing-pages/news-releases.twig b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/listing-pages/news-releases.twig index e21e848b5b..5bf7a23507 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/listing-pages/news-releases.twig +++ b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/listing-pages/news-releases.twig @@ -102,5 +102,5 @@ {# pass page_content to default page wrapper #} {% include '@pages/_page-default.twig' with { - 'content': page_content + 'content': page_content, } %} diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/listing-pages/perspectives.twig b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/listing-pages/perspectives.twig index 70a0a45491..49a07f63ae 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/listing-pages/perspectives.twig +++ b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/listing-pages/perspectives.twig @@ -95,5 +95,5 @@ {# pass page_content to default page wrapper #} {% include '@pages/_page-default.twig' with { - 'content': page_content + 'content': page_content, } %} diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/listing-pages/public-notices.twig b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/listing-pages/public-notices.twig index c2e8c53601..b0a457dbc8 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/listing-pages/public-notices.twig +++ b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/listing-pages/public-notices.twig @@ -87,5 +87,5 @@ {# pass page_content to default page wrapper #} {% include '@pages/_page-default.twig' with { - 'content': page_content + 'content': page_content, } %} diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/web-area-homepages/microsite.twig b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/web-area-homepages/microsite.twig index 71fa18b3cc..6ac8a92f9b 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/web-area-homepages/microsite.twig +++ b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/web-area-homepages/microsite.twig @@ -5,17 +5,13 @@ } %} {% endset %} -{% set page_messages %} +{% set page_admin_info %} {% if show_admin_info %} {% include '@uswds/alert/alert--success/alert--success.twig' with { 'title': 'Status message', 'content': '

Basic page ' ~ page_title ~ ' has been updated.

', } %} - {% endif %} -{% endset %} -{% set page_tasks %} - {% if show_admin_info %} {% include '@components/button-group/button-group--base/button-group--base.twig' with { 'buttons': local_tasks, } %} @@ -184,8 +180,7 @@ {% set page_content %} {% include '@templates/web-area-homepages/microsite.twig' with { 'title': page_title, - 'messages': page_messages, - 'tasks': page_tasks, + 'admin_info': page_admin_info, 'has_header': has_header, 'slideshow': slideshow, 'body': content, @@ -194,5 +189,5 @@ {# pass page_content to default page wrapper #} {% include '@pages/_page-default.twig' with { - 'content': page_content + 'content': page_content, } %} diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/web-area-homepages/resource-directory.twig b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/web-area-homepages/resource-directory.twig index 8848cb3d74..90463178bf 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/web-area-homepages/resource-directory.twig +++ b/services/drupal/web/themes/epa_theme/source/_patterns/07-pages/web-area-homepages/resource-directory.twig @@ -5,17 +5,13 @@ } %} {% endset %} -{% set page_messages %} +{% set page_admin_info %} {% if show_admin_info %} {% include '@uswds/alert/alert--success/alert--success.twig' with { 'title': 'Status message', 'content': '

Basic page ' ~ page_title ~ ' has been updated.

', } %} - {% endif %} -{% endset %} -{% set page_tasks %} - {% if show_admin_info %} {% include '@components/button-group/button-group--base/button-group--base.twig' with { 'buttons': local_tasks, } %} @@ -137,8 +133,7 @@ {% set page_content %} {% include '@templates/web-area-homepages/resource-directory.twig' with { 'title': page_title, - 'messages': page_messages, - 'tasks': page_tasks, + 'admin_info': page_admin_info, 'has_header': has_header, 'has_sidebar': has_sidebar, 'main_top': main_top, @@ -158,5 +153,5 @@ {# pass page_content to default page wrapper #} {% include '@pages/_page-default.twig' with { - 'content': page_content + 'content': page_content, } %} diff --git a/services/drupal/web/themes/epa_theme/templates/content/node--event--full.html.twig b/services/drupal/web/themes/epa_theme/templates/content/node--event--full.html.twig index bfdf27bd4f..90a0d7b784 100644 --- a/services/drupal/web/themes/epa_theme/templates/content/node--event--full.html.twig +++ b/services/drupal/web/themes/epa_theme/templates/content/node--event--full.html.twig @@ -31,16 +31,17 @@ {{ drupal_entity('block', 'webareaheader', check_access=false) }} {% endset %} -{% set messages %} - {{ drupal_block('system_messages_block', wrapper=false) }} -{% endset %} - -{% set local_tasks %} - {{ drupal_block('local_tasks_block', wrapper=false) }} - {{ drupal_block('local_actions_block', wrapper=false) }} +{% set admin_info %} + {{ region_messages }} {{ content.epa_content_moderation_control }} {% endset %} +{% set show_admin_info = false %} + +{% if admin_info|render|striptags|trim %} + {% set show_admin_info = true %} +{% endif %} + {% set footer %} {{ drupal_entity('block', 'webareafooter', check_access=false) }} {% endset %} @@ -87,8 +88,8 @@ 'header_info': header_info, 'contact_link': contact_link, 'title': title, - 'messages': messages, - 'tasks': local_tasks, + 'admin_info': admin_info, + 'show_admin_info': show_admin_info, 'body': body, 'sidenav': sidenav, 'footer': footer, @@ -100,8 +101,8 @@ 'header_info': header_info, 'contact_link': contact_link, 'title': title, - 'messages': messages, - 'tasks': local_tasks, + 'admin_info': admin_info, + 'show_admin_info': show_admin_info, 'body': body, 'footer': footer, } %} diff --git a/services/drupal/web/themes/epa_theme/templates/content/node--faq--full.html.twig b/services/drupal/web/themes/epa_theme/templates/content/node--faq--full.html.twig index 20b58d029e..ce19fe6be3 100644 --- a/services/drupal/web/themes/epa_theme/templates/content/node--faq--full.html.twig +++ b/services/drupal/web/themes/epa_theme/templates/content/node--faq--full.html.twig @@ -36,16 +36,17 @@ {{ drupal_entity('block', 'webareaheader', check_access=false) }} {% endset %} -{% set messages %} - {{ drupal_block('system_messages_block', wrapper=false) }} -{% endset %} - -{% set local_tasks %} - {{ drupal_block('local_tasks_block', wrapper=false) }} - {{ drupal_block('local_actions_block', wrapper=false) }} +{% set admin_info %} + {{ region_messages }} {{ content.epa_content_moderation_control }} {% endset %} +{% set show_admin_info = false %} + +{% if admin_info|render|striptags|trim %} + {% set show_admin_info = true %} +{% endif %} + {% set footer %} {{ drupal_entity('block', 'webareafooter', check_access=false) }} {% endset %} @@ -74,8 +75,8 @@ 'header_info': header_info, 'contact_link': contact_link, 'title': content.field_question, - 'messages': messages, - 'tasks': local_tasks, + 'admin_info': admin_info, + 'show_admin_info': show_admin_info, 'body': content|without('epa_content_moderation_control', 'field_question'), 'sidenav': sidenav, 'footer': footer, @@ -87,8 +88,8 @@ 'header_info': header_info, 'contact_link': contact_link, 'title': content.field_question, - 'messages': messages, - 'tasks': local_tasks, + 'admin_info': admin_info, + 'show_admin_info': show_admin_info, 'body': content|without('epa_content_moderation_control', 'field_question'), 'footer': footer, } %} diff --git a/services/drupal/web/themes/epa_theme/templates/content/node--full.html.twig b/services/drupal/web/themes/epa_theme/templates/content/node--full.html.twig index d3a57fa8dd..2696b52c9a 100644 --- a/services/drupal/web/themes/epa_theme/templates/content/node--full.html.twig +++ b/services/drupal/web/themes/epa_theme/templates/content/node--full.html.twig @@ -36,16 +36,17 @@ {{ drupal_entity('block', 'webareaheader', check_access=false) }} {% endset %} -{% set messages %} - {{ drupal_block('system_messages_block', wrapper=false) }} -{% endset %} - -{% set local_tasks %} - {{ drupal_block('local_tasks_block', wrapper=false) }} - {{ drupal_block('local_actions_block', wrapper=false) }} +{% set admin_info %} + {{ region_messages }} {{ content.epa_content_moderation_control }} {% endset %} +{% set show_admin_info = false %} + +{% if admin_info|render|striptags|trim %} + {% set show_admin_info = true %} +{% endif %} + {% set footer %} {{ drupal_entity('block', 'webareafooter', check_access=false) }} {% endset %} @@ -74,8 +75,8 @@ 'header_info': header_info, 'contact_link': contact_link, 'title': label, - 'messages': messages, - 'tasks': local_tasks, + 'admin_info': admin_info, + 'show_admin_info': show_admin_info, 'body': content|without('epa_content_moderation_control'), 'sidenav': sidenav, 'footer': footer, @@ -87,8 +88,8 @@ 'header_info': header_info, 'contact_link': contact_link, 'title': label, - 'messages': messages, - 'tasks': local_tasks, + 'admin_info': admin_info, + 'show_admin_info': show_admin_info, 'body': content|without('epa_content_moderation_control'), 'footer': footer, } %} diff --git a/services/drupal/web/themes/epa_theme/templates/content/node--news-release--full.html.twig b/services/drupal/web/themes/epa_theme/templates/content/node--news-release--full.html.twig index 302640b76d..e2a792cd6a 100644 --- a/services/drupal/web/themes/epa_theme/templates/content/node--news-release--full.html.twig +++ b/services/drupal/web/themes/epa_theme/templates/content/node--news-release--full.html.twig @@ -34,16 +34,17 @@ {{ drupal_entity('block', 'webareaheader', check_access=false) }} {% endset %} -{% set messages %} - {{ drupal_block('system_messages_block', wrapper=false) }} -{% endset %} - -{% set local_tasks %} - {{ drupal_block('local_tasks_block', wrapper=false) }} - {{ drupal_block('local_actions_block', wrapper=false) }} +{% set admin_info %} + {{ region_messages }} {{ content.epa_content_moderation_control }} {% endset %} +{% set show_admin_info = false %} + +{% if admin_info|render|striptags|trim %} + {% set show_admin_info = true %} +{% endif %} + {% set footer %} {{ drupal_entity('block', 'webareafooter', check_access=false) }} {% endset %} @@ -82,8 +83,8 @@ 'header_info': header_info, 'contact_link': contact_link, 'title': label, - 'messages': messages, - 'tasks': local_tasks, + 'admin_info': admin_info, + 'show_admin_info': show_admin_info, 'body': body, 'sidenav': sidenav, 'footer': footer, @@ -95,8 +96,8 @@ 'header_info': header_info, 'contact_link': contact_link, 'title': label, - 'messages': messages, - 'tasks': local_tasks, + 'admin_info': admin_info, + 'show_admin_info': show_admin_info, 'body': body, 'footer': footer, } %} diff --git a/services/drupal/web/themes/epa_theme/templates/content/node--perspective--full.html.twig b/services/drupal/web/themes/epa_theme/templates/content/node--perspective--full.html.twig index eaadce9dba..d1f8a90a55 100644 --- a/services/drupal/web/themes/epa_theme/templates/content/node--perspective--full.html.twig +++ b/services/drupal/web/themes/epa_theme/templates/content/node--perspective--full.html.twig @@ -29,16 +29,17 @@ {{ drupal_entity('block', 'webareaheader', check_access=false) }} {% endset %} -{% set messages %} - {{ drupal_block('system_messages_block', wrapper=false) }} -{% endset %} - -{% set local_tasks %} - {{ drupal_block('local_tasks_block', wrapper=false) }} - {{ drupal_block('local_actions_block', wrapper=false) }} +{% set admin_info %} + {{ region_messages }} {{ content.epa_content_moderation_control }} {% endset %} +{% set show_admin_info = false %} + +{% if admin_info|render|striptags|trim %} + {% set show_admin_info = true %} +{% endif %} + {% set footer %} {{ drupal_entity('block', 'webareafooter', check_access=false) }} {% endset %} @@ -67,8 +68,8 @@ 'header_info': header_info, 'contact_link': contact_link, 'title': label, - 'messages': messages, - 'tasks': local_tasks, + 'admin_info': admin_info, + 'show_admin_info': show_admin_info, 'body': content|without('epa_content_moderation_control'), 'sidenav': sidenav, 'footer': footer, @@ -80,8 +81,8 @@ 'header_info': header_info, 'contact_link': contact_link, 'title': label, - 'messages': messages, - 'tasks': local_tasks, + 'admin_info': admin_info, + 'show_admin_info': show_admin_info, 'body': content|without('epa_content_moderation_control'), 'footer': footer, } %} diff --git a/services/drupal/web/themes/epa_theme/templates/content/node--public-notice--full.html.twig b/services/drupal/web/themes/epa_theme/templates/content/node--public-notice--full.html.twig index 31a49fc0f7..f74cdc509f 100644 --- a/services/drupal/web/themes/epa_theme/templates/content/node--public-notice--full.html.twig +++ b/services/drupal/web/themes/epa_theme/templates/content/node--public-notice--full.html.twig @@ -31,16 +31,17 @@ {{ drupal_entity('block', 'webareaheader', check_access=false) }} {% endset %} -{% set messages %} - {{ drupal_block('system_messages_block', wrapper=false) }} -{% endset %} - -{% set local_tasks %} - {{ drupal_block('local_tasks_block', wrapper=false) }} - {{ drupal_block('local_actions_block', wrapper=false) }} +{% set admin_info %} + {{ region_messages }} {{ content.epa_content_moderation_control }} {% endset %} +{% set show_admin_info = false %} + +{% if admin_info|render|striptags|trim %} + {% set show_admin_info = true %} +{% endif %} + {% set footer %} {{ drupal_entity('block', 'webareafooter', check_access=false) }} {% endset %} @@ -99,8 +100,8 @@ 'header_info': header_info, 'contact_link': contact_link, 'title': title, - 'messages': messages, - 'tasks': local_tasks, + 'admin_info': admin_info, + 'show_admin_info': show_admin_info, 'body': body, 'sidenav': sidenav, 'footer': footer, @@ -112,8 +113,8 @@ 'header_info': header_info, 'contact_link': contact_link, 'title': title, - 'messages': messages, - 'tasks': local_tasks, + 'admin_info': admin_info, + 'show_admin_info': show_admin_info, 'body': body, 'footer': footer, } %} diff --git a/services/drupal/web/themes/epa_theme/templates/content/node--regulation--full.html.twig b/services/drupal/web/themes/epa_theme/templates/content/node--regulation--full.html.twig index 2a62980e91..bba36a8feb 100644 --- a/services/drupal/web/themes/epa_theme/templates/content/node--regulation--full.html.twig +++ b/services/drupal/web/themes/epa_theme/templates/content/node--regulation--full.html.twig @@ -31,16 +31,17 @@ {{ drupal_entity('block', 'webareaheader', check_access=false) }} {% endset %} -{% set messages %} - {{ drupal_block('system_messages_block', wrapper=false) }} -{% endset %} - -{% set local_tasks %} - {{ drupal_block('local_tasks_block', wrapper=false) }} - {{ drupal_block('local_actions_block', wrapper=false) }} +{% set admin_info %} + {{ region_messages }} {{ content.epa_content_moderation_control }} {% endset %} +{% set show_admin_info = false %} + +{% if admin_info|render|striptags|trim %} + {% set show_admin_info = true %} +{% endif %} + {% set footer %} {{ drupal_entity('block', 'webareafooter', check_access=false) }} {% endset %} @@ -122,8 +123,8 @@ 'header_info': header_info, 'contact_link': contact_link, 'title': label, - 'messages': messages, - 'tasks': local_tasks, + 'admin_info': admin_info, + 'show_admin_info': show_admin_info, 'body': body, 'sidenav': sidenav, 'footer': footer, @@ -135,8 +136,8 @@ 'header_info': header_info, 'contact_link': contact_link, 'title': label, - 'messages': messages, - 'tasks': local_tasks, + 'admin_info': admin_info, + 'show_admin_info': show_admin_info, 'body': body, 'footer': footer, } %} diff --git a/services/drupal/web/themes/epa_theme/templates/content/node--web-area.html.twig b/services/drupal/web/themes/epa_theme/templates/content/node--web-area.html.twig index a9b1837477..a0e445213b 100644 --- a/services/drupal/web/themes/epa_theme/templates/content/node--web-area.html.twig +++ b/services/drupal/web/themes/epa_theme/templates/content/node--web-area.html.twig @@ -20,16 +20,17 @@ {{ drupal_entity('block', 'webareaheader', check_access=false) }} {% endset %} -{% set messages %} - {{ drupal_block('system_messages_block', wrapper=false) }} -{% endset %} - -{% set local_tasks %} - {{ drupal_block('local_tasks_block', wrapper=false) }} - {{ drupal_block('local_actions_block', wrapper=false) }} +{% set admin_info %} + {{ region_messages }} {{ content.epa_content_moderation_control }} {% endset %} +{% set show_admin_info = false %} + +{% if admin_info|render|striptags|trim %} + {% set show_admin_info = true %} +{% endif %} + {% set footer %} {{ drupal_entity('block', 'webareafooter', check_access=false) }} {% endset %} @@ -66,8 +67,8 @@ 'header_info': header_info, 'contact_link': contact_link, 'title': label, - 'messages': messages, - 'tasks': local_tasks, + 'admin': admin_info, + 'show_admin_info': show_admin_info, 'slideshow': slideshow, 'body': body, 'footer': footer, diff --git a/services/drupal/web/themes/epa_theme/templates/views/views-view--search-faqs.html.twig b/services/drupal/web/themes/epa_theme/templates/views/views-view--search-faqs.html.twig index 84c2e2d841..75239b165c 100644 --- a/services/drupal/web/themes/epa_theme/templates/views/views-view--search-faqs.html.twig +++ b/services/drupal/web/themes/epa_theme/templates/views/views-view--search-faqs.html.twig @@ -15,15 +15,18 @@ {{ drupal_entity('block', 'webareaheader', check_access=false) }} {% endset %} -{% set messages %} +{% set admin_info %} {{ drupal_block('system_messages_block', wrapper=false) }} -{% endset %} - -{% set local_tasks %} {{ drupal_block('local_tasks_block', wrapper=false) }} {{ drupal_block('local_actions_block', wrapper=false) }} {% endset %} +{% set show_admin_info = false %} + +{% if admin_info|render|striptags|trim %} + {% set show_admin_info = true %} +{% endif %} + {% set area_footer %} {{ drupal_entity('block', 'webareafooter', check_access=false) }} {% endset %} @@ -70,8 +73,8 @@ 'contact_link': contact_link, 'title': view.title, 'contextual_links': title_suffix.contextual_links, - 'messages': messages, - 'tasks': local_tasks, + 'admin_info': admin_info, + 'show_admin_info': show_admin_info, 'intro': intro, 'search': search, 'filters': filters, diff --git a/services/drupal/web/themes/epa_theme/templates/views/views-view--search-news-releases.html.twig b/services/drupal/web/themes/epa_theme/templates/views/views-view--search-news-releases.html.twig index 1564eb87a5..0f8d0cb7a5 100644 --- a/services/drupal/web/themes/epa_theme/templates/views/views-view--search-news-releases.html.twig +++ b/services/drupal/web/themes/epa_theme/templates/views/views-view--search-news-releases.html.twig @@ -15,15 +15,18 @@ {{ drupal_entity('block', 'webareaheader', check_access=false) }} {% endset %} -{% set messages %} +{% set admin_info %} {{ drupal_block('system_messages_block', wrapper=false) }} -{% endset %} - -{% set local_tasks %} {{ drupal_block('local_tasks_block', wrapper=false) }} {{ drupal_block('local_actions_block', wrapper=false) }} {% endset %} +{% set show_admin_info = false %} + +{% if admin_info|render|striptags|trim %} + {% set show_admin_info = true %} +{% endif %} + {% set area_footer %} {{ drupal_entity('block', 'webareafooter', check_access=false) }} {% endset %} @@ -75,8 +78,8 @@ 'contact_link': contact_link, 'title': view.title, 'contextual_links': title_suffix.contextual_links, - 'messages': messages, - 'tasks': local_tasks, + 'admin_info': admin_info, + 'show_admin_info': show_admin_info, 'intro': intro, 'search': search, 'filters': filters, diff --git a/services/drupal/web/themes/epa_theme/templates/views/views-view--search-perspectives.html.twig b/services/drupal/web/themes/epa_theme/templates/views/views-view--search-perspectives.html.twig index a66f8e5eda..b37b50a88d 100644 --- a/services/drupal/web/themes/epa_theme/templates/views/views-view--search-perspectives.html.twig +++ b/services/drupal/web/themes/epa_theme/templates/views/views-view--search-perspectives.html.twig @@ -15,15 +15,18 @@ {{ drupal_entity('block', 'webareaheader', check_access=false) }} {% endset %} -{% set messages %} +{% set admin_info %} {{ drupal_block('system_messages_block', wrapper=false) }} -{% endset %} - -{% set local_tasks %} {{ drupal_block('local_tasks_block', wrapper=false) }} {{ drupal_block('local_actions_block', wrapper=false) }} {% endset %} +{% set show_admin_info = false %} + +{% if admin_info|render|striptags|trim %} + {% set show_admin_info = true %} +{% endif %} + {% set area_footer %} {{ drupal_entity('block', 'webareafooter', check_access=false) }} {% endset %} @@ -73,8 +76,8 @@ 'contact_link': contact_link, 'title': view.title, 'contextual_links': title_suffix.contextual_links, - 'messages': messages, - 'tasks': local_tasks, + 'admin_info': admin_info, + 'show_admin_info': show_admin_info, 'intro': intro, 'search': search, 'filters': filters, diff --git a/services/drupal/web/themes/epa_theme/templates/views/views-view--search-public-notices.html.twig b/services/drupal/web/themes/epa_theme/templates/views/views-view--search-public-notices.html.twig index bb5f432611..ec1e21af74 100644 --- a/services/drupal/web/themes/epa_theme/templates/views/views-view--search-public-notices.html.twig +++ b/services/drupal/web/themes/epa_theme/templates/views/views-view--search-public-notices.html.twig @@ -15,15 +15,18 @@ {{ drupal_entity('block', 'webareaheader', check_access=false) }} {% endset %} -{% set messages %} +{% set admin_info %} {{ drupal_block('system_messages_block', wrapper=false) }} -{% endset %} - -{% set local_tasks %} {{ drupal_block('local_tasks_block', wrapper=false) }} {{ drupal_block('local_actions_block', wrapper=false) }} {% endset %} +{% set show_admin_info = false %} + +{% if admin_info|render|striptags|trim %} + {% set show_admin_info = true %} +{% endif %} + {% set area_footer %} {{ drupal_entity('block', 'webareafooter', check_access=false) }} {% endset %} @@ -74,8 +77,8 @@ 'contact_link': contact_link, 'title': view.title, 'contextual_links': title_suffix.contextual_links, - 'messages': messages, - 'tasks': local_tasks, + 'admin_info': admin_info, + 'show_admin_info': show_admin_info, 'intro': intro, 'search': search, 'filters': filters, From 393e01843f29cffab2dbd1e1f90e89631f9e43f0 Mon Sep 17 00:00:00 2001 From: Dan Mouyard Date: Mon, 20 Dec 2021 12:48:25 -0500 Subject: [PATCH 32/87] EPAD8-1552: Update block templates --- .../block/block--admin-no-label.html.twig | 35 +++++++++++++++++++ .../templates/block/block--admin.html.twig | 35 +++++++++++++++++++ .../block/block--custom-html.html.twig | 30 +++------------- .../block/block--facets-summary.html.twig | 30 +++------------- .../templates/block/block--facets.html.twig | 30 +++------------- .../block/block--globalfooter.html.twig | 9 +++-- .../block/block--layout-builder.html.twig | 35 +++---------------- .../block/block--local-tasks-block.html.twig | 7 ++++ .../block/block--paragraph.html.twig | 35 +++---------------- .../block/block--system-main-block.html.twig | 31 +++------------- .../block/block--system-menu-block.html.twig | 28 +++------------ .../templates/block/block--system.html.twig | 7 ++++ ...lock--views-exposed-filter-block.html.twig | 30 +++------------- .../block/block--webareafooter.html.twig | 30 +++------------- .../block/block--webareaheader.html.twig | 30 +++------------- .../block/block--webareamenu.html.twig | 33 +++-------------- 16 files changed, 143 insertions(+), 292 deletions(-) create mode 100644 services/drupal/web/themes/epa_theme/templates/block/block--admin-no-label.html.twig create mode 100644 services/drupal/web/themes/epa_theme/templates/block/block--admin.html.twig create mode 100644 services/drupal/web/themes/epa_theme/templates/block/block--local-tasks-block.html.twig create mode 100644 services/drupal/web/themes/epa_theme/templates/block/block--system.html.twig diff --git a/services/drupal/web/themes/epa_theme/templates/block/block--admin-no-label.html.twig b/services/drupal/web/themes/epa_theme/templates/block/block--admin-no-label.html.twig new file mode 100644 index 0000000000..4f1a1bc389 --- /dev/null +++ b/services/drupal/web/themes/epa_theme/templates/block/block--admin-no-label.html.twig @@ -0,0 +1,35 @@ +{# +/** + * @file + * Theme for an admin block. + * + * This block template gets extended by blocks that should only show the wrapper + * when a user is logged in. + */ +#} +{% set classes = [ + 'margin-0', +] %} + +{% set attributes = attributes.addClass(classes) %} + +{% set block_content %} + {% block block_content %} + {{ content }} + {% endblock %} +{% endset %} + +{% embed '@components/block/block.twig' with { + 'hide_wrapper': not logged_in, + 'has_constrain': false, + 'title_prefix': title_prefix, + 'label': false, + 'title_suffix': title_suffix, + 'hide_content_wrapper': true, +} %} + + {% block content %} + {{ block_content }} + {% endblock %} + +{% endembed %} diff --git a/services/drupal/web/themes/epa_theme/templates/block/block--admin.html.twig b/services/drupal/web/themes/epa_theme/templates/block/block--admin.html.twig new file mode 100644 index 0000000000..f9b797eb6c --- /dev/null +++ b/services/drupal/web/themes/epa_theme/templates/block/block--admin.html.twig @@ -0,0 +1,35 @@ +{# +/** + * @file + * Theme for an admin block. + * + * This block template gets extended by blocks that should only show the wrapper + * when a user is logged in. + */ +#} +{% set classes = [ + 'margin-0', +] %} + +{% set attributes = attributes.addClass(classes) %} + +{% set block_content %} + {% block block_content %} + {{ content }} + {% endblock %} +{% endset %} + +{% embed '@components/block/block.twig' with { + 'hide_wrapper': not logged_in, + 'has_constrain': false, + 'title_prefix': title_prefix, + 'label': label, + 'title_suffix': title_suffix, + 'hide_content_wrapper': true, +} %} + + {% block content %} + {{ block_content }} + {% endblock %} + +{% endembed %} diff --git a/services/drupal/web/themes/epa_theme/templates/block/block--custom-html.html.twig b/services/drupal/web/themes/epa_theme/templates/block/block--custom-html.html.twig index 7e13890ada..696713c97e 100644 --- a/services/drupal/web/themes/epa_theme/templates/block/block--custom-html.html.twig +++ b/services/drupal/web/themes/epa_theme/templates/block/block--custom-html.html.twig @@ -1,27 +1,7 @@ {# - /** - * @file - * Theme override for a custom html block. - */ +/** + * @file + * Theme override for a custom html block. + */ #} - -{% set classes = [ - 'margin-0', -] %} - -{% set attributes = attributes.addClass(classes) %} - -{% embed '@components/block/block.twig' with { - 'hide_wrapper': not logged_in, - 'has_constrain': false, - 'title_prefix': title_prefix, - 'label': false, - 'title_suffix': title_suffix, - 'hide_content_wrapper': true, -} %} - - {% block content %} - {{ content }} - {% endblock %} - -{% endembed %} +{% extends "block--admin-no-label.html.twig" %} diff --git a/services/drupal/web/themes/epa_theme/templates/block/block--facets-summary.html.twig b/services/drupal/web/themes/epa_theme/templates/block/block--facets-summary.html.twig index 94372d6b5e..bcb9712d35 100644 --- a/services/drupal/web/themes/epa_theme/templates/block/block--facets-summary.html.twig +++ b/services/drupal/web/themes/epa_theme/templates/block/block--facets-summary.html.twig @@ -1,27 +1,7 @@ {# - /** - * @file - * Theme override for the facets summary block. - */ +/** + * @file + * Theme override for the facets summary block. + */ #} - -{% set classes = [ - 'margin-0', -] %} - -{% set attributes = attributes.addClass(classes) %} - -{% embed '@components/block/block.twig' with { - 'hide_wrapper': not logged_in, - 'has_constrain': false, - 'title_prefix': title_prefix, - 'label': false, - 'title_suffix': title_suffix, - 'hide_content_wrapper': true, -} %} - - {% block content %} - {{ content }} - {% endblock %} - -{% endembed %} +{% extends "block--admin-no-label.html.twig" %} diff --git a/services/drupal/web/themes/epa_theme/templates/block/block--facets.html.twig b/services/drupal/web/themes/epa_theme/templates/block/block--facets.html.twig index 9280fac9b3..af96b63380 100644 --- a/services/drupal/web/themes/epa_theme/templates/block/block--facets.html.twig +++ b/services/drupal/web/themes/epa_theme/templates/block/block--facets.html.twig @@ -1,27 +1,7 @@ {# - /** - * @file - * Theme override for the facets block. - */ +/** + * @file + * Theme override for the facets block. + */ #} - -{% set classes = [ - 'margin-0', -] %} - -{% set attributes = attributes.addClass(classes) %} - -{% embed '@components/block/block.twig' with { - 'hide_wrapper': not logged_in, - 'has_constrain': false, - 'title_prefix': title_prefix, - 'label': false, - 'title_suffix': title_suffix, - 'hide_content_wrapper': true, -} %} - - {% block content %} - {{ content }} - {% endblock %} - -{% endembed %} +{% extends "block--admin-no-label.html.twig" %} diff --git a/services/drupal/web/themes/epa_theme/templates/block/block--globalfooter.html.twig b/services/drupal/web/themes/epa_theme/templates/block/block--globalfooter.html.twig index 5285bb841a..f7020f2543 100644 --- a/services/drupal/web/themes/epa_theme/templates/block/block--globalfooter.html.twig +++ b/services/drupal/web/themes/epa_theme/templates/block/block--globalfooter.html.twig @@ -1,9 +1,8 @@ {# - /** - * @file - * Theme override for the global footer block. - */ +/** + * @file + * Theme override for the global footer block. + */ #} - {{ title_suffix.contextual_links }} {{ content }} diff --git a/services/drupal/web/themes/epa_theme/templates/block/block--layout-builder.html.twig b/services/drupal/web/themes/epa_theme/templates/block/block--layout-builder.html.twig index f948866ad5..cf9deaf1a9 100644 --- a/services/drupal/web/themes/epa_theme/templates/block/block--layout-builder.html.twig +++ b/services/drupal/web/themes/epa_theme/templates/block/block--layout-builder.html.twig @@ -1,32 +1,7 @@ {# - /** - * @file - * Theme override for a layout builder block. - */ +/** + * @file + * Theme override for a layout builder block. + */ #} - -{% set classes = [ - 'margin-0', -] %} - -{% set attributes = attributes.addClass(classes) %} - -{% if label is not empty %} - {% embed '@components/block/block.twig' with { - 'hide_wrapper': not logged_in, - 'has_constrain': false, - 'hide_content_wrapper': true, - 'title_prefix': title_prefix, - 'title_suffix': title_suffix, - 'label': label, - } %} - - {% block content %} - {{ content }} - {% endblock %} - - {% endembed %} - -{% else %} - {{ content }} -{% endif %} +{% extends "block--admin.html.twig" %} diff --git a/services/drupal/web/themes/epa_theme/templates/block/block--local-tasks-block.html.twig b/services/drupal/web/themes/epa_theme/templates/block/block--local-tasks-block.html.twig new file mode 100644 index 0000000000..3112d7f620 --- /dev/null +++ b/services/drupal/web/themes/epa_theme/templates/block/block--local-tasks-block.html.twig @@ -0,0 +1,7 @@ +{# +/** + * @file + * Theme override for a local tasks block. + */ +#} +{% extends "block--admin-no-label.html.twig" %} diff --git a/services/drupal/web/themes/epa_theme/templates/block/block--paragraph.html.twig b/services/drupal/web/themes/epa_theme/templates/block/block--paragraph.html.twig index 1dc9241f07..ae66d5d50c 100644 --- a/services/drupal/web/themes/epa_theme/templates/block/block--paragraph.html.twig +++ b/services/drupal/web/themes/epa_theme/templates/block/block--paragraph.html.twig @@ -1,32 +1,7 @@ {# - /** - * @file - * Theme override for a paragraph block. - */ +/** + * @file + * Theme override for a paragraph block. + */ #} - -{% set classes = [ - 'margin-0', -] %} - -{% set attributes = attributes.addClass(classes) %} - -{% if label is not empty %} - {% embed '@components/block/block.twig' with { - 'hide_wrapper': not logged_in, - 'has_constrain': false, - 'hide_content_wrapper': true, - 'title_prefix': title_prefix, - 'title_suffix': title_suffix, - 'label': label, - } %} - - {% block content %} - {{ content }} - {% endblock %} - - {% endembed %} - -{% else %} - {{ content }} -{% endif %} +{% extends "block--admin.html.twig" %} diff --git a/services/drupal/web/themes/epa_theme/templates/block/block--system-main-block.html.twig b/services/drupal/web/themes/epa_theme/templates/block/block--system-main-block.html.twig index d1cc142e89..5377274a8e 100644 --- a/services/drupal/web/themes/epa_theme/templates/block/block--system-main-block.html.twig +++ b/services/drupal/web/themes/epa_theme/templates/block/block--system-main-block.html.twig @@ -1,28 +1,7 @@ {# - /** - * @file - * Theme override for a main block. - */ +/** + * @file + * Theme override for a main block. + */ #} - -{% set classes = [ - 'block', - 'block--provider-' ~ configuration.provider|clean_class, - 'block--id-' ~ plugin_id|clean_class, - 'margin-0', -] %} - -{% set attributes = attributes.addClass(classes) %} - -{% embed '@components/block/block.twig' with { - 'hide_wrapper': not logged_in, - 'has_constrain': false, - 'hide_content_wrapper': true, - 'label': false, -} %} - - {% block content %} - {{ content }} - {% endblock %} - -{% endembed %} +{% extends "block--admin-no-label.html.twig" %} diff --git a/services/drupal/web/themes/epa_theme/templates/block/block--system-menu-block.html.twig b/services/drupal/web/themes/epa_theme/templates/block/block--system-menu-block.html.twig index 27b776cf74..33c86c705f 100644 --- a/services/drupal/web/themes/epa_theme/templates/block/block--system-menu-block.html.twig +++ b/services/drupal/web/themes/epa_theme/templates/block/block--system-menu-block.html.twig @@ -1,25 +1,7 @@ {# - /** - * @file - * Theme override for a menu block. - */ +/** + * @file + * Theme override for a menu block. + */ #} - -{% set classes = [ - 'margin-0', -] %} - -{% set attributes = attributes.addClass(classes) %} - -{% embed '@components/block/block.twig' with { - 'hide_wrapper': not logged_in, - 'has_constrain': false, - 'hide_content_wrapper': true, - 'label': false, -} %} - - {% block content %} - {{ content }} - {% endblock %} - -{% endembed %} +{% extends "block--admin-no-label.html.twig" %} diff --git a/services/drupal/web/themes/epa_theme/templates/block/block--system.html.twig b/services/drupal/web/themes/epa_theme/templates/block/block--system.html.twig new file mode 100644 index 0000000000..a2ac2326bb --- /dev/null +++ b/services/drupal/web/themes/epa_theme/templates/block/block--system.html.twig @@ -0,0 +1,7 @@ +{# +/** + * @file + * Theme override for a system block. + */ +#} +{% extends "block--admin.html.twig" %} diff --git a/services/drupal/web/themes/epa_theme/templates/block/block--views-exposed-filter-block.html.twig b/services/drupal/web/themes/epa_theme/templates/block/block--views-exposed-filter-block.html.twig index ab2b5989af..b69d4de48f 100644 --- a/services/drupal/web/themes/epa_theme/templates/block/block--views-exposed-filter-block.html.twig +++ b/services/drupal/web/themes/epa_theme/templates/block/block--views-exposed-filter-block.html.twig @@ -1,27 +1,7 @@ {# - /** - * @file - * Theme override for a views exposed filter block. - */ +/** + * @file + * Theme override for a views exposed filter block. + */ #} - -{% set classes = [ - 'margin-0', -] %} - -{% set attributes = attributes.addClass(classes) %} - -{% embed '@components/block/block.twig' with { - 'hide_wrapper': not logged_in, - 'has_constrain': false, - 'title_prefix': title_prefix, - 'label': false, - 'title_suffix': title_suffix, - 'hide_content_wrapper': true, -} %} - - {% block content %} - {{ content }} - {% endblock %} - -{% endembed %} +{% extends "block--admin-no-label.html.twig" %} diff --git a/services/drupal/web/themes/epa_theme/templates/block/block--webareafooter.html.twig b/services/drupal/web/themes/epa_theme/templates/block/block--webareafooter.html.twig index 69ac811c2b..b7de6db37d 100644 --- a/services/drupal/web/themes/epa_theme/templates/block/block--webareafooter.html.twig +++ b/services/drupal/web/themes/epa_theme/templates/block/block--webareafooter.html.twig @@ -1,27 +1,7 @@ {# - /** - * @file - * Theme override for the web area footer block. - */ +/** + * @file + * Theme override for the web area footer block. + */ #} - -{% set classes = [ - 'margin-0', -] %} - -{% set attributes = attributes.addClass(classes) %} - -{% embed '@components/block/block.twig' with { - 'hide_wrapper': not logged_in, - 'has_constrain': false, - 'title_prefix': title_prefix, - 'label': false, - 'title_suffix': title_suffix, - 'hide_content_wrapper': true, -} %} - - {% block content %} - {{ content }} - {% endblock %} - -{% endembed %} +{% extends "block--admin-no-label.html.twig" %} diff --git a/services/drupal/web/themes/epa_theme/templates/block/block--webareaheader.html.twig b/services/drupal/web/themes/epa_theme/templates/block/block--webareaheader.html.twig index 4f31af566d..9e6870d708 100644 --- a/services/drupal/web/themes/epa_theme/templates/block/block--webareaheader.html.twig +++ b/services/drupal/web/themes/epa_theme/templates/block/block--webareaheader.html.twig @@ -1,27 +1,7 @@ {# - /** - * @file - * Theme override for the web area header block. - */ +/** + * @file + * Theme override for the web area header block. + */ #} - -{% set classes = [ - 'margin-0', -] %} - -{% set attributes = attributes.addClass(classes) %} - -{% embed '@components/block/block.twig' with { - 'hide_wrapper': not logged_in, - 'has_constrain': false, - 'title_prefix': title_prefix, - 'label': false, - 'title_suffix': title_suffix, - 'hide_content_wrapper': true, -} %} - - {% block content %} - {{ content }} - {% endblock %} - -{% endembed %} +{% extends "block--admin-no-label.html.twig" %} diff --git a/services/drupal/web/themes/epa_theme/templates/block/block--webareamenu.html.twig b/services/drupal/web/themes/epa_theme/templates/block/block--webareamenu.html.twig index 7dc9503bc2..9c4510571c 100644 --- a/services/drupal/web/themes/epa_theme/templates/block/block--webareamenu.html.twig +++ b/services/drupal/web/themes/epa_theme/templates/block/block--webareamenu.html.twig @@ -1,30 +1,7 @@ {# - /** - * @file - * Theme override for the group menus block. - */ +/** + * @file + * Theme override for the group menus block. + */ #} - -{% set classes = [ - 'margin-0', -] %} - -{% set attributes = attributes.addClass(classes) %} - -{% if logged_in %} - {% embed '@components/block/block.twig' with { - 'hide_wrapper': not logged_in, - 'has_constrain': false, - 'hide_content_wrapper': true, - 'title_prefix': title_prefix, - 'title_suffix': title_suffix, - } %} - - {% block content %} - {{ content }} - {% endblock %} - - {% endembed %} -{% else %} - {{ content }} -{% endif %} +{% extends "block--admin.html.twig" %} From 9000e89b18dc630c4fbfa85852c7875fdb9201c5 Mon Sep 17 00:00:00 2001 From: Dan Mouyard Date: Mon, 20 Dec 2021 13:43:52 -0500 Subject: [PATCH 33/87] EPAD8-1567: Add more examples for external links --- .../05-components/external-link/external-link.twig | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/05-components/external-link/external-link.twig b/services/drupal/web/themes/epa_theme/source/_patterns/05-components/external-link/external-link.twig index d51b59f975..a2f9ec43c2 100644 --- a/services/drupal/web/themes/epa_theme/source/_patterns/05-components/external-link/external-link.twig +++ b/services/drupal/web/themes/epa_theme/source/_patterns/05-components/external-link/external-link.twig @@ -16,12 +16,22 @@ + + + + + + + + + + From 59fcf3f5b342bd9b5d08967b06ffad0cb6e346b4 Mon Sep 17 00:00:00 2001 From: Aaron Zinck Date: Mon, 20 Dec 2021 15:20:56 -0500 Subject: [PATCH 34/87] Revert "EPAD8-1512 do not rename the ckeditor box plugin" This reverts commit b6ec50341b01b29d4b6c6e9d401efcd5ea07528f. --- .../modules/custom/epa_wysiwyg/js/plugins/epaBox/plugin.js | 4 ++-- .../custom/epa_wysiwyg/src/Plugin/CKEditorPlugin/EPABox.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/drupal/web/modules/custom/epa_wysiwyg/js/plugins/epaBox/plugin.js b/services/drupal/web/modules/custom/epa_wysiwyg/js/plugins/epaBox/plugin.js index 6960a13b7a..b96446a93d 100644 --- a/services/drupal/web/modules/custom/epa_wysiwyg/js/plugins/epaBox/plugin.js +++ b/services/drupal/web/modules/custom/epa_wysiwyg/js/plugins/epaBox/plugin.js @@ -23,14 +23,14 @@ editor.addCommand('epaBoxCommand', new CKEDITOR.dialogCommand('epaBoxDialog')); editor.ui.addButton('epaBoxButton', { - label: 'Related Info Box', + label: 'Related Info Summary Box', command: 'epaBoxCommand', icon: iconPath }); CKEDITOR.dialog.add('epaBoxDialog', function(editor) { return { - title: 'EPA Box', + title: 'Related Info Summary Box', minWidth: 400, minHeight: 200, contents: [{ diff --git a/services/drupal/web/modules/custom/epa_wysiwyg/src/Plugin/CKEditorPlugin/EPABox.php b/services/drupal/web/modules/custom/epa_wysiwyg/src/Plugin/CKEditorPlugin/EPABox.php index bdeb44a6a7..14dd26bc46 100644 --- a/services/drupal/web/modules/custom/epa_wysiwyg/src/Plugin/CKEditorPlugin/EPABox.php +++ b/services/drupal/web/modules/custom/epa_wysiwyg/src/Plugin/CKEditorPlugin/EPABox.php @@ -14,7 +14,7 @@ * * @CKEditorPlugin( * id = "epaBox", - * label = @Translation("Related Info Box") + * label = @Translation("Related Info Summary Box") * ) */ class EPABox extends CKEditorPluginBase { From 624e9eb75d82296dd2f6213f9a85043f1285c7d4 Mon Sep 17 00:00:00 2001 From: Nathan Han Date: Mon, 20 Dec 2021 13:39:39 -0800 Subject: [PATCH 35/87] [EPAD8-1559] Finish presave --- .../modules/custom/epa_workflow/epa_workflow.module | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/services/drupal/web/modules/custom/epa_workflow/epa_workflow.module b/services/drupal/web/modules/custom/epa_workflow/epa_workflow.module index 015dad7aad..930e105c19 100644 --- a/services/drupal/web/modules/custom/epa_workflow/epa_workflow.module +++ b/services/drupal/web/modules/custom/epa_workflow/epa_workflow.module @@ -17,6 +17,8 @@ use Drupal\Core\Form\FormStateInterface; use Drupal\node\NodeInterface; use Drupal\Core\Link; use Drupal\Core\Url; +use Drupal\paragraphs\Entity\Paragraph; + /** * Implements hook_entity_base_field_info(). @@ -622,11 +624,15 @@ function epa_workflow_module_implements_alter(&$implementations, $hook) { */ function epa_workflow_entity_presave(EntityInterface $entity) { if ($entity->bundle() == 'perspective') { - $author_paragraphs = $entity->field_author_as_para->getValue(); + $author_paragraphs = $entity->field_authors->getValue(); $tids = []; foreach ($author_paragraphs as $author) { - array_push($tids, $author['subform']['field_a'][0]['target_id']); + $target_id = $author['target_id']; + $paragraph = Paragraph::load($target_id); + $author_tid = $paragraph->field_author->target_id; + array_push($tids, $author_tid); } + $entity->field_author_names = []; foreach ($tids as $tid) { $entity->field_author_names[] = [ 'target_id' => $tid From c82dad627b877f285145d268f2eb387660c3b9a5 Mon Sep 17 00:00:00 2001 From: Aaron Zinck Date: Mon, 20 Dec 2021 17:05:36 -0500 Subject: [PATCH 36/87] EPAD8-1550 update drupal core (and associated packages) to 9.2.10 in order to get symfony/serializer update --- services/drupal/composer.json | 4 +- services/drupal/composer.lock | 397 ++++++++++++++++++++-------------- 2 files changed, 238 insertions(+), 163 deletions(-) diff --git a/services/drupal/composer.json b/services/drupal/composer.json index 866f041938..5b3fb58737 100644 --- a/services/drupal/composer.json +++ b/services/drupal/composer.json @@ -211,7 +211,7 @@ "drupal/config_split": "~1.5", "drupal/content_moderation_notifications": "dev-3.x#7ffa936", "drupal/content_moderation_revert": "1.x-dev", - "drupal/core-composer-scaffold": "~9.1.0", + "drupal/core-composer-scaffold": "~9.2.0", "drupal/core-recommended": "~9.2.0", "drupal/cshs": "^3.5", "drupal/csv_serialization": "^1.5", @@ -314,7 +314,7 @@ "zaporylie/composer-drupal-optimizations": "^1.0" }, "require-dev": { - "drupal/core-dev": "~9.1.0" + "drupal/core-dev": "~9.2.0" }, "conflict": { "drupal/drupal": "*" diff --git a/services/drupal/composer.lock b/services/drupal/composer.lock index 792c679e93..351cb6d07a 100644 --- a/services/drupal/composer.lock +++ b/services/drupal/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": "a786e7265e87e984e84dee3f8cba24a2", + "content-hash": "e90e0bd14cd6e73cd50b6e460238b9fe", "packages": [ { "name": "akamai-open/edgegrid-auth", @@ -3375,16 +3375,16 @@ }, { "name": "drupal/core", - "version": "9.2.9", + "version": "9.2.10", "source": { "type": "git", "url": "https://github.com/drupal/core.git", - "reference": "2e2f015e881abccc32efcd264128e8a8444b2ec1" + "reference": "61248f85f78c02e7e0afde2b8a5113d3914bb50f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drupal/core/zipball/2e2f015e881abccc32efcd264128e8a8444b2ec1", - "reference": "2e2f015e881abccc32efcd264128e8a8444b2ec1", + "url": "https://api.github.com/repos/drupal/core/zipball/61248f85f78c02e7e0afde2b8a5113d3914bb50f", + "reference": "61248f85f78c02e7e0afde2b8a5113d3914bb50f", "shasum": "" }, "require": { @@ -3623,22 +3623,22 @@ ], "description": "Drupal is an open source content management platform powering millions of websites and applications.", "support": { - "source": "https://github.com/drupal/core/tree/9.2.9" + "source": "https://github.com/drupal/core/tree/9.2.10" }, - "time": "2021-11-17T21:05:58+00:00" + "time": "2021-11-24T14:27:27+00:00" }, { "name": "drupal/core-composer-scaffold", - "version": "9.1.14", + "version": "9.2.10", "source": { "type": "git", "url": "https://github.com/drupal/core-composer-scaffold.git", - "reference": "7b125516d6568b888945ee03ac2636dcced76e8d" + "reference": "3c9efe8e154acc2cadb86b51733be55556677b0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drupal/core-composer-scaffold/zipball/7b125516d6568b888945ee03ac2636dcced76e8d", - "reference": "7b125516d6568b888945ee03ac2636dcced76e8d", + "url": "https://api.github.com/repos/drupal/core-composer-scaffold/zipball/3c9efe8e154acc2cadb86b51733be55556677b0b", + "reference": "3c9efe8e154acc2cadb86b51733be55556677b0b", "shasum": "" }, "require": { @@ -3673,22 +3673,22 @@ "drupal" ], "support": { - "source": "https://github.com/drupal/core-composer-scaffold/tree/9.2.1" + "source": "https://github.com/drupal/core-composer-scaffold/tree/9.2.10" }, - "time": "2020-08-07T22:30:13+00:00" + "time": "2021-08-24T12:04:07+00:00" }, { "name": "drupal/core-recommended", - "version": "9.2.9", + "version": "9.2.10", "source": { "type": "git", "url": "https://github.com/drupal/core-recommended.git", - "reference": "a052e6f47864bb6597e6f449b9cfdb1aa4eea400" + "reference": "9beef737bbfd1db4f84ab3c19e5e7ae0b534383b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drupal/core-recommended/zipball/a052e6f47864bb6597e6f449b9cfdb1aa4eea400", - "reference": "a052e6f47864bb6597e6f449b9cfdb1aa4eea400", + "url": "https://api.github.com/repos/drupal/core-recommended/zipball/9beef737bbfd1db4f84ab3c19e5e7ae0b534383b", + "reference": "9beef737bbfd1db4f84ab3c19e5e7ae0b534383b", "shasum": "" }, "require": { @@ -3697,7 +3697,7 @@ "doctrine/annotations": "1.13.1", "doctrine/lexer": "1.2.1", "doctrine/reflection": "1.2.2", - "drupal/core": "9.2.9", + "drupal/core": "9.2.10", "egulias/email-validator": "2.1.25", "guzzlehttp/guzzle": "6.5.5", "guzzlehttp/promises": "1.4.1", @@ -3740,7 +3740,7 @@ "symfony/process": "v4.4.25", "symfony/psr-http-message-bridge": "v2.1.0", "symfony/routing": "v4.4.25", - "symfony/serializer": "v4.4.25", + "symfony/serializer": "v4.4.35", "symfony/service-contracts": "v2.4.0", "symfony/translation": "v4.4.25", "symfony/translation-contracts": "v2.4.0", @@ -3760,9 +3760,9 @@ ], "description": "Locked core dependencies; require this project INSTEAD OF drupal/core.", "support": { - "source": "https://github.com/drupal/core-recommended/tree/9.2.9" + "source": "https://github.com/drupal/core-recommended/tree/9.2.10" }, - "time": "2021-11-17T21:05:58+00:00" + "time": "2021-11-24T14:27:27+00:00" }, { "name": "drupal/crop", @@ -11404,16 +11404,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.13.1", + "version": "v4.13.2", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "63a79e8daa781cac14e5195e63ed8ae231dd10fd" + "reference": "210577fe3cf7badcc5814d99455df46564f3c077" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/63a79e8daa781cac14e5195e63ed8ae231dd10fd", - "reference": "63a79e8daa781cac14e5195e63ed8ae231dd10fd", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/210577fe3cf7badcc5814d99455df46564f3c077", + "reference": "210577fe3cf7badcc5814d99455df46564f3c077", "shasum": "" }, "require": { @@ -11454,9 +11454,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.1" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.2" }, - "time": "2021-11-03T20:52:16+00:00" + "time": "2021-11-30T19:35:32+00:00" }, { "name": "nodespark/des-connector", @@ -14538,21 +14538,22 @@ }, { "name": "symfony/serializer", - "version": "v4.4.25", + "version": "v4.4.35", "source": { "type": "git", "url": "https://github.com/symfony/serializer.git", - "reference": "6db3eb4f1bb437cd3730f52353ba4b568acaddf5" + "reference": "1b2ae02cb1b923987947e013688c51954a80b751" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/serializer/zipball/6db3eb4f1bb437cd3730f52353ba4b568acaddf5", - "reference": "6db3eb4f1bb437cd3730f52353ba4b568acaddf5", + "url": "https://api.github.com/repos/symfony/serializer/zipball/1b2ae02cb1b923987947e013688c51954a80b751", + "reference": "1b2ae02cb1b923987947e013688c51954a80b751", "shasum": "" }, "require": { "php": ">=7.1.3", - "symfony/polyfill-ctype": "~1.8" + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-php80": "^1.16" }, "conflict": { "phpdocumentor/reflection-docblock": "<3.0|>=3.2.0,<3.2.2", @@ -14611,7 +14612,7 @@ "description": "Handles serializing and deserializing data structures, including object graphs, into array structures or other formats like XML and JSON.", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/serializer/tree/v4.4.25" + "source": "https://github.com/symfony/serializer/tree/v4.4.35" }, "funding": [ { @@ -14627,7 +14628,7 @@ "type": "tidelift" } ], - "time": "2021-05-26T11:20:16+00:00" + "time": "2021-11-24T08:12:42+00:00" }, { "name": "symfony/service-contracts", @@ -15616,69 +15617,6 @@ }, "time": "2021-10-11T11:58:47+00:00" }, - { - "name": "behat/mink-browserkit-driver", - "version": "v1.4.0", - "source": { - "type": "git", - "url": "https://github.com/minkphp/MinkBrowserKitDriver.git", - "reference": "0ed1919eb09968f2e152ed91aee35300e70602a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/minkphp/MinkBrowserKitDriver/zipball/0ed1919eb09968f2e152ed91aee35300e70602a8", - "reference": "0ed1919eb09968f2e152ed91aee35300e70602a8", - "shasum": "" - }, - "require": { - "behat/mink": "^1.7.1@dev", - "php": ">=5.4", - "symfony/browser-kit": "~2.3|~3.0|~4.0", - "symfony/dom-crawler": "~2.3|~3.0|~4.0" - }, - "require-dev": { - "mink/driver-testsuite": "dev-master", - "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.18 || ^8.5 || ^9.5", - "symfony/debug": "^2.7|^3.0|^4.0", - "symfony/http-kernel": "~2.3|~3.0|~4.0", - "yoast/phpunit-polyfills": "^1.0" - }, - "type": "mink-driver", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Behat\\Mink\\Driver\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - } - ], - "description": "Symfony2 BrowserKit driver for Mink framework", - "homepage": "https://mink.behat.org/", - "keywords": [ - "Mink", - "Symfony2", - "browser", - "testing" - ], - "support": { - "issues": "https://github.com/minkphp/MinkBrowserKitDriver/issues", - "source": "https://github.com/minkphp/MinkBrowserKitDriver/tree/v1.4.0" - }, - "time": "2021-10-12T09:42:37+00:00" - }, { "name": "behat/mink-goutte-driver", "version": "v1.3.0", @@ -15880,16 +15818,16 @@ }, { "name": "composer/composer", - "version": "2.1.12", + "version": "2.1.14", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "6e3c2b122e0ec41a7e885fcaf19fa15e2e0819a0" + "reference": "cd28fc05b0c9d3beaf58b57018725c4dc15a6446" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/6e3c2b122e0ec41a7e885fcaf19fa15e2e0819a0", - "reference": "6e3c2b122e0ec41a7e885fcaf19fa15e2e0819a0", + "url": "https://api.github.com/repos/composer/composer/zipball/cd28fc05b0c9d3beaf58b57018725c4dc15a6446", + "reference": "cd28fc05b0c9d3beaf58b57018725c4dc15a6446", "shasum": "" }, "require": { @@ -15904,7 +15842,7 @@ "react/promise": "^1.2 || ^2.7", "seld/jsonlint": "^1.4", "seld/phar-utils": "^1.0", - "symfony/console": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", + "symfony/console": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0", "symfony/filesystem": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", "symfony/finder": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0", "symfony/process": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0" @@ -15958,7 +15896,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/composer/issues", - "source": "https://github.com/composer/composer/tree/2.1.12" + "source": "https://github.com/composer/composer/tree/2.1.14" }, "funding": [ { @@ -15974,7 +15912,7 @@ "type": "tidelift" } ], - "time": "2021-11-09T15:02:04+00:00" + "time": "2021-11-30T09:51:43+00:00" }, { "name": "composer/metadata-minifier", @@ -16045,6 +15983,77 @@ ], "time": "2021-04-07T13:37:33+00:00" }, + { + "name": "composer/pcre", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/composer/pcre.git", + "reference": "3d322d715c43a1ac36c7fe215fa59336265500f2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/pcre/zipball/3d322d715c43a1ac36c7fe215fa59336265500f2", + "reference": "3d322d715c43a1ac36c7fe215fa59336265500f2", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/1.0.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-12-06T15:17:27+00:00" + }, { "name": "composer/spdx-licenses", "version": "1.5.6", @@ -16127,25 +16136,27 @@ }, { "name": "composer/xdebug-handler", - "version": "2.0.2", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339" + "reference": "6555461e76962fd0379c444c46fd558a0fcfb65e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/84674dd3a7575ba617f5a76d7e9e29a7d3891339", - "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/6555461e76962fd0379c444c46fd558a0fcfb65e", + "reference": "6555461e76962fd0379c444c46fd558a0fcfb65e", "shasum": "" }, "require": { + "composer/pcre": "^1", "php": "^5.3.2 || ^7.0 || ^8.0", "psr/log": "^1 || ^2 || ^3" }, "require-dev": { - "phpstan/phpstan": "^0.12.55", - "symfony/phpunit-bridge": "^4.2 || ^5" + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0" }, "type": "library", "autoload": { @@ -16171,7 +16182,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/2.0.2" + "source": "https://github.com/composer/xdebug-handler/tree/2.0.3" }, "funding": [ { @@ -16187,7 +16198,7 @@ "type": "tidelift" } ], - "time": "2021-07-31T17:03:58+00:00" + "time": "2021-12-08T13:07:32+00:00" }, { "name": "doctrine/instantiator", @@ -16303,16 +16314,16 @@ }, { "name": "drupal/core-dev", - "version": "9.1.14", + "version": "9.2.10", "source": { "type": "git", "url": "https://github.com/drupal/core-dev.git", - "reference": "559e6611014b0815c61b8004598854617d541d97" + "reference": "4b5b8556711315e180d72830733ddb07a57a2d73" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drupal/core-dev/zipball/559e6611014b0815c61b8004598854617d541d97", - "reference": "559e6611014b0815c61b8004598854617d541d97", + "url": "https://api.github.com/repos/drupal/core-dev/zipball/4b5b8556711315e180d72830733ddb07a57a2d73", + "reference": "4b5b8556711315e180d72830733ddb07a57a2d73", "shasum": "" }, "require": { @@ -16320,12 +16331,15 @@ "behat/mink-goutte-driver": "^1.2", "behat/mink-selenium2-driver": "^1.4", "composer/composer": "^2.0.2", - "drupal/coder": "^8.3.7", + "drupal/coder": "^8.3.10", "easyrdf/easyrdf": "^0.9 || ^1.0", + "fabpot/goutte": "^3.3", + "friends-of-behat/mink-browserkit-driver": "^1.4", + "instaclick/php-webdriver": "^1.4.1", "justinrainbow/json-schema": "^5.2", "mikey179/vfsstream": "^1.6.8", - "phpspec/prophecy": "^1.7", - "phpunit/phpunit": "^8.4.1 || ^9", + "phpspec/prophecy": "^1.12", + "phpunit/phpunit": "^8.5.14 || ^9", "symfony/browser-kit": "^4.4", "symfony/css-selector": "^4.4", "symfony/dom-crawler": "^4.4 !=4.4.5", @@ -16333,8 +16347,8 @@ "symfony/filesystem": "^4.4", "symfony/finder": "^4.4", "symfony/lock": "^4.4", - "symfony/phpunit-bridge": "^5.1.4", - "symfony/var-dumper": "^5.1.2" + "symfony/phpunit-bridge": "^5.3.0", + "symfony/var-dumper": "^5.3.0" }, "conflict": { "webflo/drupal-core-require-dev": "*" @@ -16346,9 +16360,9 @@ ], "description": "require-dev dependencies from drupal/drupal; use in addition to drupal/core-recommended to run tests from drupal/core.", "support": { - "source": "https://github.com/drupal/core-dev/tree/9.1.14" + "source": "https://github.com/drupal/core-dev/tree/9.2.10" }, - "time": "2020-10-28T08:13:15+00:00" + "time": "2021-06-01T16:41:50+00:00" }, { "name": "easyrdf/easyrdf", @@ -16484,6 +16498,68 @@ }, "time": "2020-11-01T09:30:18+00:00" }, + { + "name": "friends-of-behat/mink-browserkit-driver", + "version": "v1.6.1", + "source": { + "type": "git", + "url": "https://github.com/FriendsOfBehat/MinkBrowserKitDriver.git", + "reference": "b3c29f18fe20487846e4c2733b066ec5e47f4f76" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FriendsOfBehat/MinkBrowserKitDriver/zipball/b3c29f18fe20487846e4c2733b066ec5e47f4f76", + "reference": "b3c29f18fe20487846e4c2733b066ec5e47f4f76", + "shasum": "" + }, + "require": { + "behat/mink": "^1.7", + "php": "^7.4|^8.0", + "symfony/browser-kit": "^4.4|^5.0|^6.0", + "symfony/dom-crawler": "^4.4|^5.0|^6.0" + }, + "replace": { + "behat/mink-browserkit-driver": "self.version" + }, + "require-dev": { + "friends-of-behat/mink-driver-testsuite": "dev-master", + "symfony/http-kernel": "^4.4|^5.0|^6.0" + }, + "type": "mink-driver", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Behat\\Mink\\Driver\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + } + ], + "description": "Symfony2 BrowserKit driver for Mink framework", + "homepage": "http://mink.behat.org/", + "keywords": [ + "Mink", + "Symfony2", + "browser", + "testing" + ], + "support": { + "source": "https://github.com/FriendsOfBehat/MinkBrowserKitDriver/tree/v1.6.1" + }, + "time": "2021-12-13T10:41:57+00:00" + }, { "name": "instaclick/php-webdriver", "version": "1.4.10", @@ -16999,16 +17075,16 @@ }, { "name": "phpspec/prophecy", - "version": "1.14.0", + "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e" + "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", - "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", + "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", "shasum": "" }, "require": { @@ -17060,22 +17136,22 @@ ], "support": { "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/1.14.0" + "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" }, - "time": "2021-09-10T09:02:12+00:00" + "time": "2021-12-08T12:19:24+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.9", + "version": "9.2.10", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "f301eb1453c9e7a1bc912ee8b0ea9db22c60223b" + "reference": "d5850aaf931743067f4bfc1ae4cbd06468400687" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f301eb1453c9e7a1bc912ee8b0ea9db22c60223b", - "reference": "f301eb1453c9e7a1bc912ee8b0ea9db22c60223b", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/d5850aaf931743067f4bfc1ae4cbd06468400687", + "reference": "d5850aaf931743067f4bfc1ae4cbd06468400687", "shasum": "" }, "require": { @@ -17131,7 +17207,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.9" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.10" }, "funding": [ { @@ -17139,20 +17215,20 @@ "type": "github" } ], - "time": "2021-11-19T15:21:02+00:00" + "time": "2021-12-05T09:12:13+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "3.0.5", + "version": "3.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8" + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8", - "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", "shasum": "" }, "require": { @@ -17191,7 +17267,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" }, "funding": [ { @@ -17199,7 +17275,7 @@ "type": "github" } ], - "time": "2020-09-28T05:57:25+00:00" + "time": "2021-12-02T12:48:52+00:00" }, { "name": "phpunit/php-invoker", @@ -18338,7 +18414,6 @@ "type": "github" } ], - "abandoned": true, "time": "2020-09-28T06:45:17+00:00" }, { @@ -18515,16 +18590,16 @@ }, { "name": "seld/phar-utils", - "version": "1.1.2", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/Seldaek/phar-utils.git", - "reference": "749042a2315705d2dfbbc59234dd9ceb22bf3ff0" + "reference": "9f3452c93ff423469c0d56450431562ca423dcee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/749042a2315705d2dfbbc59234dd9ceb22bf3ff0", - "reference": "749042a2315705d2dfbbc59234dd9ceb22bf3ff0", + "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/9f3452c93ff423469c0d56450431562ca423dcee", + "reference": "9f3452c93ff423469c0d56450431562ca423dcee", "shasum": "" }, "require": { @@ -18557,9 +18632,9 @@ ], "support": { "issues": "https://github.com/Seldaek/phar-utils/issues", - "source": "https://github.com/Seldaek/phar-utils/tree/1.1.2" + "source": "https://github.com/Seldaek/phar-utils/tree/1.2.0" }, - "time": "2021-08-19T21:01:38+00:00" + "time": "2021-12-10T11:20:11+00:00" }, { "name": "sirbrillig/phpcs-variable-analysis", @@ -18616,16 +18691,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.6.1", + "version": "3.6.2", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "f268ca40d54617c6e06757f83f699775c9b3ff2e" + "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/f268ca40d54617c6e06757f83f699775c9b3ff2e", - "reference": "f268ca40d54617c6e06757f83f699775c9b3ff2e", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/5e4e71592f69da17871dba6e80dd51bce74a351a", + "reference": "5e4e71592f69da17871dba6e80dd51bce74a351a", "shasum": "" }, "require": { @@ -18668,7 +18743,7 @@ "source": "https://github.com/squizlabs/PHP_CodeSniffer", "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" }, - "time": "2021-10-11T04:00:11+00:00" + "time": "2021-12-12T21:44:58+00:00" }, { "name": "symfony/browser-kit", @@ -18962,27 +19037,27 @@ }, { "name": "symfony/phpunit-bridge", - "version": "v5.3.11", + "version": "v5.4.0", "source": { "type": "git", "url": "https://github.com/symfony/phpunit-bridge.git", - "reference": "7b3637f0ce55c510a0fbe6e4d49b223103b7bf7b" + "reference": "59bbd98ee7aa15b9f75c0fc088c7a5cbf7aa9b5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/7b3637f0ce55c510a0fbe6e4d49b223103b7bf7b", - "reference": "7b3637f0ce55c510a0fbe6e4d49b223103b7bf7b", + "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/59bbd98ee7aa15b9f75c0fc088c7a5cbf7aa9b5c", + "reference": "59bbd98ee7aa15b9f75c0fc088c7a5cbf7aa9b5c", "shasum": "" }, "require": { "php": ">=7.1.3", - "symfony/deprecation-contracts": "^2.1" + "symfony/deprecation-contracts": "^2.1|^3" }, "conflict": { "phpunit/phpunit": "<7.5|9.1.2" }, "require-dev": { - "symfony/error-handler": "^4.4|^5.0" + "symfony/error-handler": "^4.4|^5.0|^6.0" }, "suggest": { "symfony/error-handler": "For tracking deprecated interfaces usages at runtime with DebugClassLoader" @@ -19025,7 +19100,7 @@ "description": "Provides utilities for PHPUnit, especially user deprecation notices management", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/phpunit-bridge/tree/v5.3.11" + "source": "https://github.com/symfony/phpunit-bridge/tree/v5.4.0" }, "funding": [ { @@ -19041,7 +19116,7 @@ "type": "tidelift" } ], - "time": "2021-11-12T11:38:27+00:00" + "time": "2021-11-29T15:30:56+00:00" }, { "name": "theseer/tokenizer", From d66d053f88299f78f03563911a5069c25c96a360 Mon Sep 17 00:00:00 2001 From: Nathan Han Date: Mon, 20 Dec 2021 23:59:37 -0800 Subject: [PATCH 37/87] [EPAD8-1559] Initial deploy --- .../epa_workflow/epa_workflow.deploy.php | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/services/drupal/web/modules/custom/epa_workflow/epa_workflow.deploy.php b/services/drupal/web/modules/custom/epa_workflow/epa_workflow.deploy.php index b6ccb960b7..be486cdfe2 100644 --- a/services/drupal/web/modules/custom/epa_workflow/epa_workflow.deploy.php +++ b/services/drupal/web/modules/custom/epa_workflow/epa_workflow.deploy.php @@ -215,3 +215,72 @@ function epa_workflow_deploy_0004_fix_nodes_missing_transition_date(&$sandbox) { $sandbox['#finished'] = ($sandbox['current'] / $sandbox['total']); } } + +/** + * For all existing Perspective, if values exist in field_authors, + * populate the new taxonomy reference field, field_author_names, with the + * names of the authors. This elimiates duplicate entities in the dynamic lists. + */ +function epa_workflow_deploy_0028_populate_perspective_author_names_field(&$sandbox) { + if (!isset($sandbox['total'])) { + // Query all published perspectives. + $result = \Drupal::entityQuery('node') + ->condition('type', 'perspective') + ->execute(); + + $sandbox['total'] = count($result); + $sandbox['current'] = 0; + + \Drupal::logger('epa_workflow')->notice($sandbox['total'] . ' perspectives.'); + } + + $batch_size = 25; + + // sort nid asc + // keep track of highest nid + // increment high water mark + // can save these values in $sandbox + + // test pub persp that has author but not in new author field + // make sure after this, it has a new value and is still pub + $nids = \Drupal::entityQuery('node') + ->condition('type', 'perspective') + ->range(0, $batch_size) + ->execute(); + + if (empty($nids)) { + $sandbox['#finished'] = 1; + return; + } + + /** @var \Drupal\node\NodeInterface[] $nodes */ + $nodes = \Drupal::entityTypeManager() + ->getStorage('node') + ->loadMultiple($nids); + + foreach ($nodes as $node) { + \Drupal::logger('epa_workflow')->notice($node->title->value); + if (!$node->field_authors->isEmpty()) { + $author_paragraphs = $node->field_authors->getValue(); + $tids = []; + foreach ($author_paragraphs as $author) { + $target_id = $author['target_id']; + $paragraph = Drupal\paragraphs\Entity\Paragraph::load($target_id); + $author_tid = $paragraph->field_author->target_id; + array_push($tids, $author_tid); + } + $node->field_author_names = []; + foreach ($tids as $tid) { + $node->field_author_names[] = [ + 'target_id' => $tid + ]; + } + } + else { + // Clear new field value if field_authors is empty. + $node->field_author_names = []; + } + $node->save(); + $sandbox['current']++; + } +} From 2dc899e17dc979726722161aca57e40393c36235 Mon Sep 17 00:00:00 2001 From: Nathan Han Date: Tue, 21 Dec 2021 00:00:32 -0800 Subject: [PATCH 38/87] [EPAD8-1559] Update deploy number and add presave to existing nnode_presave --- .../epa_workflow/epa_workflow.deploy.php | 2 +- .../custom/epa_workflow/epa_workflow.module | 46 ++++++++++--------- 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/services/drupal/web/modules/custom/epa_workflow/epa_workflow.deploy.php b/services/drupal/web/modules/custom/epa_workflow/epa_workflow.deploy.php index be486cdfe2..75cde22028 100644 --- a/services/drupal/web/modules/custom/epa_workflow/epa_workflow.deploy.php +++ b/services/drupal/web/modules/custom/epa_workflow/epa_workflow.deploy.php @@ -221,7 +221,7 @@ function epa_workflow_deploy_0004_fix_nodes_missing_transition_date(&$sandbox) { * populate the new taxonomy reference field, field_author_names, with the * names of the authors. This elimiates duplicate entities in the dynamic lists. */ -function epa_workflow_deploy_0028_populate_perspective_author_names_field(&$sandbox) { +function epa_workflow_deploy_0005_populate_perspective_author_names_field(&$sandbox) { if (!isset($sandbox['total'])) { // Query all published perspectives. $result = \Drupal::entityQuery('node') diff --git a/services/drupal/web/modules/custom/epa_workflow/epa_workflow.module b/services/drupal/web/modules/custom/epa_workflow/epa_workflow.module index 930e105c19..bdae87fae3 100644 --- a/services/drupal/web/modules/custom/epa_workflow/epa_workflow.module +++ b/services/drupal/web/modules/custom/epa_workflow/epa_workflow.module @@ -451,6 +451,30 @@ function epa_workflow_node_presave(NodeInterface $node) { '%state' => $new_state, ])); } + + // Update field_author_names with values from field_authors. + if ($node->bundle() == 'perspective') { + if (!$node->field_authors->isEmpty()) { + $author_paragraphs = $node->field_authors->getValue(); + $tids = []; + foreach ($author_paragraphs as $author) { + $target_id = $author['target_id']; + $paragraph = Paragraph::load($target_id); + $author_tid = $paragraph->field_author->target_id; + array_push($tids, $author_tid); + } + $node->field_author_names = []; + foreach ($tids as $tid) { + $node->field_author_names[] = [ + 'target_id' => $tid + ]; + } + } + else { + // Clear new field value if field_authors is empty. + $node->field_author_names = []; + } + } } /** @@ -618,25 +642,3 @@ function epa_workflow_module_implements_alter(&$implementations, $hook) { unset($implementations['scheduled_publish']); } } - -/** - * Implements hook_entity_presave(). - */ -function epa_workflow_entity_presave(EntityInterface $entity) { - if ($entity->bundle() == 'perspective') { - $author_paragraphs = $entity->field_authors->getValue(); - $tids = []; - foreach ($author_paragraphs as $author) { - $target_id = $author['target_id']; - $paragraph = Paragraph::load($target_id); - $author_tid = $paragraph->field_author->target_id; - array_push($tids, $author_tid); - } - $entity->field_author_names = []; - foreach ($tids as $tid) { - $entity->field_author_names[] = [ - 'target_id' => $tid - ]; - } - } -} From 24a94141a9f428666b76076b14e4bfdcb367ba70 Mon Sep 17 00:00:00 2001 From: Nathan Han Date: Tue, 21 Dec 2021 00:01:09 -0800 Subject: [PATCH 39/87] [EPAD8-1559] Update view, remve relationships and update author exposed filter --- .../views.view.dynamic_list_perspectives.yml | 68 ++++++------------- 1 file changed, 22 insertions(+), 46 deletions(-) diff --git a/services/drupal/config/sync/views.view.dynamic_list_perspectives.yml b/services/drupal/config/sync/views.view.dynamic_list_perspectives.yml index c7abf4a722..6b0e716466 100644 --- a/services/drupal/config/sync/views.view.dynamic_list_perspectives.yml +++ b/services/drupal/config/sync/views.view.dynamic_list_perspectives.yml @@ -5,16 +5,15 @@ dependencies: config: - core.entity_view_mode.node.link - node.type.perspective + - taxonomy.vocabulary.author - taxonomy.vocabulary.press_office - taxonomy.vocabulary.subject module: - datetime - epa_core - node - - paragraphs - taxonomy - user - - views_autocomplete_filters id: dynamic_list_perspectives label: 'Dynamic List: Perspectives' module: views @@ -130,29 +129,27 @@ display: operator_limit_selection: false operator_list: { } group: 1 - name: - id: name - table: taxonomy_term_field_data - field: name - relationship: field_author + field_author_names_target_id: + id: field_author_names_target_id + table: node__field_author_names + field: field_author_names_target_id + relationship: none group_type: group admin_label: '' - operator: contains - value: '' + operator: or + value: { } group: 1 exposed: true expose: - operator_id: name_op + operator_id: field_author_names_target_id_op label: Name description: '' - use_operator: true - operator: name_op + use_operator: false + operator: field_author_names_target_id_op operator_limit_selection: true operator_list: - '=': '=' - contains: contains - starts: starts - identifier: name + or: or + identifier: field_author_names_target_id required: false remember: false multiple: false @@ -166,14 +163,7 @@ display: system_webmaster: '0' menu_admin: '0' administrator: '0' - placeholder: '' - autocomplete_filter: 0 - autocomplete_min_chars: '0' - autocomplete_items: '10' - autocomplete_field: '' - autocomplete_raw_suggestion: 1 - autocomplete_raw_dropdown: 1 - autocomplete_dependent: 0 + reduce: false is_grouped: false group_info: label: '' @@ -186,9 +176,13 @@ display: default_group: All default_group_multiple: { } group_items: { } - entity_type: taxonomy_term - entity_field: name - plugin_id: views_autocomplete_filters_string + reduce_duplicates: false + type: textfield + limit: true + vid: author + hierarchy: false + error_message: true + plugin_id: taxonomy_index_tid field_release_value: id: field_release_value table: node__field_release @@ -415,25 +409,7 @@ display: header: { } footer: { } empty: { } - relationships: - field_authors: - id: field_authors - table: node__field_authors - field: field_authors - relationship: none - group_type: group - admin_label: 'field_authors: Paragraph' - required: false - plugin_id: standard - field_author: - id: field_author - table: paragraph__field_author - field: field_author - relationship: field_authors - group_type: group - admin_label: 'field_author: Taxonomy term' - required: false - plugin_id: standard + relationships: { } arguments: { } display_extenders: views_ajax_get: From d16677386498236cceb201fba6d8a8427311ef64 Mon Sep 17 00:00:00 2001 From: Carson Oldson Date: Tue, 21 Dec 2021 09:46:15 -0600 Subject: [PATCH 40/87] [EPAD8-1553] Adjusting dynamic lists perspectives view to use 'Perspectives Subjects' vocab rather than just 'Subjects'. --- .../config/sync/views.view.dynamic_list_perspectives.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/drupal/config/sync/views.view.dynamic_list_perspectives.yml b/services/drupal/config/sync/views.view.dynamic_list_perspectives.yml index c7abf4a722..50ac3ab421 100644 --- a/services/drupal/config/sync/views.view.dynamic_list_perspectives.yml +++ b/services/drupal/config/sync/views.view.dynamic_list_perspectives.yml @@ -5,8 +5,8 @@ dependencies: config: - core.entity_view_mode.node.link - node.type.perspective + - taxonomy.vocabulary.perspectives_subjects - taxonomy.vocabulary.press_office - - taxonomy.vocabulary.subject module: - datetime - epa_core @@ -341,7 +341,7 @@ display: reduce_duplicates: false type: select limit: true - vid: subject + vid: perspectives_subjects hierarchy: false error_message: true plugin_id: taxonomy_index_tid From 98e222563c9703f9a29d6504550162db5cb6edfb Mon Sep 17 00:00:00 2001 From: Josh Wagner Date: Tue, 21 Dec 2021 13:16:52 -0500 Subject: [PATCH 41/87] [EPAD8-1563] override focus styles on usa-button --- .../epa_theme/source/_patterns/03-uswds/button/_button.scss | 5 +++++ .../button/button--accent-cool/_button--accent-cool.scss | 5 +++++ .../03-uswds/button/button--inverse/_button--inverse.scss | 5 +++++ .../03-uswds/button/button--outline/_button--outline.scss | 5 +++++ .../03-uswds/button/button--unstyled/_button--unstyled.scss | 5 +++++ 5 files changed, 25 insertions(+) create mode 100644 services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/button/_button.scss create mode 100644 services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/button/button--accent-cool/_button--accent-cool.scss create mode 100644 services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/button/button--inverse/_button--inverse.scss create mode 100644 services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/button/button--outline/_button--outline.scss create mode 100644 services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/button/button--unstyled/_button--unstyled.scss diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/button/_button.scss b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/button/_button.scss new file mode 100644 index 0000000000..b59fb40ba8 --- /dev/null +++ b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/button/_button.scss @@ -0,0 +1,5 @@ +.usa-button { + &:focus { + color: gesso-grayscale(white); + } +} diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/button/button--accent-cool/_button--accent-cool.scss b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/button/button--accent-cool/_button--accent-cool.scss new file mode 100644 index 0000000000..4f81c00b58 --- /dev/null +++ b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/button/button--accent-cool/_button--accent-cool.scss @@ -0,0 +1,5 @@ +.usa-button--accent-cool { + &:focus { + color: color(gray-90); + } +} diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/button/button--inverse/_button--inverse.scss b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/button/button--inverse/_button--inverse.scss new file mode 100644 index 0000000000..4cf951c35e --- /dev/null +++ b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/button/button--inverse/_button--inverse.scss @@ -0,0 +1,5 @@ +.usa-button--inverse.usa-button--outline { + &:focus { + color: color(gray-cool-5); + } +} diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/button/button--outline/_button--outline.scss b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/button/button--outline/_button--outline.scss new file mode 100644 index 0000000000..c7f8522219 --- /dev/null +++ b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/button/button--outline/_button--outline.scss @@ -0,0 +1,5 @@ +.usa-button--outline { + &:focus { + color: color(blue-warm-80v); + } +} diff --git a/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/button/button--unstyled/_button--unstyled.scss b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/button/button--unstyled/_button--unstyled.scss new file mode 100644 index 0000000000..5056fa4aaa --- /dev/null +++ b/services/drupal/web/themes/epa_theme/source/_patterns/03-uswds/button/button--unstyled/_button--unstyled.scss @@ -0,0 +1,5 @@ +.usa-button--unstyled { + &:focus { + color: color(blue-60v); + } +} From 5be9272d5e2f01c4e93ba451cc8889724d21f6ab Mon Sep 17 00:00:00 2001 From: Aaron Zinck Date: Tue, 21 Dec 2021 14:53:14 -0500 Subject: [PATCH 42/87] EPAD8-1561 remove markup from title and release date on news release CSV export --- .../sync/views.view.news_release_export.yml | 48 +++++++++++++------ 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/services/drupal/config/sync/views.view.news_release_export.yml b/services/drupal/config/sync/views.view.news_release_export.yml index 4eba13b9c7..530fc5e918 100644 --- a/services/drupal/config/sync/views.view.news_release_export.yml +++ b/services/drupal/config/sync/views.view.news_release_export.yml @@ -87,27 +87,38 @@ display: id: title table: node_field_data field: title - entity_type: node - entity_field: title + relationship: none + group_type: group + admin_label: '' + label: Title + exclude: false alter: alter_text: false + text: '' make_link: false + path: '' absolute: false - trim: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 word_boundary: false ellipsis: false + more_link: false + more_link_text: '' + more_link_path: '' strip_tags: false + trim: false + preserve_tags: '' html: false - hide_empty: false - empty_zero: false - settings: - link_to_entity: true - plugin_id: field - relationship: none - group_type: group - admin_label: '' - label: Title - exclude: false element_type: '' element_class: '' element_label_type: '' @@ -117,9 +128,13 @@ display: element_wrapper_class: '' element_default_classes: true empty: '' + hide_empty: false + empty_zero: false hide_alter_empty: true click_sort_column: value type: string + settings: + link_to_entity: false group_column: value group_columns: { } group_rows: true @@ -130,6 +145,9 @@ display: multi_type: separator separator: ', ' field_api_classes: false + entity_type: node + entity_field: title + plugin_id: field field_release: id: field_release table: node__field_release @@ -162,7 +180,7 @@ display: more_link: false more_link_text: '' more_link_path: '' - strip_tags: false + strip_tags: true trim: false preserve_tags: '' html: false @@ -173,7 +191,7 @@ display: element_label_colon: true element_wrapper_type: '' element_wrapper_class: '' - element_default_classes: true + element_default_classes: false empty: '' hide_empty: false empty_zero: false From 8622d7ce247c475662358591688b39f797c8350c Mon Sep 17 00:00:00 2001 From: Nathan Han Date: Sun, 26 Dec 2021 23:28:46 -0800 Subject: [PATCH 43/87] [EPAD8-1559] Change to static query --- .../epa_workflow/epa_workflow.deploy.php | 43 +++++++++++-------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/services/drupal/web/modules/custom/epa_workflow/epa_workflow.deploy.php b/services/drupal/web/modules/custom/epa_workflow/epa_workflow.deploy.php index 75cde22028..8fdfdb763b 100644 --- a/services/drupal/web/modules/custom/epa_workflow/epa_workflow.deploy.php +++ b/services/drupal/web/modules/custom/epa_workflow/epa_workflow.deploy.php @@ -221,37 +221,42 @@ function epa_workflow_deploy_0004_fix_nodes_missing_transition_date(&$sandbox) { * populate the new taxonomy reference field, field_author_names, with the * names of the authors. This elimiates duplicate entities in the dynamic lists. */ -function epa_workflow_deploy_0005_populate_perspective_author_names_field(&$sandbox) { +function epa_workflow_deploy_0006_populate_perspective_author_names_field(&$sandbox) { if (!isset($sandbox['total'])) { - // Query all published perspectives. - $result = \Drupal::entityQuery('node') - ->condition('type', 'perspective') - ->execute(); + // Query all perspectives. + $result = \Drupal::database()->query( + "SELECT nid + FROM {node} + WHERE type = 'perspective' + ORDER BY nid DESC") + ->fetchCol('nid'); $sandbox['total'] = count($result); $sandbox['current'] = 0; + $sandbox['highest_nid'] = reset($result); + $sandbox['high_water_mark'] = 0; \Drupal::logger('epa_workflow')->notice($sandbox['total'] . ' perspectives.'); } - $batch_size = 25; - - // sort nid asc - // keep track of highest nid - // increment high water mark - // can save these values in $sandbox - - // test pub persp that has author but not in new author field - // make sure after this, it has a new value and is still pub - $nids = \Drupal::entityQuery('node') - ->condition('type', 'perspective') - ->range(0, $batch_size) - ->execute(); + $nids = \Drupal::database()->query( + "SELECT nid + FROM {node} + WHERE type = 'perspective' AND nid > :high_water_mark AND nid <= :highest_nid + ORDER BY nid ASC + LIMIT 25;", [ + ':high_water_mark' => $sandbox['high_water_mark'], + ':highest_nid' => $sandbox['highest_nid'] + ]) + ->fetchCol('nid'); if (empty($nids)) { $sandbox['#finished'] = 1; return; } + else { + $sandbox['#finished'] = 0; + } /** @var \Drupal\node\NodeInterface[] $nodes */ $nodes = \Drupal::entityTypeManager() @@ -259,7 +264,7 @@ function epa_workflow_deploy_0005_populate_perspective_author_names_field(&$sand ->loadMultiple($nids); foreach ($nodes as $node) { - \Drupal::logger('epa_workflow')->notice($node->title->value); + $sandbox['high_water_mark'] = $node->id(); if (!$node->field_authors->isEmpty()) { $author_paragraphs = $node->field_authors->getValue(); $tids = []; From e9d627e720d82f21d9eb9bf18b610f43587b5eed Mon Sep 17 00:00:00 2001 From: Nathan Han Date: Sun, 26 Dec 2021 23:56:39 -0800 Subject: [PATCH 44/87] [EPAD8-1559] Remove extra line --- .../drupal/web/modules/custom/epa_workflow/epa_workflow.module | 1 - 1 file changed, 1 deletion(-) diff --git a/services/drupal/web/modules/custom/epa_workflow/epa_workflow.module b/services/drupal/web/modules/custom/epa_workflow/epa_workflow.module index cd41712526..d23ef6b7db 100644 --- a/services/drupal/web/modules/custom/epa_workflow/epa_workflow.module +++ b/services/drupal/web/modules/custom/epa_workflow/epa_workflow.module @@ -19,7 +19,6 @@ use Drupal\Core\Link; use Drupal\Core\Url; use Drupal\paragraphs\Entity\Paragraph; - /** * Implements hook_entity_base_field_info(). */ From 37baf0c88817b269dc6c758765830c580176b4ba Mon Sep 17 00:00:00 2001 From: Nathan Han Date: Mon, 27 Dec 2021 00:14:49 -0800 Subject: [PATCH 45/87] [EPAD8-1559] Hide field_author_names --- ...ity_form_display.node.perspective.default.yml | 11 +---------- ...ity_view_display.node.perspective.default.yml | 16 ---------------- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/services/drupal/config/sync/core.entity_form_display.node.perspective.default.yml b/services/drupal/config/sync/core.entity_form_display.node.perspective.default.yml index 54509732c1..b2386adc60 100644 --- a/services/drupal/config/sync/core.entity_form_display.node.perspective.default.yml +++ b/services/drupal/config/sync/core.entity_form_display.node.perspective.default.yml @@ -132,16 +132,6 @@ content: help_text: '' multiple: false third_party_settings: { } - field_author_names: - type: entity_reference_autocomplete - weight: 17 - region: content - settings: - match_operator: CONTAINS - match_limit: 10 - size: 60 - placeholder: '' - third_party_settings: { } field_authors: type: paragraphs weight: 9 @@ -351,6 +341,7 @@ content: settings: { } third_party_settings: { } hidden: + field_author_names: true field_last_published: true field_review_deadline: true field_type: true diff --git a/services/drupal/config/sync/core.entity_view_display.node.perspective.default.yml b/services/drupal/config/sync/core.entity_view_display.node.perspective.default.yml index 1b584b014e..e92cd44091 100644 --- a/services/drupal/config/sync/core.entity_view_display.node.perspective.default.yml +++ b/services/drupal/config/sync/core.entity_view_display.node.perspective.default.yml @@ -185,22 +185,6 @@ third_party_settings: type: entity_reference_label additional: { } weight: 10 - 440c065c-cdf4-4864-bfdf-b8b1cfde144b: - uuid: 440c065c-cdf4-4864-bfdf-b8b1cfde144b - region: content - configuration: - label_display: '0' - context_mapping: - entity: layout_builder.entity - id: 'field_block:node:perspective:field_author_names' - formatter: - label: above - settings: - link: true - third_party_settings: { } - type: entity_reference_label - additional: { } - weight: 11 third_party_settings: { } layout_builder_restrictions: allowed_block_categories: { } From c9d92418d0c6b2a00fd4d5c2b4c505bea37cdc28 Mon Sep 17 00:00:00 2001 From: Nathan Han Date: Mon, 27 Dec 2021 00:46:11 -0800 Subject: [PATCH 46/87] [EPAD8-1530] Remove plain text and switch to filtered html --- ...field.field.node.public_notice.field_how_to_comment.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/services/drupal/config/sync/field.field.node.public_notice.field_how_to_comment.yml b/services/drupal/config/sync/field.field.node.public_notice.field_how_to_comment.yml index 86ec8cb540..0950a2917c 100644 --- a/services/drupal/config/sync/field.field.node.public_notice.field_how_to_comment.yml +++ b/services/drupal/config/sync/field.field.node.public_notice.field_how_to_comment.yml @@ -13,9 +13,10 @@ third_party_settings: allowed_formats: filtered_html: filtered_html full_html: full_html - plain_text: plain_text inline: '0' + restricted_html: '0' unprocessed: '0' + plain_text: '0' custom_add_another: custom_add_another: '' custom_remove: '' @@ -29,8 +30,8 @@ required: false translatable: false default_value: - - value: "You may comment on the proposed action in writing, using Email, Phone or mail. Submit comments to:\r\n\r\nEmail:\r\n\r\nPhone:\r\n\r\nMail:" - format: plain_text + value: "

You may comment on the proposed action in writing, using Email, Phone or mail. Submit comments to:

\r\n\r\n

Email:

\r\n\r\n

Phone:

\r\n\r\n

Mail:

\r\n" + format: filtered_html default_value_callback: '' settings: { } field_type: text_long From 08eb9ff95ae6717a0ce2c9d76b82870798dc1549 Mon Sep 17 00:00:00 2001 From: Carson Oldson Date: Mon, 27 Dec 2021 08:56:41 -0600 Subject: [PATCH 47/87] [EPAD8-1265] Setting default values for channel and type on regulation nodes. --- .../sync/field.field.node.regulation.field_channel.yml | 6 +++++- .../config/sync/field.field.node.regulation.field_type.yml | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/services/drupal/config/sync/field.field.node.regulation.field_channel.yml b/services/drupal/config/sync/field.field.node.regulation.field_channel.yml index b07854a396..b396b44512 100644 --- a/services/drupal/config/sync/field.field.node.regulation.field_channel.yml +++ b/services/drupal/config/sync/field.field.node.regulation.field_channel.yml @@ -6,6 +6,8 @@ dependencies: - field.storage.node.field_channel - node.type.regulation - taxonomy.vocabulary.channels + content: + - 'taxonomy_term:channels:5a512a6a-01eb-43b3-9cf6-824c87bafbce' module: - custom_add_another third_party_settings: @@ -20,7 +22,9 @@ label: Channel description: 'Use this guide for choosing the right channel.' required: true translatable: false -default_value: { } +default_value: + - + target_uuid: 5a512a6a-01eb-43b3-9cf6-824c87bafbce default_value_callback: '' settings: handler: 'default:taxonomy_term' diff --git a/services/drupal/config/sync/field.field.node.regulation.field_type.yml b/services/drupal/config/sync/field.field.node.regulation.field_type.yml index 6eb30187a9..66e2d1abfb 100644 --- a/services/drupal/config/sync/field.field.node.regulation.field_type.yml +++ b/services/drupal/config/sync/field.field.node.regulation.field_type.yml @@ -6,6 +6,8 @@ dependencies: - field.storage.node.field_type - node.type.regulation - taxonomy.vocabulary.type + content: + - 'taxonomy_term:type:8f6958bf-a20c-42fd-92dd-c7e70e255319' module: - custom_add_another third_party_settings: @@ -20,7 +22,9 @@ label: Type description: 'Use this guide for choosing the right type.' required: true translatable: false -default_value: { } +default_value: + - + target_uuid: 8f6958bf-a20c-42fd-92dd-c7e70e255319 default_value_callback: '' settings: handler: 'default:taxonomy_term' From e94394c94c862fe0b8fcbcfa62a2edeca0bb29cf Mon Sep 17 00:00:00 2001 From: Carson Oldson Date: Thu, 30 Dec 2021 09:37:52 -0600 Subject: [PATCH 48/87] [EPAD8-1265] Using default_value_callback to set default value for regulatin field_type and field_channel. --- ...ld.field.node.regulation.field_channel.yml | 8 ++----- ...field.field.node.regulation.field_type.yml | 8 ++----- .../modules/custom/epa_core/epa_core.module | 23 +++++++++++++++++++ 3 files changed, 27 insertions(+), 12 deletions(-) diff --git a/services/drupal/config/sync/field.field.node.regulation.field_channel.yml b/services/drupal/config/sync/field.field.node.regulation.field_channel.yml index b396b44512..6da10ed9a7 100644 --- a/services/drupal/config/sync/field.field.node.regulation.field_channel.yml +++ b/services/drupal/config/sync/field.field.node.regulation.field_channel.yml @@ -6,8 +6,6 @@ dependencies: - field.storage.node.field_channel - node.type.regulation - taxonomy.vocabulary.channels - content: - - 'taxonomy_term:channels:5a512a6a-01eb-43b3-9cf6-824c87bafbce' module: - custom_add_another third_party_settings: @@ -22,10 +20,8 @@ label: Channel description: 'Use this guide for choosing the right channel.' required: true translatable: false -default_value: - - - target_uuid: 5a512a6a-01eb-43b3-9cf6-824c87bafbce -default_value_callback: '' +default_value: { } +default_value_callback: 'epa_core_default_value_field_channel' settings: handler: 'default:taxonomy_term' handler_settings: diff --git a/services/drupal/config/sync/field.field.node.regulation.field_type.yml b/services/drupal/config/sync/field.field.node.regulation.field_type.yml index 66e2d1abfb..4dc25e9ef1 100644 --- a/services/drupal/config/sync/field.field.node.regulation.field_type.yml +++ b/services/drupal/config/sync/field.field.node.regulation.field_type.yml @@ -6,8 +6,6 @@ dependencies: - field.storage.node.field_type - node.type.regulation - taxonomy.vocabulary.type - content: - - 'taxonomy_term:type:8f6958bf-a20c-42fd-92dd-c7e70e255319' module: - custom_add_another third_party_settings: @@ -22,10 +20,8 @@ label: Type description: 'Use this guide for choosing the right type.' required: true translatable: false -default_value: - - - target_uuid: 8f6958bf-a20c-42fd-92dd-c7e70e255319 -default_value_callback: '' +default_value: { } +default_value_callback: 'epa_core_default_value_field_type' settings: handler: 'default:taxonomy_term' handler_settings: diff --git a/services/drupal/web/modules/custom/epa_core/epa_core.module b/services/drupal/web/modules/custom/epa_core/epa_core.module index c571d90502..81b91cd34c 100644 --- a/services/drupal/web/modules/custom/epa_core/epa_core.module +++ b/services/drupal/web/modules/custom/epa_core/epa_core.module @@ -516,6 +516,9 @@ function epa_core_default_value_field_type(ContentEntityInterface $entity, Field case 'perspective': $term_name = "speeches, testimony and transcripts"; break; + case 'regulation': + $term_name = "other policies and guidance"; + break; } if (!empty($term_name)) { $term = taxonomy_term_load_multiple_by_name($term_name, 'type'); @@ -527,6 +530,26 @@ function epa_core_default_value_field_type(ContentEntityInterface $entity, Field } } +/** + * Provides default values for our channel fields across a couple content types. + */ +function epa_core_default_value_field_channel(ContentEntityInterface $entity, FieldDefinitionInterface $definition) { + if ($entity->getEntityTypeId() === 'node') { + switch ($entity->bundle()) { + case 'regulation': + $term_name = "laws & regulations"; + break; + } + if (!empty($term_name)) { + $term = taxonomy_term_load_multiple_by_name($term_name, 'channels'); + if (!empty($term)) { + $term = reset($term); + return $term->id(); + } + } + } +} + /** * Implements hook_entity_operation_alter(). */ From 75f1d4d39665fe8d2e0ac253d2bc7d0c44dcd374 Mon Sep 17 00:00:00 2001 From: Aaron Zinck Date: Thu, 30 Dec 2021 15:34:18 -0500 Subject: [PATCH 49/87] EPAD8-1568 add update hook to clear out orphaned paragraphs since these are blocking some save actions --- .../custom/epa_workflow/epa_workflow.install | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/services/drupal/web/modules/custom/epa_workflow/epa_workflow.install b/services/drupal/web/modules/custom/epa_workflow/epa_workflow.install index ae64731b43..2160be87f9 100644 --- a/services/drupal/web/modules/custom/epa_workflow/epa_workflow.install +++ b/services/drupal/web/modules/custom/epa_workflow/epa_workflow.install @@ -58,3 +58,25 @@ function epa_workflow_uninstall() { } } + +/** + * Deletes orphaned paragraphs. + */ +function epa_workflow_update_9000() { + // We're not really sure how these orphans got created. We only have 6 of them. + // select *, FROM_UNIXTIME(pifd.created) from paragraphs_item_revision_field_data pifd LEFT JOIN paragraphs_item_revision pi ON pi.revision_id = pifd.revision_id WHERE pi.revision_id IS NULL OR pi.type != pifd.type; + //+---------+-------------+--------------+----------+--------+------------+-----------+-------------+---------------------+-------------------+------------------+-------------------------------+------+-------------+------+----------+------------------+-----------------------------+ + //| id | revision_id | type | langcode | status | created | parent_id | parent_type | parent_field_name | behavior_settings | default_langcode | revision_translation_affected | id | revision_id | type | langcode | revision_default | FROM_UNIXTIME(pifd.created) | + // +---------+-------------+--------------+----------+--------+------------+-----------+-------------+---------------------+-------------------+------------------+-------------------------------+------+-------------+------+----------+------------------+-----------------------------+ + //| 1090951 | 1847933 | banner_slide | en | 1 | 1632763188 | 241866 | paragraph | field_banner_slides | a:0:{} | 1 | 1 | NULL | NULL | NULL | NULL | NULL | 2021-09-27 17:19:48 | + //| 1094162 | 1847934 | banner_slide | en | 1 | 1639416792 | 241866 | paragraph | field_banner_slides | a:0:{} | 1 | 1 | NULL | NULL | NULL | NULL | NULL | 2021-12-13 17:33:12 | + //| 158206 | 1847935 | banner_slide | en | 1 | 1624109260 | 241866 | paragraph | field_banner_slides | a:0:{} | 1 | 1 | NULL | NULL | NULL | NULL | NULL | 2021-06-19 13:27:40 | + //| 1091753 | 1847936 | banner_slide | en | 1 | 1634074251 | 241866 | paragraph | field_banner_slides | a:0:{} | 1 | 1 | NULL | NULL | NULL | NULL | NULL | 2021-10-12 21:30:51 | + //| 241866 | 1847937 | banner | en | 1 | 1624122642 | 34933 | node | field_banner | a:0:{} | 1 | 1 | NULL | NULL | NULL | NULL | NULL | 2021-06-19 17:10:42 | + //| 1085709 | 1847938 | html | en | 1 | 1625770356 | 34933 | node | field_paragraphs | a:0:{} | 1 | 1 | NULL | NULL | NULL | NULL | NULL | 2021-07-08 18:52:36 | + // +---------+-------------+--------------+----------+--------+------------+-----------+-------------+---------------------+-------------------+------------------+-------------------------------+------+-------------+------+----------+------------------+-----------------------------+ + \Drupal::database()->query( + "DELETE {paragraphs_item_revision_field_data} FROM {paragraphs_item_revision_field_data} + LEFT JOIN {paragraphs_item_revision} ON {paragraphs_item_revision}.revision_id = {paragraphs_item_revision_field_data}.revision_id + WHERE {paragraphs_item_revision}.revision_id IS NULL;")->execute(); +} From be6f4c9dd697622249394a8ae4b598d7c80b4cd3 Mon Sep 17 00:00:00 2001 From: Aaron Zinck Date: Mon, 3 Jan 2022 10:49:36 -0500 Subject: [PATCH 50/87] EPAD8-1559 simplify deploy hook and rely on presave logic to extract authors correctly --- .../epa_workflow/epa_workflow.deploy.php | 26 +++---------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/services/drupal/web/modules/custom/epa_workflow/epa_workflow.deploy.php b/services/drupal/web/modules/custom/epa_workflow/epa_workflow.deploy.php index 8fdfdb763b..4a17fd6dac 100644 --- a/services/drupal/web/modules/custom/epa_workflow/epa_workflow.deploy.php +++ b/services/drupal/web/modules/custom/epa_workflow/epa_workflow.deploy.php @@ -240,12 +240,12 @@ function epa_workflow_deploy_0006_populate_perspective_author_names_field(&$sand } $nids = \Drupal::database()->query( - "SELECT nid - FROM {node} + "SELECT nid + FROM {node} WHERE type = 'perspective' AND nid > :high_water_mark AND nid <= :highest_nid ORDER BY nid ASC LIMIT 25;", [ - ':high_water_mark' => $sandbox['high_water_mark'], + ':high_water_mark' => $sandbox['high_water_mark'], ':highest_nid' => $sandbox['highest_nid'] ]) ->fetchCol('nid'); @@ -265,26 +265,6 @@ function epa_workflow_deploy_0006_populate_perspective_author_names_field(&$sand foreach ($nodes as $node) { $sandbox['high_water_mark'] = $node->id(); - if (!$node->field_authors->isEmpty()) { - $author_paragraphs = $node->field_authors->getValue(); - $tids = []; - foreach ($author_paragraphs as $author) { - $target_id = $author['target_id']; - $paragraph = Drupal\paragraphs\Entity\Paragraph::load($target_id); - $author_tid = $paragraph->field_author->target_id; - array_push($tids, $author_tid); - } - $node->field_author_names = []; - foreach ($tids as $tid) { - $node->field_author_names[] = [ - 'target_id' => $tid - ]; - } - } - else { - // Clear new field value if field_authors is empty. - $node->field_author_names = []; - } $node->save(); $sandbox['current']++; } From fa97f3ca5e551617499537bc59e18cd480fcdc1c Mon Sep 17 00:00:00 2001 From: Nathan Han Date: Mon, 3 Jan 2022 20:05:17 -0800 Subject: [PATCH 51/87] [EPAD8-1546] Create field_share_image, add to webareas, update metatag config --- .../field.storage.group.field_share_image.yml | 20 +++++++++++ .../sync/metatag.metatag_defaults.node.yml | 34 ++++++++++++------- 2 files changed, 42 insertions(+), 12 deletions(-) create mode 100644 services/drupal/config/sync/field.storage.group.field_share_image.yml diff --git a/services/drupal/config/sync/field.storage.group.field_share_image.yml b/services/drupal/config/sync/field.storage.group.field_share_image.yml new file mode 100644 index 0000000000..34a542930f --- /dev/null +++ b/services/drupal/config/sync/field.storage.group.field_share_image.yml @@ -0,0 +1,20 @@ +uuid: fd3c1f30-b937-4533-acdb-38b5b6b430cb +langcode: en +status: true +dependencies: + module: + - group + - media +id: group.field_share_image +field_name: field_share_image +entity_type: group +type: entity_reference +settings: + target_type: media +module: core +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/services/drupal/config/sync/metatag.metatag_defaults.node.yml b/services/drupal/config/sync/metatag.metatag_defaults.node.yml index 95e3193a67..5bdc42fb75 100644 --- a/services/drupal/config/sync/metatag.metatag_defaults.node.yml +++ b/services/drupal/config/sync/metatag.metatag_defaults.node.yml @@ -7,26 +7,36 @@ _core: id: node label: Content tags: - epa_title: '[node:title]' - epa_webarea: '[node:group:field_homepage:entity:title]' - epa_creator: '[node:group:field_publisher:entity:name]' - epa_regulation: '[node:field_env_laws_regs_and_treaties]' epa_channel: '[node:field_channel]' - epa_created: '[node:created:custom:Y-m-d]' + epa_contenttype: '[node:content-type]' epa_coverage: '[node:field_geographic_locations]' - epa_reviewed: '[node:field_review_deadline:date:custom:Y-m-d]' - epa_language: '[node:field_language:value]' + epa_created: '[node:created:custom:Y-m-d]' + epa_creator: '[node:group:field_publisher:entity:name]' epa_description: '[node:field_description:value]' + epa_language: '[node:field_language:value]' epa_modified: '[node:field_last_published:date:custom:Y-m-d]' + epa_regulation: '[node:field_env_laws_regs_and_treaties]' + epa_reviewed: '[node:field_review_deadline:date:custom:Y-m-d]' + epa_title: '[node:title]' epa_type: '[node:field_type]' - epa_contenttype: '[node:content-type]' + epa_webarea: '[node:group:field_homepage:entity:title]' + description: '[node:field_description:value]' keywords: '[node:field_keywords]' title: '[node:title] | [site:name]' - description: '[node:field_description:value]' article_modified_time: '[node:field_last_published:date:custom:Y-m-d]' article_published_time: '[node:created:custom:c]' - og_type: website - og_updated_time: '[node:field_last_published:date:custom:Y-m-d]' - og_description: '[node:field_description:value]' og_country_name: 'United States of America' + og_description: '[node:field_description:value]' + og_image: '[node:group:field_share_image:entity:field_media_image:url]' + og_image_alt: '[node:group:field_share_image:entity:field_media_image:alt]' + og_site_name: '[site:name]' og_title: '[node:title] | [site:name]' + og_type: '[node:content-type]' + og_updated_time: '[node:field_last_published:date:custom:Y-m-d]' + og_url: '[current-page:url:absolute]' + twitter_cards_description: '[node:field_description:value]' + twitter_cards_image: '[node:group:field_share_image]' + twitter_cards_image_alt: '[node:group:field_share_image:entity:field_media_image:alt]' + twitter_cards_page_url: '[current-page:url:absolute]' + twitter_cards_title: '[node:title] | [site:name]' + twitter_cards_type: summary_large_image From 7b12dc85068abed97fcc399fa625722fd8128f3a Mon Sep 17 00:00:00 2001 From: Nathan Han Date: Mon, 3 Jan 2022 20:21:34 -0800 Subject: [PATCH 52/87] [EPAD8-1546] Update image config --- services/drupal/config/sync/metatag.metatag_defaults.node.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/drupal/config/sync/metatag.metatag_defaults.node.yml b/services/drupal/config/sync/metatag.metatag_defaults.node.yml index 5bdc42fb75..0e5facfea8 100644 --- a/services/drupal/config/sync/metatag.metatag_defaults.node.yml +++ b/services/drupal/config/sync/metatag.metatag_defaults.node.yml @@ -27,7 +27,7 @@ tags: article_published_time: '[node:created:custom:c]' og_country_name: 'United States of America' og_description: '[node:field_description:value]' - og_image: '[node:group:field_share_image:entity:field_media_image:url]' + og_image: '[node:group:field_share_image:entity:field_media_image:entity:url]' og_image_alt: '[node:group:field_share_image:entity:field_media_image:alt]' og_site_name: '[site:name]' og_title: '[node:title] | [site:name]' @@ -35,7 +35,7 @@ tags: og_updated_time: '[node:field_last_published:date:custom:Y-m-d]' og_url: '[current-page:url:absolute]' twitter_cards_description: '[node:field_description:value]' - twitter_cards_image: '[node:group:field_share_image]' + twitter_cards_image: '[node:group:field_share_image:entity:field_media_image:entity:url]' twitter_cards_image_alt: '[node:group:field_share_image:entity:field_media_image:alt]' twitter_cards_page_url: '[current-page:url:absolute]' twitter_cards_title: '[node:title] | [site:name]' From 4ec54c3ec99d27d2491e88f0474ca806cdd91e62 Mon Sep 17 00:00:00 2001 From: Nathan Han Date: Mon, 3 Jan 2022 20:57:12 -0800 Subject: [PATCH 53/87] [EPAD8-1546] Add group config for field_share_image --- ...field.group.web_area.field_share_image.yml | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 services/drupal/config/sync/field.field.group.web_area.field_share_image.yml diff --git a/services/drupal/config/sync/field.field.group.web_area.field_share_image.yml b/services/drupal/config/sync/field.field.group.web_area.field_share_image.yml new file mode 100644 index 0000000000..4eaf1b9915 --- /dev/null +++ b/services/drupal/config/sync/field.field.group.web_area.field_share_image.yml @@ -0,0 +1,35 @@ +uuid: 9c0036ca-e224-426c-8b93-3e1013561426 +langcode: en +status: true +dependencies: + config: + - field.storage.group.field_share_image + - group.type.web_area + - media.type.image + module: + - custom_add_another +third_party_settings: + custom_add_another: + custom_add_another: '' + custom_remove: '' +id: group.web_area.field_share_image +field_name: field_share_image +entity_type: group +bundle: web_area +label: 'Share Image' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + handler: 'default:media' + handler_settings: + target_bundles: + image: image + sort: + field: _none + direction: ASC + auto_create: false + auto_create_bundle: '' +field_type: entity_reference From 9eb38af036e62eec86d344ab87b89f8186f75436 Mon Sep 17 00:00:00 2001 From: Nathan Han Date: Mon, 3 Jan 2022 21:36:26 -0800 Subject: [PATCH 54/87] [EPAD8-1546] Add form and display config --- ...re.entity_form_display.group.web_area.default.yml | 12 +++++++++++- ...re.entity_view_display.group.web_area.default.yml | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/services/drupal/config/sync/core.entity_form_display.group.web_area.default.yml b/services/drupal/config/sync/core.entity_form_display.group.web_area.default.yml index 91d3ad8ccb..bcdbdb5b18 100644 --- a/services/drupal/config/sync/core.entity_form_display.group.web_area.default.yml +++ b/services/drupal/config/sync/core.entity_form_display.group.web_area.default.yml @@ -3,8 +3,8 @@ langcode: en status: true dependencies: config: - - field.field.group.web_area.field_allow_perspectives - field.field.group.web_area.field_allow_news_releases + - field.field.group.web_area.field_allow_perspectives - field.field.group.web_area.field_contact_us_form - field.field.group.web_area.field_editor_in_chief - field.field.group.web_area.field_homepage @@ -13,9 +13,12 @@ dependencies: - field.field.group.web_area.field_migration_review_complete - field.field.group.web_area.field_navigation_style - field.field.group.web_area.field_publisher + - field.field.group.web_area.field_share_image - field.field.group.web_area.field_web_area_comments - field.field.group.web_area.field_web_council_representative - group.type.web_area + module: + - media_library id: group.web_area.default targetEntityType: group bundle: web_area @@ -96,6 +99,13 @@ content: third_party_settings: { } type: entity_reference_autocomplete region: content + field_share_image: + type: media_library_widget + weight: 13 + settings: + media_types: { } + third_party_settings: { } + region: content field_web_area_comments: weight: 8 settings: diff --git a/services/drupal/config/sync/core.entity_view_display.group.web_area.default.yml b/services/drupal/config/sync/core.entity_view_display.group.web_area.default.yml index f2b985b579..8cfaa6be78 100644 --- a/services/drupal/config/sync/core.entity_view_display.group.web_area.default.yml +++ b/services/drupal/config/sync/core.entity_view_display.group.web_area.default.yml @@ -3,8 +3,8 @@ langcode: en status: true dependencies: config: - - field.field.group.web_area.field_allow_perspectives - field.field.group.web_area.field_allow_news_releases + - field.field.group.web_area.field_allow_perspectives - field.field.group.web_area.field_contact_us_form - field.field.group.web_area.field_editor_in_chief - field.field.group.web_area.field_homepage @@ -13,6 +13,7 @@ dependencies: - field.field.group.web_area.field_migration_review_complete - field.field.group.web_area.field_navigation_style - field.field.group.web_area.field_publisher + - field.field.group.web_area.field_share_image - field.field.group.web_area.field_web_area_comments - field.field.group.web_area.field_web_council_representative - group.type.web_area @@ -110,6 +111,15 @@ content: third_party_settings: { } type: entity_reference_label region: content + field_share_image: + type: entity_reference_entity_view + weight: 12 + label: above + settings: + view_mode: default + link: false + third_party_settings: { } + region: content field_web_area_comments: weight: 7 label: above From 94a9110f5594bdd8de50ef7b8e898cee4746a717 Mon Sep 17 00:00:00 2001 From: Michael Hessling Date: Tue, 4 Jan 2022 12:52:56 -0500 Subject: [PATCH 55/87] EPAD8-1581 Add height/width to
{{ caption }}
elements --- services/drupal/config/sync/filter.format.filtered_html.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/drupal/config/sync/filter.format.filtered_html.yml b/services/drupal/config/sync/filter.format.filtered_html.yml index fd7ab45e94..e63b1ef85c 100644 --- a/services/drupal/config/sync/filter.format.filtered_html.yml +++ b/services/drupal/config/sync/filter.format.filtered_html.yml @@ -34,7 +34,7 @@ filters: status: true weight: -48 settings: - allowed_html: '<* accesskey aria-* class id role style tabindex title data data-* name hidden>