Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update epic news #956

Merged
merged 75 commits into from
Sep 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
30479fa
EWPP-876: Theme the link and new variants on text with featued media …
yenyasinn Jun 15, 2021
dec6f4d
EWPP-876: Ensure that variant without media is recognised properly.
yenyasinn Jun 25, 2021
0a27a2e
EWPP-876: Add README entry.
ademarco Jul 7, 2021
bdaf9fe
Merge pull request #839 from openeuropa/EWPP-876
imanoleguskiza Jul 8, 2021
243e170
EWPP-1327: Theme text with featured media title.
yenyasinn Jul 12, 2021
e456e7d
EWPP-1327: Rename field_oe_text_title to field_oe_feature_media_title.
yenyasinn Jul 15, 2021
ad99ac7
EWPP-1327: Update default view display for Text with featured media p…
yenyasinn Jul 15, 2021
d42470e
Merge pull request #878 from openeuropa/EWPP-1327
imanoleguskiza Jul 22, 2021
fc1d8fc
Merge remote-tracking branch 'origin/3.x' into update-EPIC-EWPP-873-T…
sergepavle Jul 27, 2021
1096133
EWPP-873: Adapt tests and fix some classes for text featured media pa…
sergepavle Jul 28, 2021
dd7ca8e
Merge pull request #895 from openeuropa/update-EPIC-EWPP-873-Text-med…
sergepavle Jul 28, 2021
f2d0ede
EWPP-1318: Finalize porting of 'text featured media' pattern to ECL3.
sergepavle Jul 28, 2021
c6c94b6
EWPP-1318: Adjust changes for text_featured_media pattern according t…
sergepavle Jul 30, 2021
e02cca9
Merge pull request #898 from openeuropa/EWPP-1318
imanoleguskiza Aug 2, 2021
b1a4041
EWPP-873: Merge 3.x into Text with featured media v2.
yenyasinn Aug 4, 2021
5e807ce
EWPP-873: Use oe_paragraphs from the epic.
yenyasinn Aug 4, 2021
c25b07e
Merge pull request #908 from openeuropa/update-EPIC-EWPP-873-Text-med…
yenyasinn Aug 4, 2021
7e6b363
EWPP-1209: Ensure that Link field exist.
yenyasinn Aug 10, 2021
6f3bafe
EWPP-1046: Change label from "Open gallery" to "See all" in the galle…
yenyasinn Jul 15, 2021
607ba32
Merge pull request #914 from openeuropa/EWPP-1209
yenyasinn Sep 7, 2021
26e911e
EWPP-873: Merge 3.x into EWPP-873 epic branch.
yenyasinn Sep 7, 2021
e197e44
EWPP-873: Fix test after merging.
yenyasinn Sep 7, 2021
80f3f7b
Merge pull request #938 from openeuropa/update-EPIC-EWPP-873-Text-med…
yenyasinn Sep 7, 2021
62ede67
Merge pull request #881 from openeuropa/EWPP-1046
upchuk Sep 7, 2021
9731262
EWPP-1206: Fix UI issue by amending class in content-item-block compo…
sergepavle Jul 15, 2021
55f8cf4
EWPP-1206: Amend kernel tests for updated classes.
sergepavle Jul 16, 2021
55c6e69
EWPP-1206: Fix issues related to D9 related changes in oe_content com…
sergepavle Sep 7, 2021
e3f6e28
Merge pull request #882 from openeuropa/EWPP-1206
upchuk Sep 7, 2021
46a0ccb
EWPP-1470: Content item title styling is not consistent.
yenyasinn Aug 31, 2021
64bc094
Merge pull request #934 from openeuropa/EWPP-1470
upchuk Sep 8, 2021
ec9fdee
EWPP-873: Add cache info from the Link field to the page.
yenyasinn Sep 8, 2021
3281e54
EWPP-873: Update oe_content hook_install() functions.
yenyasinn Sep 8, 2021
7f4268b
EWPP-0000: Version 2.0 of typed_link is required by oe_paragraphs.
brummbar Sep 8, 2021
a166602
EWPP-0000: Install hooks have a parameter now.
brummbar Sep 8, 2021
20dbf2e
Merge pull request #941 from openeuropa/update-typed-link
brummbar Sep 8, 2021
b63a0c0
Merge branch '3.x' into EWPP-873-3.x-align
ademarco Sep 9, 2021
3cacccd
Merge pull request #944 from openeuropa/EWPP-873-3.x-align
ademarco Sep 9, 2021
57c2dc4
Merge branch 'EPIC-EWPP-873-Text-media-2' into EWPP-873
ademarco Sep 9, 2021
d0611a9
Merge pull request #940 from openeuropa/EWPP-873
ademarco Sep 10, 2021
72dfb6e
EWPP-866: Use extend in list-item templates.
nagyad Jul 30, 2021
d2743c7
Merge pull request #817 from openeuropa/EWPP-866
upchuk Sep 17, 2021
e0c9143
EWPP-873: Merge 3.x into epic.
yenyasinn Sep 17, 2021
599277b
Merge pull request #949 from openeuropa/update-EPIC-EWPP-873-Text-med…
upchuk Sep 17, 2021
83f5499
EWPP-873: Use latest oe_paragraphs.
yenyasinn Sep 17, 2021
dfb30ed
Merge pull request #951 from openeuropa/update-EPIC-EWPP-873-Text-med…
upchuk Sep 17, 2021
0877a95
Merge pull request #939 from openeuropa/EPIC-EWPP-873-Text-media-2
upchuk Sep 17, 2021
aff22b7
EWPP-1458: Test that events render correctly when a non-existing even…
brummbar Sep 8, 2021
15c6b60
EWPP-1458: Check that the event type entity exists.
brummbar Sep 8, 2021
5f8ce39
Merge pull request #943 from openeuropa/EWPP-1458
upchuk Sep 20, 2021
da69cbf
EWPP-1514: Wrong Irish translation in language switcher.
yenyasinn Sep 16, 2021
ddbef8c
EWPP-1514: Event node title isn't translatable anymore by default in …
yenyasinn Sep 21, 2021
01254a5
Merge pull request #947 from openeuropa/EWPP-1514
upchuk Sep 21, 2021
89f3a8e
EWPP-1495: Make sure that event registration button is displayed as a…
ademarco Sep 17, 2021
6ffad81
Merge pull request #950 from openeuropa/EWPP-1495
upchuk Sep 21, 2021
4e69b23
EWPP-1312: Translate "I have read and agree with the data protection …
yenyasinn Aug 30, 2021
954d0c7
EWPP-1312: Remove comma after link in HU translation.
yenyasinn Sep 15, 2021
f82a354
Merge pull request #932 from openeuropa/EWPP-1312
upchuk Sep 22, 2021
645600d
EWPP-847: Add optional oe_theme_main_content view display for JS asse…
nagyad Jul 1, 2021
63a60af
Merge pull request #896 from openeuropa/EWPP-847
upchuk Sep 22, 2021
e2b8e80
EWPP-1162: Update event rendering test.
22Alexandra Jun 28, 2021
9aafc0e
Merge pull request #866 from openeuropa/EWPP-1162
upchuk Sep 23, 2021
66eaeb2
EWPP-1467: Fix font name issue.
sergepavle Sep 13, 2021
e5ee058
Merge pull request #946 from openeuropa/EWPP-1467
upchuk Sep 23, 2021
80136aa
EWPP-1472: Fix output of image (avportal) inside news content type.
yenyasinn Sep 8, 2021
fa3195b
Merge pull request #942 from openeuropa/EWPP-1472
upchuk Sep 23, 2021
54f32df
Prepare changelog for version 3.0.0-beta3.
yenyasinn Sep 23, 2021
fac43cf
Merge pull request #954 from openeuropa/release-3.0.0-beta3
yenyasinn Sep 23, 2021
8c8bcba
EWPP-1486: Theme publication collection related fields.
nagyad Sep 8, 2021
dbebaeb
EWPP-1486: Add access check when rendering collections as links.
nagyad Sep 10, 2021
de25389
EWPP-1486: Simplify udpate path and render array.
nagyad Sep 13, 2021
07d4375
EWPP-1486: Ensure translated label is shown.
nagyad Sep 17, 2021
19c5a42
EWPP-1486: Make node title translatable for the test.
yenyasinn Sep 24, 2021
727a93b
Merge pull request #945 from openeuropa/EWPP-1486
upchuk Sep 24, 2021
d42f83c
EWPP-0000: Merge branch '3.x' into update-EPIC-News.
22Alexandra Sep 24, 2021
ec7c416
EWPP-0000: Update oe_content version.
22Alexandra Sep 24, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Change Log

