Remove time output if its set to 0:00 oclock

This commit is contained in:
Dirk Koritnik 2022-08-13 09:43:16 +02:00
parent 9814e8dac9
commit c9b1904d58
3 changed files with 22 additions and 4 deletions

View file

@ -18,7 +18,15 @@
</div>
<div class="caption">
<div class="caption-text mt-3">
{date.event.region.title} | <f:format.date format="d. m. Y - H:i">{date.start}</f:format.date>
{date.event.region.title} |
<f:if condition="{f:format.date(format: 'H:i', date: '{date.start}')} == '00:00'">
<f:then>
<f:format.date format="d. m. Y">{date.start}</f:format.date>
</f:then>
<f:else>
<f:format.date format="d. m. Y - H:i">{date.start}</f:format.date>
</f:else>
</f:if>
<h4>{date.event.title}</h4>
<p>{date.event.teaser}</p>
</div>

View file

@ -6,7 +6,9 @@
<f:for each="{pagination.paginator.paginatedItems}" as="date" iteration="index">
<div class="row mt-3 mb-3 pb-3">
<div class="col-2">
<b><f:format.date format="H:i">{date.start}</f:format.date></b><br>
<f:if condition="{f:format.date(format: 'H:i', date: '{date.start}')} != '00:00'">
<b><f:format.date format="H:i">{date.start}</f:format.date></b><br>
</f:if>
<b><f:format.date format="%a">{date.start}</f:format.date></b><br>
<b><f:format.date format="d.m.">{date.start}</f:format.date></b><br>
{date.event.region.title}<br>

View file

@ -25,12 +25,20 @@
</div>
<div class="caption">
<div class="caption-text mt-3">
{date.event.region.title} | <f:format.date format="d. m. Y - H:i">{date.start}</f:format.date>
{date.event.region.title} |
<f:if condition="{f:format.date(format: 'H:i', date: '{date.start}')} == '00:00'">
<f:then>
<f:format.date format="d. m. Y">{date.start}</f:format.date>
</f:then>
<f:else>
<f:format.date format="d. m. Y - H:i">{date.start}</f:format.date>
</f:else>
</f:if>
<h4>{date.event.title}</h4>
<p>{date.event.teaser}</p>
<f:if condition="{date.event.highlight}">
<f:then>
<b>Hightlight</b>
<b>Highlight</b>
</f:then>
</f:if>
</div>