Skip to content

Commit

Permalink
TMS-1100: Show multiple locations for events if available
Browse files Browse the repository at this point in the history
  • Loading branch information
eebbi committed Feb 7, 2025
1 parent 02ab321 commit c7a27fe
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 24 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

- TMS-1100: Show multiple locations for events if available

## [1.3.12] - 2025-01-22

- TMS-1096: Center exhibition-archive item-count
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
{>"ui/icon" icon="date" class="icon--large is-primary mr-2 {item_classes.grid.icon|attr}" /}
</span>

{date|html}
<p class="mb-0 mt-0">{date|html}</p>
</div>

<div class="events__meta is-flex is-align-items-center">
<span class="is-flex" aria-label="{Strings.s.event.time|attr}">
{>"ui/icon" icon="time" class="icon--large is-primary mr-2 {item_classes.grid.icon|attr}" /}
</span>

{time|html}
<p class="mb-0 mt-0">{time|html}</p>
</div>

{?location.name}
Expand All @@ -47,7 +47,12 @@
{>"ui/icon" icon=location_icon class="icon--large is-primary mr-2 {item_classes.grid.icon|attr}" /}
</span>

{location.name|html}
<p class="mb-0 mt-0">
{location.name|html}
{?location_count.other_locations_string}
{location_count.other_locations_string|html}
{/location_count.other_locations_string}
</p>
</div>
{/location.name}

Expand All @@ -58,7 +63,7 @@
{>"ui/icon" icon="euro" class="icon--large is-primary mr-2 {item_classes.grid.icon|attr}" /}
</span>

{price|html}
<p class="mb-0 mt-0">{price|html}</p>
</div>
{/is_free}
{/price}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@
{>"ui/icon" icon="date" class="icon--large is-primary mr-2 {item_classes.list.icon|attr}" /}
</span>

{date|html}
<p class="mb-0 mt-0">{date|html}</p>
</div>

<div class="is-flex is-align-items-center mt-2 mb-2 mr-4 {item_classes.list.meta_label|attr}">
<span class="is-flex" aria-label="{Strings.s.event.time|attr}">
{>"ui/icon" icon="time" class="icon--large is-primary mr-2 {item_classes.list.icon|attr}" /}
</span>

{time|html}
<p class="mb-0 mt-0">{time|html}</p>
</div>

{?location.name}
Expand All @@ -50,7 +50,12 @@
{>"ui/icon" icon=location_icon class="icon--large is-primary mr-2 {item_classes.list.icon|attr}" /}
</span>

{location.name|html}
<p class="mb-0 mt-0">
{location.name|html}
{?location_count.other_locations_string}
{location_count.other_locations_string|html}
{/location_count.other_locations_string}
</p>
</div>
{/location.name}
</div>
Expand Down
48 changes: 31 additions & 17 deletions partials/views/single-dynamic-event/single-dynamic-event-info.dust
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
<div class="info-group__description has-text-small has-text-small pt-1 pr-8 pb-4 pl-9">
{?event.normalized.dates}
{#event.normalized.dates}
<div>
<p class="mt-0 mb-0">
{date|html}
</div>
</p>
{/event.normalized.dates}
{/event.normalized.dates}

{?event.normalized.entries}
{#event.normalized.entries}
<div>
<p class="mt-0 mb-0">
{date|attr}
</div>
</p>
{/event.normalized.entries}
{/event.normalized.entries}
</div>
Expand All @@ -28,7 +28,7 @@
{>"views/single-dynamic-event/single-dynamic-event-group-title" title=event.normalized.date_title template_classes=template_classes.info_group_title icon="date" /}

<div class="info-group__description has-text-small has-text-small pt-1 pr-8 pb-4 pl-9">
{event.normalized.date|html}
<p class="mt-0 mb-0">{event.normalized.date|html}</p>
</div>
</div>
{/event.normalized.date}
Expand All @@ -37,37 +37,51 @@
{>"views/single-dynamic-event/single-dynamic-event-group-title" title=event.normalized.time_title template_classes=template_classes.info_group_title icon="time" /}

<div class="info-group__description has-text-small has-text-small pt-1 pr-8 pb-4 pl-9">
{event.normalized.time|html}
<p class="mt-0 mb-0">{event.normalized.time|html}</p>
</div>
</div>
{/event.normalized.time}
{/event.normalized.recurring}

{?event.normalized.location}
{^event.normalized.multiple_locations}
{?event.normalized.location}
<div class="info-group mb-5 has-border-gray has-border-1 {template_classes.info_group|attr}">
{>"views/single-dynamic-event/single-dynamic-event-group-title" title=event.normalized.location_title template_classes=template_classes.info_group_title icon="location" /}

<div class="info-group__description has-text-small has-text-small pt-1 pr-8 pb-4 pl-9">
<p class="mb-0 mt-0">{event.normalized.location.name|html}</p>
<p class="mb-0 mt-0">{event.normalized.location.description|html}</p>
<p class="mb-0 mt-0">{event.normalized.location.extra_info|html}</p>
{>"ui/link" link=event.normalized.location.info_url classes="is-inline-block mt-2" /}
</div>
</div>
{/event.normalized.location}
{/event.normalized.multiple_locations}

{?event.normalized.multiple_locations}
<div class="info-group mb-5 has-border-gray has-border-1 {template_classes.info_group|attr}">
{>"views/single-dynamic-event/single-dynamic-event-group-title" title=event.normalized.location_title template_classes=template_classes.info_group_title icon="location" /}

<div class="info-group__description has-text-small has-text-small pt-1 pr-8 pb-4 pl-9">
<div>{event.normalized.location.name|html}</div>
<div>{event.normalized.location.description|html}</div>
<div>{event.normalized.location.extra_info|html}</div>
{>"ui/link" link=event.normalized.location.info_url classes="is-inline-block mt-2" /}
{#event.normalized.multiple_locations}
<p class="mb-2 mt-0">{name|html}</p>
{/event.normalized.multiple_locations}
</div>
</div>
{/event.normalized.location}
{/event.normalized.multiple_locations}

{?event.normalized.price}
<div class="info-group mb-5 has-border-gray has-border-1 {template_classes.info_group|attr}">
{>"views/single-dynamic-event/single-dynamic-event-group-title" title=event.normalized.price_title template_classes=template_classes.info_group_title icon="euro" /}

<div class="info-group__description has-text-small has-text-small pt-1 pr-8 pb-4 pl-9">
{#event.normalized.price}
<div>
<p class="mt-0 mb-0">
{price|html}
</div>
<div>
</p>
<p class="mt-0 mb-0">
{description|kses}
</div>
</p>
{>"ui/link" link=info_url /}
{/event.normalized.price}
</div>
Expand All @@ -89,7 +103,7 @@
{>"views/single-dynamic-event/single-dynamic-event-group-title" title=event.normalized.provider_title template_classes=template_classes.info_group_title icon="bullhorn" /}

<div class="info-group__description has-text-small has-text-small pt-1 pr-8 pb-4 pl-9">
<div>{event.normalized.provider.name|html}</div>
<p class="mt-0 mb-0">{event.normalized.provider.name|html}</p>

{?event.normalized.provider.email}
<div>
Expand Down

0 comments on commit c7a27fe

Please sign in to comment.