thuecat/Resources/Private/Partials/Frontend/ContentElement/Opening.html
Carlos Pozo 62b2c5d0c7
Fix conditional and enhance OpeningHours (#66)
Co-authored-by: Daniel Siepmann <coding@daniel-siepmann.de>
2022-04-11 16:16:51 +02:00

27 lines
1.1 KiB
HTML

<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<div class="openingHours row">
<f:for each="{openingHours}" as="openingHour">
<f:if condition="{openingHours -> f:count()} == 1">
<f:then>
<div class="col-12">
</f:then>
<f:else>
<div class="col-md-6">
</f:else>
</f:if>
<h3>
{openingHour.from -> f:format.date(format: 'd.m.Y')} -
{openingHour.through -> f:format.date(format: 'd.m.Y')}
</h3>
<div>
<f:for each="{openingHour.daysOfWeekWithMondayFirstWeekDay}" as="weekday">
<div class="day-row">
<div class="day"><span>{f:translate(id: 'content.openingHour.weekday.{weekday}', default: weekday, extensionName: 'Thuecat')}</span></div>
<div class="time"><span>{openingHour.opens} - {openingHour.closes}</span></div>
</div>
</f:for>
</div>
</div>
</f:for>
</div>
</html>