diff --git a/composer-manifest.yaml b/composer-manifest.yaml index 39c67986..52a067ab 100644 --- a/composer-manifest.yaml +++ b/composer-manifest.yaml @@ -154,7 +154,7 @@ packages: harvesthq/chosen: 1.8.7 html2text/html2text: 4.0.1 joachim-n/composer-manifest: 1.0.4 - judicialcouncil/courtyard-artifact: 0.1.305 + judicialcouncil/courtyard-artifact: 0.1.312 kub-at/php-simple-html-dom-parser: 1.9.1 laminas/laminas-diactoros: 1.8.7p2 laminas/laminas-escaper: 2.6.1 diff --git a/composer.json b/composer.json index c515abe1..bf382fac 100644 --- a/composer.json +++ b/composer.json @@ -247,7 +247,8 @@ "patch -p1 < patches/gitattributes.patch", "patch -p1 < patches/robots.patch", "patch -p1 < patches/robots-2.patch", - "patch -p1 < patches/robots-3.patch" + "patch -p1 < patches/robots-3.patch", + "patch -p1 < patches/robots-4.patch" ], "build-assets": [ "@prepare-for-pantheon", diff --git a/composer.lock b/composer.lock index 95e03deb..c6b46151 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "805a74c2fba2c103747c8c2fff5f4010", + "content-hash": "fc169c29231d9a4b86bab26c586aa7d4", "packages": [ { "name": "alchemy/zippy", @@ -9468,16 +9468,16 @@ }, { "name": "judicialcouncil/courtyard-artifact", - "version": "0.1.305", + "version": "0.1.312", "source": { "type": "git", "url": "https://github.com/JudicialCouncilOfCalifornia/courtyard-artifact.git", - "reference": "babb01d7142e6ff840c31a549516d91934b819c7" + "reference": "6b46f7930bf54e3d7cfa24d6a7d8b2a6eb95ac1c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/JudicialCouncilOfCalifornia/courtyard-artifact/zipball/babb01d7142e6ff840c31a549516d91934b819c7", - "reference": "babb01d7142e6ff840c31a549516d91934b819c7", + "url": "https://api.github.com/repos/JudicialCouncilOfCalifornia/courtyard-artifact/zipball/6b46f7930bf54e3d7cfa24d6a7d8b2a6eb95ac1c", + "reference": "6b46f7930bf54e3d7cfa24d6a7d8b2a6eb95ac1c", "shasum": "" }, "type": "drupal-library", @@ -9492,7 +9492,7 @@ } ], "description": "A build artifact of the Courtyard Pattern Lab pattern library.", - "time": "2022-01-26T01:58:15+00:00" + "time": "2022-02-09T17:46:23+00:00" }, { "name": "kub-at/php-simple-html-dom-parser", @@ -14364,6 +14364,10 @@ "GPL-2.0+" ], "authors": [ + { + "name": "Bohun Tak", + "homepage": "https://www.drupal.org/user/1205098" + }, { "name": "mrhanlon", "homepage": "https://www.drupal.org/user/764624" diff --git a/config/config-default/core.entity_form_display.node.overview.default.yml b/config/config-default/core.entity_form_display.node.overview.default.yml index 31412896..16c87f37 100644 --- a/config/config-default/core.entity_form_display.node.overview.default.yml +++ b/config/config-default/core.entity_form_display.node.overview.default.yml @@ -4,16 +4,22 @@ status: true dependencies: config: - field.field.node.overview.field_actions + - field.field.node.overview.field_case_type_forms_page - field.field.node.overview.field_case_types - field.field.node.overview.field_paragraphs - field.field.node.overview.field_parties - field.field.node.overview.field_watchers - node.type.overview + - workflows.workflow.editorial_workflow module: - cc + - content_moderation - field_group + - link - paragraphs - path + - scheduler + - scheduler_content_moderation_integration third_party_settings: field_group: group_tags: @@ -22,6 +28,7 @@ third_party_settings: - field_actions - field_parties - field_watchers + - field_case_type_forms_page parent_name: '' weight: 12 format_type: fieldset @@ -49,6 +56,14 @@ content: third_party_settings: { } type: options_select region: content + field_case_type_forms_page: + weight: 17 + settings: + placeholder_url: '' + placeholder_title: '' + third_party_settings: { } + type: link_default + region: content field_case_types: weight: 13 settings: { } @@ -88,6 +103,12 @@ content: settings: include_locked: true third_party_settings: { } + moderation_state: + type: moderation_state_default + weight: 100 + settings: { } + region: content + third_party_settings: { } path: type: path weight: 7 @@ -101,6 +122,23 @@ content: weight: 5 region: content third_party_settings: { } + publish_on: + type: datetime_timestamp_no_default + weight: 30 + region: content + settings: { } + third_party_settings: { } + publish_state: + type: scheduler_moderation + weight: 30 + region: content + settings: { } + third_party_settings: { } + scheduler_settings: + weight: 20 + region: content + settings: { } + third_party_settings: { } status: type: boolean_checkbox settings: @@ -138,6 +176,18 @@ content: match_limit: 10 region: content third_party_settings: { } + unpublish_on: + type: datetime_timestamp_no_default + weight: 30 + region: content + settings: { } + third_party_settings: { } + unpublish_state: + type: scheduler_moderation + weight: 30 + region: content + settings: { } + third_party_settings: { } url_redirects: weight: 8 region: content diff --git a/config/config-default/core.entity_view_display.node.overview.default.yml b/config/config-default/core.entity_view_display.node.overview.default.yml index 5efb9b9a..9c93ce84 100644 --- a/config/config-default/core.entity_view_display.node.overview.default.yml +++ b/config/config-default/core.entity_view_display.node.overview.default.yml @@ -4,6 +4,7 @@ status: true dependencies: config: - field.field.node.overview.field_actions + - field.field.node.overview.field_case_type_forms_page - field.field.node.overview.field_case_types - field.field.node.overview.field_paragraphs - field.field.node.overview.field_parties @@ -11,6 +12,7 @@ dependencies: - node.type.overview module: - entity_reference_revisions + - link - user id: node.overview.default targetEntityType: node @@ -22,6 +24,18 @@ content: region: content settings: { } third_party_settings: { } + field_case_type_forms_page: + weight: 2 + label: above + settings: + trim_length: 80 + url_only: false + url_plain: false + rel: '' + target: '' + third_party_settings: { } + type: link + region: content field_paragraphs: weight: 1 label: above diff --git a/config/config-default/core.entity_view_display.node.overview.search_index.yml b/config/config-default/core.entity_view_display.node.overview.search_index.yml index 23b4d60f..21dc40b7 100644 --- a/config/config-default/core.entity_view_display.node.overview.search_index.yml +++ b/config/config-default/core.entity_view_display.node.overview.search_index.yml @@ -5,6 +5,7 @@ dependencies: config: - core.entity_view_mode.node.search_index - field.field.node.overview.field_actions + - field.field.node.overview.field_case_type_forms_page - field.field.node.overview.field_case_types - field.field.node.overview.field_paragraphs - field.field.node.overview.field_parties @@ -20,6 +21,7 @@ content: { } hidden: content_moderation_control: true field_actions: true + field_case_type_forms_page: true field_case_types: true field_paragraphs: true field_parties: true diff --git a/config/config-default/core.entity_view_display.node.overview.teaser.yml b/config/config-default/core.entity_view_display.node.overview.teaser.yml index 15b20b9a..b4ba15f8 100644 --- a/config/config-default/core.entity_view_display.node.overview.teaser.yml +++ b/config/config-default/core.entity_view_display.node.overview.teaser.yml @@ -5,6 +5,7 @@ dependencies: config: - core.entity_view_mode.node.teaser - field.field.node.overview.field_actions + - field.field.node.overview.field_case_type_forms_page - field.field.node.overview.field_case_types - field.field.node.overview.field_paragraphs - field.field.node.overview.field_parties @@ -16,9 +17,15 @@ id: node.overview.teaser targetEntityType: node bundle: overview mode: teaser -content: { } +content: + content_moderation_control: + weight: -20 + settings: { } + third_party_settings: { } + region: content hidden: field_actions: true + field_case_type_forms_page: true field_case_types: true field_paragraphs: true field_parties: true diff --git a/config/config-default/field.field.node.overview.field_case_type_forms_page.yml b/config/config-default/field.field.node.overview.field_case_type_forms_page.yml new file mode 100644 index 00000000..5344c579 --- /dev/null +++ b/config/config-default/field.field.node.overview.field_case_type_forms_page.yml @@ -0,0 +1,31 @@ +uuid: 2a738370-3f60-44fa-9e00-2fc5af57913e +langcode: en +status: true +dependencies: + config: + - field.storage.node.field_case_type_forms_page + - node.type.overview + module: + - datalayer + - link + - tmgmt_content +third_party_settings: + datalayer: + expose: 0 + label: field_case_type_forms_page + tmgmt_content: + excluded: false +id: node.overview.field_case_type_forms_page +field_name: field_case_type_forms_page +entity_type: node +bundle: overview +label: 'Case type forms page' +description: '' +required: false +translatable: false +default_value: { } +default_value_callback: '' +settings: + link_type: 17 + title: 0 +field_type: link diff --git a/config/config-default/field.storage.node.field_case_type_forms_page.yml b/config/config-default/field.storage.node.field_case_type_forms_page.yml new file mode 100644 index 00000000..0e6cbd6d --- /dev/null +++ b/config/config-default/field.storage.node.field_case_type_forms_page.yml @@ -0,0 +1,19 @@ +uuid: 930f0e06-d3b3-48a9-820a-023a1b26fe25 +langcode: en +status: true +dependencies: + module: + - link + - node +id: node.field_case_type_forms_page +field_name: field_case_type_forms_page +entity_type: node +type: link +settings: { } +module: link +locked: false +cardinality: 1 +translatable: true +indexes: { } +persist_with_no_fields: false +custom_storage: false diff --git a/config/config-default/system.site.yml b/config/config-default/system.site.yml index 7d4292d1..ef6f6dc7 100644 --- a/config/config-default/system.site.yml +++ b/config/config-default/system.site.yml @@ -1,4 +1,4 @@ -name: 'CA Courts Self Help' +name: 'California Courts | Self Help Guide' mail: no-reply@courtinfo.ca.gov slogan: '' page: diff --git a/patches/robots-4.patch b/patches/robots-4.patch new file mode 100644 index 00000000..5af728ed --- /dev/null +++ b/patches/robots-4.patch @@ -0,0 +1,65 @@ +diff --git a/web/robots.txt b/web/robots.txt +index e4c26f0a..0b75cd2b 100644 +--- a/web/robots.txt ++++ b/web/robots.txt +@@ -101,6 +101,60 @@ Allow: /es/eviction-landlord/notice + Allow: /es/eviction-tenant + Allow: /es/eviction-tenant/lose-case + Allow: /es/indice-de-desalojo ++#DV forms 02-09-2022 ++Allow: /jcc-form/DV-815 ++Allow: /jcc-form/DV-900 ++Allow: /jcc-form/DV-805 ++Allow: /jcc-form/DV-901 ++Allow: /jcc-form/DV-800-INFO ++Allow: /jcc-form/DV-730 ++Allow: /jcc-form/DV-800 ++Allow: /jcc-form/DV-720 ++Allow: /jcc-form/DV-710 ++Allow: /jcc-form/DV-700 ++Allow: /jcc-form/DV-610 ++Allow: /jcc-form/DV-700-INFO ++Allow: /jcc-form/DV-630 ++Allow: /jcc-form/DV-505-INFO ++Allow: /jcc-form/DV-570 ++Allow: /jcc-form/DV-520-INFO ++Allow: /jcc-form/DV-500-INFO ++Allow: /jcc-form/DV-600 ++Allow: /jcc-form/DV-530-INFO ++Allow: /jcc-form/DV-400-INFO ++Allow: /jcc-form/DV-250 ++Allow: /jcc-form/DV-205-INFO ++Allow: /jcc-form/DV-400 ++Allow: /jcc-form/DV-210 ++Allow: /jcc-form/DV-200-INFO ++Allow: /jcc-form/DV-200 ++Allow: /jcc-form/DV-179 ++Allow: /jcc-form/DV-177 ++Allow: /jcc-form/DV-180 ++Allow: /jcc-form/DV-178 ++Allow: /jcc-form/DV-176 ++Allow: /jcc-form/DV-160-INFO ++Allow: /jcc-form/DV-175 ++Allow: /jcc-form/DV-165 ++Allow: /jcc-form/DV-160 ++Allow: /jcc-form/DV-170 ++Allow: /jcc-form/DV-150 ++Allow: /jcc-form/DV-140 ++Allow: /jcc-form/DV-145 ++Allow: /jcc-form/DV-130 ++Allow: /jcc-form/DV-120-INFO ++Allow: /jcc-form/DV-117 ++Allow: /jcc-form/DV-120 ++Allow: /jcc-form/DV-116 ++Allow: /jcc-form/DV-115-INFO ++Allow: /jcc-form/DV-112 ++Allow: /jcc-form/DV-115 ++Allow: /jcc-form/DV-108 ++Allow: /jcc-form/DV-109 ++Allow: /jcc-form/DV-105 ++Allow: /jcc-form/DV-108 ++Allow: /jcc-form/DV-100 ++Allow: /jcc-form/DV-101 + # Directories + Disallow: /core/ + Disallow: /profiles/ diff --git a/web/robots.txt b/web/robots.txt index e4c26f0a..0b75cd2b 100644 --- a/web/robots.txt +++ b/web/robots.txt @@ -101,6 +101,60 @@ Allow: /es/eviction-landlord/notice Allow: /es/eviction-tenant Allow: /es/eviction-tenant/lose-case Allow: /es/indice-de-desalojo +#DV forms 02-09-2022 +Allow: /jcc-form/DV-815 +Allow: /jcc-form/DV-900 +Allow: /jcc-form/DV-805 +Allow: /jcc-form/DV-901 +Allow: /jcc-form/DV-800-INFO +Allow: /jcc-form/DV-730 +Allow: /jcc-form/DV-800 +Allow: /jcc-form/DV-720 +Allow: /jcc-form/DV-710 +Allow: /jcc-form/DV-700 +Allow: /jcc-form/DV-610 +Allow: /jcc-form/DV-700-INFO +Allow: /jcc-form/DV-630 +Allow: /jcc-form/DV-505-INFO +Allow: /jcc-form/DV-570 +Allow: /jcc-form/DV-520-INFO +Allow: /jcc-form/DV-500-INFO +Allow: /jcc-form/DV-600 +Allow: /jcc-form/DV-530-INFO +Allow: /jcc-form/DV-400-INFO +Allow: /jcc-form/DV-250 +Allow: /jcc-form/DV-205-INFO +Allow: /jcc-form/DV-400 +Allow: /jcc-form/DV-210 +Allow: /jcc-form/DV-200-INFO +Allow: /jcc-form/DV-200 +Allow: /jcc-form/DV-179 +Allow: /jcc-form/DV-177 +Allow: /jcc-form/DV-180 +Allow: /jcc-form/DV-178 +Allow: /jcc-form/DV-176 +Allow: /jcc-form/DV-160-INFO +Allow: /jcc-form/DV-175 +Allow: /jcc-form/DV-165 +Allow: /jcc-form/DV-160 +Allow: /jcc-form/DV-170 +Allow: /jcc-form/DV-150 +Allow: /jcc-form/DV-140 +Allow: /jcc-form/DV-145 +Allow: /jcc-form/DV-130 +Allow: /jcc-form/DV-120-INFO +Allow: /jcc-form/DV-117 +Allow: /jcc-form/DV-120 +Allow: /jcc-form/DV-116 +Allow: /jcc-form/DV-115-INFO +Allow: /jcc-form/DV-112 +Allow: /jcc-form/DV-115 +Allow: /jcc-form/DV-108 +Allow: /jcc-form/DV-109 +Allow: /jcc-form/DV-105 +Allow: /jcc-form/DV-108 +Allow: /jcc-form/DV-100 +Allow: /jcc-form/DV-101 # Directories Disallow: /core/ Disallow: /profiles/ diff --git a/web/themes/custom/atrium/includes/paragraph.inc b/web/themes/custom/atrium/includes/paragraph.inc new file mode 100644 index 00000000..b39a8864 --- /dev/null +++ b/web/themes/custom/atrium/includes/paragraph.inc @@ -0,0 +1,49 @@ +getType() == 'switchboard'){ + $parent = $paragraph->getParentEntity(); + if($parent->bundle() == 'overview'){ + + $terms = $parent->get('field_case_types')->referencedEntities(); + $case_forms_uri = $parent->get('field_case_type_forms_page'); + $case_forms_url = $case_forms_uri->uri ? Url::fromUri($case_forms_uri->uri)->toString() : null; + if(count($terms) == 1){ + if (!$terms[0]->get('field_url')->isEmpty()) { + $variables['switchboard_footer']['label'] = t('Already know what you are looking for?'); + + $term_custom_uri = $terms[0]->get('field_url')->getValue(); + $variables['switchboard_footer']['buttons'][0]['url'] = Url::fromUri($term_custom_uri[0]['uri']); + $variables['switchboard_footer']['buttons'][1]['url'] = $case_forms_url; + $variables['switchboard_footer']['buttons'][0]['icon']['name'] = 'file'; + $variables['switchboard_footer']['buttons'][1]['icon']['name'] = 'list'; + if ($term_custom_uri[0]['title'] != '') { + $variables['switchboard_footer']['buttons'][0]['title'] = t('See ') . t($term_custom_uri[0]['title']) . t(' Forms'); + $variables['switchboard_footer']['buttons'][1]['title'] = t('Index: All ') . t($term_custom_uri[0]['title']) . t(' Pages'); + } else { + // Translation through taxonomy management. + $lang_code = \Drupal::languageManager()->getCurrentLanguage()->getId(); + $term_translated = Drupal::service('entity.repository')->getTranslationFromContext($terms[0], $lang_code); + $term_name = $term_translated->getName(); + $variables['switchboard_footer']['buttons'][0]['title'] = t('See ') . $term_name . t(' Forms'); + $variables['switchboard_footer']['buttons'][1]['title'] = t('Index: All ') . $term_name . t(' Pages'); + } + } + } + } + } +} diff --git a/web/themes/custom/atrium/templates/paragraph/paragraph--switchboard.html.twig b/web/themes/custom/atrium/templates/paragraph/paragraph--switchboard.html.twig index 9ab26955..03b3dbd6 100644 --- a/web/themes/custom/atrium/templates/paragraph/paragraph--switchboard.html.twig +++ b/web/themes/custom/atrium/templates/paragraph/paragraph--switchboard.html.twig @@ -55,6 +55,7 @@ is not translated itself (see https://www.drupal.org/node/2735121) #} items: { primary: primary_items, }, + footer: switchboard_footer } } only %} {% endif %}