Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit e2d45072 authored by Francesco SARDARA's avatar Francesco SARDARA Committed by escuriola
Browse files

OEL-1653: Introduce daterange_compact instead of custom code.

parent d662e7f3
No related branches found
No related tags found
1 merge request!158OEL-1653: Show time in event dates
Showing
with 52 additions and 29 deletions
langcode: en
status: true
dependencies: { }
id: oe_whitelabel_date_only_short_month
label: 'Date only, short month'
default_pattern: 'd M Y'
default_separator: ' - '
same_day_start_pattern: 'd M Y'
same_day_end_pattern: ''
same_day_separator: ''
same_month_start_pattern: ''
same_month_end_pattern: ''
same_month_separator: ''
same_year_start_pattern: ''
same_year_end_pattern: ''
same_year_separator: ''
langcode: en
status: true
dependencies: { }
id: oe_whitelabel_date_time_long
label: 'Date and time, long names'
default_pattern: 'l d F Y, H.i (T)'
default_separator: ' - '
same_day_start_pattern: 'l d F Y, H.i'
same_day_end_pattern: 'H.i (T)'
same_day_separator: '-'
same_month_start_pattern: ''
same_month_end_pattern: ''
same_month_separator: ''
same_year_start_pattern: ''
same_year_end_pattern: ''
same_year_separator: ''
......@@ -7,6 +7,7 @@ core_version_requirement: ^9.2
dependencies:
- drupal:node
- drupal:twig_field_value
- drupal:daterange_compact
- oe_bootstrap_theme:oe_bootstrap_theme_helper
- openeuropa:oe_corporate_blocks
......@@ -15,3 +16,5 @@ dependencies:
config_devel:
install:
- core.entity_view_mode.node.oe_w_content_banner
- daterange_compact.format.oe_whitelabel_date_only_short_month
- daterange_compact.format.oe_whitelabel_date_time_long
......@@ -11,8 +11,8 @@ dependencies:
- field.field.node.oe_sc_event.oe_summary
- node.type.oe_sc_event
module:
- daterange_compact
- oe_whitelabel_helper
- oe_whitelabel_starter_event
- text
- user
id: node.oe_sc_event.full
......@@ -42,9 +42,10 @@ content:
weight: 3
region: content
oe_sc_event_dates:
type: event_date_range_format
type: daterange_compact
label: inline
settings: { }
settings:
daterange_compact_format: oe_whitelabel_date_time_long
third_party_settings: { }
weight: 1
region: content
......
......@@ -12,7 +12,7 @@ dependencies:
- node.type.oe_sc_event
module:
- address
- oe_whitelabel_starter_event
- daterange_compact
- text
- user
id: node.oe_sc_event.teaser
......@@ -21,11 +21,10 @@ bundle: oe_sc_event
mode: teaser
content:
oe_sc_event_dates:
type: event_date_range_format
type: daterange_compact
label: hidden
settings:
time_format: ''
datetime_format: 'd M Y'
daterange_compact_format: oe_whitelabel_date_only_short_month
third_party_settings: { }
weight: 4
region: content
......
langcode: en
status: true
dependencies: { }
id: oe_whitelabel_project_date
label: 'OE Whitelabel Project date'
locked: false
pattern: 'd M Y'
......@@ -11,8 +11,8 @@ dependencies:
- field.field.node.oe_sc_event.oe_summary
- node.type.oe_sc_event
module:
- daterange_compact
- oe_whitelabel_helper
- oe_whitelabel_starter_event
- text
- user
id: node.oe_sc_event.full
......@@ -42,9 +42,10 @@ content:
weight: 3
region: content
oe_sc_event_dates:
type: event_date_range_format
type: daterange_compact
label: inline
settings: { }
settings:
daterange_compact_format: oe_whitelabel_date_time_long
third_party_settings: { }
weight: 1
region: content
......
......@@ -12,7 +12,7 @@ dependencies:
- node.type.oe_sc_event
module:
- address
- oe_whitelabel_starter_event
- daterange_compact
- text
- user
id: node.oe_sc_event.teaser
......@@ -21,11 +21,10 @@ bundle: oe_sc_event
mode: teaser
content:
oe_sc_event_dates:
type: event_date_range_format
type: daterange_compact
label: hidden
settings:
time_format: ''
datetime_format: 'd M Y'
daterange_compact_format: oe_whitelabel_date_only_short_month
third_party_settings: { }
weight: 4
region: content
......
......@@ -28,12 +28,6 @@ function oe_whitelabel_starter_event_post_update_00002(): void {
$configs = [
'core.entity_view_display.node.oe_sc_event.full',
'core.entity_view_display.node.oe_sc_event.teaser',
'core.date_format.oe_whitelabel_project_date',
];
ConfigImporter::importMultiple(
'module',
'oe_whitelabel_starter_event',
'/config/post_updates/00002_event_date_show_time',
$configs,
);
ConfigImporter::importMultiple('module', 'oe_whitelabel_starter_event', '/config/post_updates/00002_event_date_show_time', $configs);
}
......@@ -152,7 +152,7 @@ class ContentEventRenderTest extends WhitelabelBrowserTestBase {
$crawler = $client->getCrawler();
$date = $crawler->filter('dl > dd');
$this->assertEquals('Tuesday 15 February 2022, 09.00 - Tuesday 22 February 2022, 19.00 (CET)', trim($date->text()));
$this->assertEquals('Tuesday 15 February 2022, 09.00 (CET) - Tuesday 22 February 2022, 19.00 (CET)', trim($date->text()));
// Assert in-page navigation title.
$this->assertEquals(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment