From a62ffdb7f11af88803609806379c1a849a316d3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20V=C3=A4nttinen?= Date: Mon, 16 Sep 2024 12:26:52 +0300 Subject: [PATCH] TMS-1067: Show price-info for event in listing if it's free --- CHANGELOG.MD | 2 + partials/ui/event-highlight.dust | 48 ++++++++++++------- .../page-events-calendar-item-grid.dust | 12 +++++ .../page-events-calendar-item-list.dust | 46 +++++++++--------- 4 files changed, 67 insertions(+), 41 deletions(-) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 6bd62c9..cbeff3f 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +- TMS-1067: Show price-info for event in listing if it's free + ## [1.3.1] - 2024-08-21 - TMS-1057: Increase articles lead-text font-size diff --git a/partials/ui/event-highlight.dust b/partials/ui/event-highlight.dust index cbca897..d0f1b0c 100644 --- a/partials/ui/event-highlight.dust +++ b/partials/ui/event-highlight.dust @@ -1,51 +1,63 @@
-
+
{?image} {/image}

- - {name|s} + + {name|html}

{>"ui/event-item-pill" /} -
- - {>"ui/icon" icon="date" class="icon--large is-primary mr-4 {classes.event_item_icon}" /} +
+ + {>"ui/icon" icon="date" class="icon--large is-primary mr-4 {classes.event_item_icon|attr}" /} - {date|s} + {date|html}
-
- - {>"ui/icon" icon="time" class="icon--large is-primary mr-4 {classes.event_item_icon}" /} +
+ + {>"ui/icon" icon="time" class="icon--large is-primary mr-4 {classes.event_item_icon|attr}" /} - {time|s} + {time|html}
{?location.name} -
- - {>"ui/icon" icon="location" class="icon--large is-primary mr-4 {classes.event_item_icon}" /} +
+ + {>"ui/icon" icon="location" class="icon--large is-primary mr-4 {classes.event_item_icon|attr}" /} - {location.name|s} + {location.name|html}
{/location.name} + {#price} + {?is_free} +
+ + {>"ui/icon" icon="euro" class="icon--large is-primary mr-4 {classes.event_item_icon|attr}" /} + + + {price|html} +
+ {/is_free} + {/price} + {?url} - {Strings.s.common.read_more|s} + {Strings.s.common.read_more|html} {/url}
diff --git a/partials/views/page-events-calendar/page-events-calendar-item-grid.dust b/partials/views/page-events-calendar/page-events-calendar-item-grid.dust index 2b09a53..3ad0827 100644 --- a/partials/views/page-events-calendar/page-events-calendar-item-grid.dust +++ b/partials/views/page-events-calendar/page-events-calendar-item-grid.dust @@ -50,5 +50,17 @@ {location.name|html}
{/location.name} + + {#price} + {?is_free} +
+ + {>"ui/icon" icon="euro" class="icon--large is-primary mr-4 {item_classes.grid.icon|attr}" /} + + + {price|html} +
+ {/is_free} + {/price}
diff --git a/partials/views/page-events-calendar/page-events-calendar-item-list.dust b/partials/views/page-events-calendar/page-events-calendar-item-list.dust index 421d53a..7595f3d 100644 --- a/partials/views/page-events-calendar/page-events-calendar-item-list.dust +++ b/partials/views/page-events-calendar/page-events-calendar-item-list.dust @@ -1,19 +1,19 @@ -
+
{?image}
- {?primary_keyword} - {primary_keyword|s} + {primary_keyword|html} {/primary_keyword}
@@ -22,45 +22,45 @@

- - {name|s} + + {name|html}

-
- - {>"ui/icon" icon="date" class="icon--large is-primary mr-2 {item_classes.list.icon|s}" /} +
+ + {>"ui/icon" icon="date" class="icon--large is-primary mr-2 {item_classes.list.icon|attr}" /} - {date|s} + {date|html}
-
- - {>"ui/icon" icon="time" class="icon--large is-primary mr-2 {item_classes.list.icon|s}" /} +
+ + {>"ui/icon" icon="time" class="icon--large is-primary mr-2 {item_classes.list.icon|attr}" /} - {time|s} + {time|html}
{?location.name} -
- - {>"ui/icon" icon=location_icon class="icon--large is-primary mr-2 {item_classes.list.icon|s}" /} +
+ + {>"ui/icon" icon=location_icon class="icon--large is-primary mr-2 {item_classes.list.icon|attr}" /} - {location.name|s} + {location.name|html}
{/location.name}
-

- {short_description|s} +

+ {short_description|kses}

- - {Strings.s.common.read_more|s} + + {Strings.s.common.read_more|html}