mirror of
https://github.com/werkraum-media/thuecat.git
synced 2024-12-05 03:26:13 +01:00
Fix conditional and enhance OpeningHours (#66)
Co-authored-by: Daniel Siepmann <coding@daniel-siepmann.de>
This commit is contained in:
parent
2de3a752cb
commit
62b2c5d0c7
3 changed files with 23 additions and 14 deletions
|
@ -13,11 +13,14 @@
|
|||
{openingHour.from -> f:format.date(format: 'd.m.Y')} -
|
||||
{openingHour.through -> f:format.date(format: 'd.m.Y')}
|
||||
</h3>
|
||||
<p>
|
||||
<div>
|
||||
<f:for each="{openingHour.daysOfWeekWithMondayFirstWeekDay}" as="weekday">
|
||||
{f:translate(id: 'content.openingHour.weekday.{weekday}', default: weekday, extensionName: 'Thuecat')} {openingHour.opens} - {openingHour.closes}<br>
|
||||
<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>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</f:for>
|
||||
</div>
|
||||
|
|
|
@ -74,9 +74,7 @@
|
|||
|| entity.sanitation || entity.photography || entity.startOfConstruction || entity.architecturalStyles}"
|
||||
>
|
||||
<div class="col-md-6">
|
||||
<f:if condition="{entity.generalInformation}">
|
||||
<h2>{f:translate(id: 'content.generalInformation', extensionName: 'Thuecat')}</h2>
|
||||
</f:if>
|
||||
<h2>{f:translate(id: 'content.generalInformation', extensionName: 'Thuecat')}</h2>
|
||||
<p>
|
||||
<f:if condition="{entity.otherServices}">
|
||||
{f:render(partial: 'Service', arguments: {otherServices: entity.otherServices})}
|
||||
|
|
|
@ -82,14 +82,22 @@ class FrontendTest extends FunctionalTestCase
|
|||
self::assertStringContainsString('example@example.com', (string)$result->getBody());
|
||||
self::assertStringContainsString('(0)30 23125 000', (string)$result->getBody());
|
||||
|
||||
self::assertStringContainsString('Montag: 09:30:00 - 17:00:00', (string)$result->getBody());
|
||||
self::assertStringContainsString('Dienstag: 09:30:00 - 17:00:00', (string)$result->getBody());
|
||||
self::assertStringContainsString('Mittwoch: 09:30:00 - 17:00:00', (string)$result->getBody());
|
||||
self::assertStringContainsString('Donnerstag: 09:30:00 - 17:00:00', (string)$result->getBody());
|
||||
self::assertStringContainsString('Freitag: 09:30:00 - 17:00:00', (string)$result->getBody());
|
||||
self::assertStringContainsString('Samstag: 09:30:00 - 17:00:00', (string)$result->getBody());
|
||||
self::assertStringContainsString('Sonntag: 13:00:00 - 17:00:00', (string)$result->getBody());
|
||||
self::assertStringContainsString('Feiertags: 13:00:00 - 17:00:00', (string)$result->getBody());
|
||||
self::assertStringContainsString('Montag:', (string)$result->getBody());
|
||||
self::assertStringContainsString('09:30:00 - 17:00:00', (string)$result->getBody());
|
||||
self::assertStringContainsString('Dienstag:', (string)$result->getBody());
|
||||
self::assertStringContainsString('09:30:00 - 17:00:00', (string)$result->getBody());
|
||||
self::assertStringContainsString('Mittwoch:', (string)$result->getBody());
|
||||
self::assertStringContainsString('09:30:00 - 17:00:00', (string)$result->getBody());
|
||||
self::assertStringContainsString('Donnerstag:', (string)$result->getBody());
|
||||
self::assertStringContainsString('09:30:00 - 17:00:00', (string)$result->getBody());
|
||||
self::assertStringContainsString('Freitag:', (string)$result->getBody());
|
||||
self::assertStringContainsString('09:30:00 - 17:00:00', (string)$result->getBody());
|
||||
self::assertStringContainsString('Samstag:', (string)$result->getBody());
|
||||
self::assertStringContainsString('09:30:00 - 17:00:00', (string)$result->getBody());
|
||||
self::assertStringContainsString('Sonntag:', (string)$result->getBody());
|
||||
self::assertStringContainsString('13:00:00 - 17:00:00', (string)$result->getBody());
|
||||
self::assertStringContainsString('Feiertags:', (string)$result->getBody());
|
||||
self::assertStringContainsString('13:00:00 - 17:00:00', (string)$result->getBody());
|
||||
|
||||
self::assertStringContainsString('Führungen', (string)$result->getBody());
|
||||
self::assertStringContainsString('(Führung)', (string)$result->getBody());
|
||||
|
|
Loading…
Reference in a new issue