Skip to content

Commit

Permalink
Add additional variable to correctly check for empty event end date /…
Browse files Browse the repository at this point in the history
… time
  • Loading branch information
occupant committed Oct 3, 2022
1 parent 33c0cbe commit ab70951
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions kraken.theme
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,7 @@ function kraken_preprocess_node(&$variables)
$variables['endday'] = $endday;
$variables['starttime'] = $starttime;
$variables['endtime'] = $endtime;
$variables['end_date_value'] = $end_date_value;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
{% set eventdate = startday ~ ', ' ~ endyear %}
{% set time = ', ' ~ starttime ~ ' to ' ~ endtime %}
{% endif %}
{% if endvalue is not defined or endvalue is null %}
{% if end_date_value is not defined or end_date_value is null %}
{% set eventdate = startday ~ ', ' ~ startyear %}
{% set time = ', ' ~ starttime %}
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion templates/content/node--ubc-event--card-image.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
{% set eventdate = startday ~ ', ' ~ endyear %}
{% set time = ', ' ~ starttime ~ ' to ' ~ endtime %}
{% endif %}
{% if endvalue is not defined or endvalue is null %}
{% if end_date_value is not defined or end_date_value is null %}
{% set eventdate = startday ~ ', ' ~ startyear %}
{% set time = ', ' ~ starttime %}
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion templates/content/node--ubc-event--card-vertical.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
{% set eventdate = startday ~ ', ' ~ endyear %}
{% set time = ', ' ~ starttime ~ ' to ' ~ endtime %}
{% endif %}
{% if endvalue is not defined or endvalue is null %}
{% if end_date_value is not defined or end_date_value is null %}
{% set eventdate = startday ~ ', ' ~ startyear %}
{% set time = ', ' ~ starttime %}
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion templates/content/node--ubc-event--full.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
{% set eventdate = startday ~ ', ' ~ endyear %}
{% set time = ', ' ~ starttime ~ ' to ' ~ endtime %}
{% endif %}
{% if endvalue is not defined or endvalue is null %}
{% if end_date_value is not defined or end_date_value is null %}
{% set eventdate = startday ~ ', ' ~ startyear %}
{% set time = ', ' ~ starttime %}
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion templates/content/node--ubc-event--teaser.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
{% set eventdate = startday ~ ', ' ~ endyear %}
{% set time = ', ' ~ starttime ~ ' to ' ~ endtime %}
{% endif %}
{% if endvalue is not defined or endvalue is null %}
{% if end_date_value is not defined or end_date_value is null %}
{% set eventdate = startday ~ ', ' ~ startyear %}
{% set time = ', ' ~ starttime %}
{% endif %}
Expand Down

0 comments on commit ab70951

Please sign in to comment.