diff --git a/config/default/field.field.paragraph.video.field_is_channel.yml b/config/default/field.field.paragraph.video.field_is_channel.yml index 62dee29380..5e5dcbfd64 100644 --- a/config/default/field.field.paragraph.video.field_is_channel.yml +++ b/config/default/field.field.paragraph.video.field_is_channel.yml @@ -15,7 +15,9 @@ label: 'Is a Youtube channel?' description: '' required: true translatable: false -default_value: { } +default_value: + - + value: 'false' default_value_callback: '' settings: { } field_type: list_string diff --git a/config/default/metatag.metatag_defaults.global.yml b/config/default/metatag.metatag_defaults.global.yml index 704c165725..4aa172b6b0 100644 --- a/config/default/metatag.metatag_defaults.global.yml +++ b/config/default/metatag.metatag_defaults.global.yml @@ -7,7 +7,7 @@ _core: id: global label: Global tags: - generator: 'Drupal 9 (http://drupal.org)' + generator: 'Drupal 10 (http://drupal.org)' canonical_url: '[current-page:url:absolute]' title: '[current-page:title] | [current-page:pager][site:name]' shortlink: '[current-page:url:unaliased]' diff --git a/config/default/metatag.metatag_defaults.node.yml b/config/default/metatag.metatag_defaults.node.yml index c634343924..40c413cdc1 100644 --- a/config/default/metatag.metatag_defaults.node.yml +++ b/config/default/metatag.metatag_defaults.node.yml @@ -7,20 +7,22 @@ _core: id: node label: Content tags: + article_modified_time: '[node:changed:html_datetime]' + article_published_time: '[node:published:html_datetime]' canonical_url: '[node:url]' description: '[node:summary]' - title: '[node:title] | [site:name]' og_description: '[node:summary]' - og_updated_time: '[node:changed:custom:c]' - article_modified_time: '[node:created:custom:c]' - article_published_time: '[node:created:custom:c]' - og_url: '[current-page:url:absolute]' og_image: 'https://patterns.boston.gov/images/global/icons/seal_dark_1000x1000.png' og_title: '[node:title]' - twitter_cards_description: '[node:summary]' + og_updated_time: '[node:changed:html_datetime]' + og_url: '[current-page:url:absolute]' + schema_article_date_modified: '[node:changed:html_datetime]' + schema_article_date_published: '[node:published:html_datetime]' + title: '[node:title] | [site:name]' twitter_cards_creator: '@CityOfBoston' - twitter_cards_type: summary twitter_cards_creator_id: '124455872' + twitter_cards_description: '[node:summary]' twitter_cards_site: '@CityOfBoston' twitter_cards_site_id: '124455872' twitter_cards_title: '[node:title]' + twitter_cards_type: summary diff --git a/docroot/modules/custom/bos_components/modules/bos_translate/bos_translate.libraries.yml b/docroot/modules/custom/bos_components/modules/bos_translate/bos_translate.libraries.yml index d7462905a4..cadc4a06c4 100644 --- a/docroot/modules/custom/bos_components/modules/bos_translate/bos_translate.libraries.yml +++ b/docroot/modules/custom/bos_components/modules/bos_translate/bos_translate.libraries.yml @@ -1,12 +1,12 @@ bos_translate_js: - version: 2.x + version: 2.x.12345 js: js/translate.js: {} dependencies: - core/drupalSettings bos_translate_css: - version: 1.x + version: 1.x.12456 css: theme: css/translate.css: {} diff --git a/docroot/modules/custom/bos_components/modules/bos_translate/js/translate.js b/docroot/modules/custom/bos_components/modules/bos_translate/js/translate.js index 77fdd0bad0..4fbef43efa 100644 --- a/docroot/modules/custom/bos_components/modules/bos_translate/js/translate.js +++ b/docroot/modules/custom/bos_components/modules/bos_translate/js/translate.js @@ -88,17 +88,7 @@ let translate = function(d){ h+="
  • Finally, press Contribute to contribute your suggested edits.
  • "; h+="

    More information about contributing to Google Translate can be found here.

    "; h+="

    Please note that DoIT does not control the process by which contributed translations are incorporated into the Google web translator.

    "; - h+="

    The City of Boston is committed to improving the quality and breadth of multilingual content on our website. Critical information regarding Boston’s response to the coronavirus emergency is already available in multiple languages and can be found here:

    "; - h+="

    Spanish: boston.gov/covid19-es

    "; - h+="

    Haitian Creole: boston.gov/covid19-hc

    "; - h+="

    Cape Verdean: boston.gov/covid19-cv

    "; - h+="

    Portuguese: boston.gov/covid19-pt

    "; - h+="

    French: boston.gov/covid19-fr

    "; - h+="

    Chinese: boston.gov/covid19-zh

    "; - h+="

    Vietnamese: boston.gov/covid19-vi

    "; - h+="

    Russian: boston.gov/covid19-ru

    "; - h+="

    Somali: boston.gov/covid19-so

    "; - h+="

    Arabic: boston.gov/covid19-ar

    "; + h+="

    The City of Boston is committed to improving the quality and breadth of multilingual content on our website.

    "; let j=' "; + j+="

    La Ciudad de Boston se compromete a mejorar la calidad y la amplitud del contenido multilingüe en nuestro sitio web.

    "; let e='"; + e+="

    波士顿市致力于提高我们网站上多语种内容的质量和广度。

    "; let f='"; + f+="

    Vil Boston pran angajman pou amelyore kalite ak lajè kontni pale plizyè lang sou sit entènèt nou an.

    "; let m='"; + m+="

    A cidade de Boston está comprometida em melhorar a qualidade e a abrangência do conteúdo multilíngue em nosso site.

    "; let n='"; + n+="

    La ville de Boston s'est engagée à améliorer la qualité et l'étendue du contenu multilingue sur notre site Web.

    "; let o='"; + o+="

    hành phố Boston cam kết cải thiện chất lượng và độ rộng của nội dung đa ngôn ngữ trên trang web của chúng tôi.

    "; let p='"; + p+="

    Город Бостон стремится улучшить качество и широту многоязычного контента на нашем веб-сайте.

    "; let q='"; + q+="

    agaalada Boston waxa ka go'an inay hagaajiso tayada iyo ballaadhka waxyaabaha ku qoran luqadaha badan luqadaha kala duwan.

    "; let r='"; + r+="

    زم مدينة بوسطن بتحسين جودة واتساع المحتوى متعدد اللغات على موقعنا.

    "; g+=h; g+=j; g+=e; @@ -347,7 +247,7 @@ let translate = function(d){ } j+=" "; j+=""; - j+='
    '+this.writeDisclaimer()+"
    "; + j+='
    '+this.writeDisclaimer()+"
    "; let e=jQuery("#overlay"); e.html(j) } diff --git a/docroot/modules/custom/bos_components/modules/bos_video/bos_video.module b/docroot/modules/custom/bos_components/modules/bos_video/bos_video.module index b66e38bdf6..ef47ad10c1 100644 --- a/docroot/modules/custom/bos_components/modules/bos_video/bos_video.module +++ b/docroot/modules/custom/bos_components/modules/bos_video/bos_video.module @@ -8,6 +8,7 @@ use Drupal\bos_core\BackgroundResponsiveImage; use Drupal\Component\Utility\Html; use Drupal\Core\Render\Element; +use Drupal\Core\Form\FormStateInterface; /** * Implements hook_theme(). @@ -109,3 +110,18 @@ function template_preprocess_paragraph__video(array &$variables) { } } + +/** + * Implements hook_form_alter(). + */ +function bos_video_form_alter(array &$form, FormStateInterface $form_state, $form_id) { + if (!empty($form["field_components"])) { + foreach (Drupal\Core\Render\Element::children($form["field_components"]["widget"]) as $item) { + if (is_numeric($item) && $form["field_components"]["widget"][$item]['#paragraph_type'] == 'video') { + $form["field_components"]["widget"][$item]["subform"]["field_is_channel"]['#access'] = \Drupal::currentUser() + ->hasRole('administrator'); + } + } + } +} + diff --git a/docroot/themes/custom/bos_theme/templates/snippets/secondary-nav.html.twig b/docroot/themes/custom/bos_theme/templates/snippets/secondary-nav.html.twig index da8ddbe66e..cc0c7912c2 100644 --- a/docroot/themes/custom/bos_theme/templates/snippets/secondary-nav.html.twig +++ b/docroot/themes/custom/bos_theme/templates/snippets/secondary-nav.html.twig @@ -32,7 +32,7 @@ Where: Secondary Menu. What: New Google Translate. Note: Dropdown of languages #} -
  • +
  • English Español @@ -41,8 +41,8 @@ français 简体中文 -
    -
    +
    +
  • {% if search %}