## [3.0.0-beta3](https://github.com/openeuropa/oe_theme/tree/3.0.0-beta3) (2021-09-23)
[Full Changelog](https://github.com/openeuropa/oe_theme/compare/3.0.0-beta2...3.0.0-beta3)

**Merged pull requests:**

- EWPP-1495: Make sure that event registration button is displayed as an inline block. [\#950](https://github.com/openeuropa/oe_theme/pull/950) ([ademarco](https://github.com/ademarco))
- EWPP-1514: Wrong Irish translation in language switcher. [\#947](https://github.com/openeuropa/oe_theme/pull/947) ([yenyasinn](https://github.com/yenyasinn))
- EWPP-1467: Fix font name issue. [\#946](https://github.com/openeuropa/oe_theme/pull/946) ([sergepavle](https://github.com/sergepavle))
- EWPP-1458: Events render correctly when a non-existing event type is specified. [\#943](https://github.com/openeuropa/oe_theme/pull/943) ([brummbar](https://github.com/brummbar))
- EWPP-1472: Fix output of image \(avportal\) inside news content type. [\#942](https://github.com/openeuropa/oe_theme/pull/942) ([yenyasinn](https://github.com/yenyasinn))
- EWPP-0000: Version 2.0 of typed\_link is required by oe\_paragraphs. [\#941](https://github.com/openeuropa/oe_theme/pull/941) ([brummbar](https://github.com/brummbar))
- EWPP-873: Text with featured media paragraph type V2 [\#939](https://github.com/openeuropa/oe_theme/pull/939) ([yenyasinn](https://github.com/yenyasinn))
- EWPP-1470: Content item title styling is not consistent. [\#934](https://github.com/openeuropa/oe_theme/pull/934) ([yenyasinn](https://github.com/yenyasinn))
- EWPP-1312: Translate "I have read and agree with the data protection terms" string [\#932](https://github.com/openeuropa/oe_theme/pull/932) ([yenyasinn](https://github.com/yenyasinn))
- EWPP-847: Add optional oe\_theme\_main\_content view display for JS asset media [\#896](https://github.com/openeuropa/oe_theme/pull/896) ([brummbar](https://github.com/brummbar))
- EWPP-1206: Update grid classes for list item block pattern. [\#882](https://github.com/openeuropa/oe_theme/pull/882) ([sergepavle](https://github.com/sergepavle))
- EWPP-1046: Change label from "Open gallery" to "See all" in the gallery [\#881](https://github.com/openeuropa/oe_theme/pull/881) ([yenyasinn](https://github.com/yenyasinn))
- EWPP-1162: Update event rendering test. [\#866](https://github.com/openeuropa/oe_theme/pull/866) ([22Alexandra](https://github.com/22Alexandra))
- EWPP-866: Use extend in list-item templates. [\#817](https://github.com/openeuropa/oe_theme/pull/817) ([nagyad](https://github.com/nagyad))

## [3.0.0-beta2](https://github.com/openeuropa/oe_theme/tree/3.0.0-beta2) (2021-08-25)
[Full Changelog](https://github.com/openeuropa/oe_theme/compare/3.0.0-beta1...3.0.0-beta2)

Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,18 @@ templates/compositions/ec-component-content-item/content-item.html.twig

Consider using the [List item](/templates/patterns/list_item/list_item.ui_patterns.yml) pattern and its variants instead.

#### Text with Featured media pattern

The pattern [Text with Featured media](/templates/patterns/text_featured_media/text_featured_media.ui_patterns.yml) now
supports the following 4 variants:

- Left simple / `left_simple`: text on the left, simple call to action. This is the default behaviour.
- Right simple / `right_simple`: text on the right, simple call to action.
- Left featured / `left_featured`: text on the left, featured call to action.
- Right featured / `right_featured`: text on the right, featured call to action.

If no variant is set, then the pattern will be visualized using the default one. This guarantees backward compatibility.

#### Site header

ECL v3 supports the horizontal menu in both Core and Standardised branding. In order to accommodate this, we removed the
Expand Down
2 changes: 1 addition & 1 deletion behat.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,6 @@ default:
project funding header: "#project-funding .ecl-u-type-heading-2"
FriendsOfBehat\ServiceContainerExtension:
imports:
- 'build/modules/contrib/oe_content/tests/Behat/config/services.yml'
- 'build/modules/contrib/oe_content/tests/src/Behat/config/services.yml'
formatters:
progress: ~
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"drupal/json_field": "^1.0.0-rc2",
"drupal/renderviz": "^1.0@alpha",
"drupal/styleguide": "~1.0-alpha3",
"drupal/typed_link": "~1.1",
"drupal/typed_link": "^2.0",
"drush/drush": "~9.0",
"easyrdf/easyrdf": "1.0.0 as 0.9.1",
"friends-of-behat/service-container-extension": "^1.0",
Expand All @@ -47,15 +47,15 @@
"openeuropa/behat-transformation-context": "~0.1",
"openeuropa/code-review": "~1.5",
"openeuropa/drupal-core-require-dev": "^8.9.14",
"openeuropa/oe_content": "dev-EPIC-EWPP-1360-News-v3",
"openeuropa/oe_content": "2.x-dev",
"openeuropa/oe_corporate_blocks": "~4.0",
"openeuropa/oe_corporate_countries": "~2.0",
"openeuropa/oe_media": "~1.12",
"openeuropa/oe_multilingual": "~1.8",
"openeuropa/oe_paragraphs": "dev-master",
"openeuropa/oe_search": "~1.0",
"openeuropa/oe_webtools": "~1.10",
"openeuropa/oe_contact_forms": "~1.0",
"openeuropa/oe_contact_forms": "dev-master",
"openeuropa/rdf_skos": "~1.0",
"openeuropa/task-runner-drupal-project-symlink": "^1.0",
"phpunit/phpunit": "~6.0",
Expand All @@ -81,7 +81,7 @@
"autoload-dev": {
"psr-4": {
"Drupal\\Tests\\oe_theme\\": "./tests/",
"Drupal\\Tests\\oe_content\\": "./build/modules/contrib/oe_content/tests/",
"Drupal\\Tests\\oe_content\\": "./build/modules/contrib/oe_content/tests/src/",
"Drupal\\Tests\\oe_media\\": "./build/modules/contrib/oe_media/tests/src/"
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependencies:
- media.type.av_portal_photo
- responsive_image.styles.oe_theme_main_content
module:
- media_avportal
- oe_media_avportal
id: media.av_portal_photo.oe_theme_main_content
targetEntityType: media
bundle: av_portal_photo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dependencies:
- field.field.media.av_portal_video.oe_media_avportal_video
- media.type.av_portal_video
module:
- media_avportal
- oe_media_avportal
id: media.av_portal_video.oe_theme_main_content
targetEntityType: media
bundle: av_portal_video
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dependencies:
- field.field.media.document.oe_media_file
- media.type.document
module:
- file
- oe_media
id: media.document.oe_theme_main_content
targetEntityType: media
bundle: document
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ dependencies:
- media.type.image
- responsive_image.styles.oe_theme_main_content
module:
- oe_media
- responsive_image
id: media.image.oe_theme_main_content
targetEntityType: media
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
langcode: en
status: true
dependencies:
config:
- core.entity_view_mode.media.oe_theme_main_content
- field.field.media.javascript_asset.oe_media_js_asset_url
- media.type.javascript_asset
module:
- oe_media_embed
- oe_media_js_asset
third_party_settings:
oe_media_embed:
embeddable: true
id: media.javascript_asset.oe_theme_main_content
targetEntityType: media
bundle: javascript_asset
mode: oe_theme_main_content
content:
oe_media_js_asset_url:
type: oe_media_js_asset_url
weight: 0
region: content
label: hidden
settings: { }
third_party_settings: { }
hidden:
created: true
ewcms_available_translations: true
langcode: true
name: true
search_api_excerpt: true
thumbnail: true
uid: true
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dependencies:
- field.field.media.remote_video.oe_media_oembed_video
- media.type.remote_video
module:
- media
- oe_media
id: media.remote_video.oe_theme_main_content
targetEntityType: media
bundle: remote_video
Expand Down
9 changes: 7 additions & 2 deletions modules/oe_theme_contact_forms/oe_theme_contact_forms.module
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,16 @@ function oe_theme_contact_forms_form_contact_message_form_alter(&$form, FormStat

// Add ecl link classes to the privacy link.
$privacy_policy = $contact_form->getThirdPartySetting('oe_contact_forms', 'privacy_policy');
$privacy_link = Link::fromTextAndUrl('data protection terms', Url::fromUri($privacy_policy, [
$privacy_link = Link::fromTextAndUrl(t('data protection terms'), Url::fromUri($privacy_policy, [
'absolute' => TRUE,
'attributes' => [
'target' => '_blank',
'class' => ['ecl-u-ml-2xs', 'ecl-link', 'ecl-link--default'],
'class' => [
'ecl-u-ml-2xs',
'ecl-u-mr-2xs',
'ecl-link',
'ecl-link--default',
],
],
]));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Drupal\oe_theme_content_event\Plugin\ExtraField\Display;

use Drupal\Core\Cache\CacheableMetadata;
use Drupal\Core\Entity\ContentEntityInterface;
use Drupal\Core\Entity\EntityRepositoryInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
Expand Down Expand Up @@ -79,8 +80,12 @@ public function viewElements(ContentEntityInterface $entity) {
// Add the event type.
/** @var \Drupal\rdf_skos\Entity\ConceptInterface $type */
$type = $entity->get('oe_event_type')->entity;
$type = $this->entityRepository->getTranslationFromContext($type);
$elements[] = ['#markup' => $type->label()];
if ($type) {
$type = $this->entityRepository->getTranslationFromContext($type);
$elements[] = ['#markup' => $type->label()];
CacheableMetadata::createFromObject($type)
->applyTo($elements);
}

// Add the event status, only if it doesn't go as planned.
$status = $entity->get('oe_event_status')->value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Drupal\oe_theme_content_event\Plugin\PageHeaderMetadata;

use Drupal\Core\Cache\CacheableMetadata;
use Drupal\Core\Entity\EntityRepositoryInterface;
use Drupal\oe_theme_helper\Plugin\PageHeaderMetadata\NodeViewRoutesBase;
use Symfony\Component\DependencyInjection\ContainerInterface;
Expand Down Expand Up @@ -76,10 +77,18 @@ public function getMetadata(): array {
$metadata = parent::getMetadata();

$node = $this->getNode();
$translated_value = $this->entityRepository->getTranslationFromContext($node->get('oe_event_type')->entity);
$type = $node->get('oe_event_type')->entity;
if (!$type) {
return $metadata;
}

$translated_value = $this->entityRepository->getTranslationFromContext($type);
$metadata['metas'] = [
$translated_value->label(),
];
CacheableMetadata::createFromRenderArray($metadata)
->addCacheableDependency($translated_value)
->applyTo($metadata);

return $metadata;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div id="event-registration-block">
{% if show_button %}
{% if enabled %}
<a href="{{ url }}" class="ecl-u-mt-2xl ecl-link ecl-link--cta">{{ label }}</a>
<a href="{{ url }}" class="ecl-u-mt-2xl ecl-link ecl-link--cta ecl-u-d-inline-block">{{ label }}</a>
{% else %}
<button type="submit" class="ecl-button ecl-button--call ecl-u-mt-2xl ecl-link ecl-link--cta" disabled="">{{ label }}</button>
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ dependencies:
- field.field.node.oe_publication.oe_author
- field.field.node.oe_publication.oe_departments
- field.field.node.oe_publication.oe_documents
- field.field.node.oe_publication.oe_publication_collection
- field.field.node.oe_publication.oe_publication_contacts
- field.field.node.oe_publication.oe_publication_countries
- field.field.node.oe_publication.oe_publication_date
- field.field.node.oe_publication.oe_publication_last_updated
- field.field.node.oe_publication.oe_publication_publications
- field.field.node.oe_publication.oe_publication_thumbnail
- field.field.node.oe_publication.oe_publication_type
- field.field.node.oe_publication.oe_reference_codes
Expand All @@ -32,7 +34,7 @@ third_party_settings:
- group_item_files
- group_item_contacts
parent_name: ''
weight: 0
weight: 1
format_type: oe_theme_helper_in_page_navigation
region: content
format_settings:
Expand Down Expand Up @@ -64,6 +66,7 @@ third_party_settings:
group_item_files:
children:
- oe_documents
- oe_publication_publications
parent_name: group_in_page_navigation
weight: 24
format_type: oe_theme_helper_in_page_navigation_item
Expand All @@ -86,6 +89,7 @@ third_party_settings:
group_details:
children:
- oe_reference_codes
- extra_field_oe_theme_content_publication_collection
- extra_field_oe_theme_content_publication_date
- oe_departments
- oe_publication_countries
Expand All @@ -103,19 +107,24 @@ targetEntityType: node
bundle: oe_publication
mode: full
content:
extra_field_oe_theme_content_publication_date:
extra_field_oe_theme_content_publication_collection:
weight: 1
region: content
settings: { }
third_party_settings: { }
extra_field_oe_theme_content_publication_date:
weight: 2
region: content
settings: { }
third_party_settings: { }
extra_field_oe_theme_content_publication_description:
weight: 0
region: content
settings: { }
third_party_settings: { }
oe_departments:
type: skos_concept_entity_reference_label
weight: 2
weight: 3
region: content
label: above
settings:
Expand All @@ -141,12 +150,21 @@ content:
third_party_settings: { }
oe_publication_countries:
type: skos_concept_entity_reference_label
weight: 3
weight: 4
region: content
label: above
settings:
link: false
third_party_settings: { }
oe_publication_publications:
type: entity_reference_entity_view
weight: 2
region: content
label: hidden
settings:
view_mode: teaser
link: false
third_party_settings: { }
oe_reference_codes:
type: string
weight: 0
Expand All @@ -165,6 +183,7 @@ hidden:
oe_content_legacy_link: true
oe_content_navigation_title: true
oe_content_short_title: true
oe_publication_collection: true
oe_publication_date: true
oe_publication_last_updated: true
oe_publication_thumbnail: true
Expand Down
Loading