Skip to content

Commit

Permalink
Merge pull request #3616 from CityOfBoston/master
Browse files Browse the repository at this point in the history
(Production) Hide YouTube question, Tidy Translation popup, update metatags
  • Loading branch information
davidrkupton committed Sep 23, 2024
2 parents 6766276 + fa8b7d5 commit 93f090a
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 125 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion config/default/metatag.metatag_defaults.global.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]'
Expand Down
16 changes: 9 additions & 7 deletions config/default/metatag.metatag_defaults.node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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: {}
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -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().
Expand Down Expand Up @@ -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');
}
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
Where: Secondary Menu.
What: New Google Translate.
Note: Dropdown of languages #}
<li id="targetLanguage" class="nv-h-l-i translate">
<li id="targetLanguage" class="nv-h-l-i translate" data-nosnippet>
<a id="cob_translate" href="#translate" title="Translate" class="nv-h-l-a nv-h-l-a--k translate-link">
<span>English</span>
<span>Español</span>
Expand All @@ -41,8 +41,8 @@
<span>français</span>
<span>简体中文</span>
</a>
<div id="overlay" class="translate-overlay"></div>
<div id="overlay-background" class="translate-overlay-background"></div>
<div id="overlay" class="translate-overlay" data-nosnippet></div>
<div id="overlay-background" class="translate-overlay-background" data-nosnippet></div>
</li>
{% if search %}
<li class="nv-h-l-i">
Expand Down

0 comments on commit 93f090a

Please sign in to comment.