Roomtypes headline according to hotel type

This commit is contained in:
Björn Fromme
2018-09-26 10:37:32 +02:00
parent 18bddc7c22
commit 5caf8a9945
2 changed files with 41 additions and 3 deletions
@@ -875,4 +875,28 @@ class Hotel extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements Te
$this->externalLink = $externalLink;
}
/**
* @return bool
*/
public function getIsApartment()
{
return $this->getType() === self::TYPE_APPARTMENT;
}
/**
* @return bool
*/
public function getIsHolidayFlat()
{
return $this->getType() === self::TYPE_HOLIDAY_FLAT;
}
/**
* @return bool
*/
public function getIsOther()
{
return !$this->getIsApartment() && !$this->getIsHolidayFlat();
}
}
@@ -45,9 +45,23 @@
<div class="hotel-details hotel-details--features">
{hotel.features -> f:format.html()}
</div>
<f:if condition="{bars}">
<f:then><div class="ep-headbar">Zimmerarten / Apartments</div></f:then>
<f:else><h2>Zimmerarten / Apartments</h2></f:else>
<f:if condition="{hotel.isApartment}">
<f:if condition="{bars}">
<f:then><div class="ep-headbar">Appartments</div></f:then>
<f:else><h2>Appartments</h2></f:else>
</f:if>
</f:if>
<f:if condition="{hotel.isHolidayFlat}">
<f:if condition="{bars}">
<f:then><div class="ep-headbar">Ferienwohnungen</div></f:then>
<f:else><h2>Ferienwohnungen</h2></f:else>
</f:if>
</f:if>
<f:if condition="{hotel.isOther}">
<f:if condition="{bars}">
<f:then><div class="ep-headbar">Zimmerarten</div></f:then>
<f:else><h2>Zimmerarten</h2></f:else>
</f:if>
</f:if>
<div class="hotel-details hotel-details--roomtypes">
{hotel.roomTypes -> f:format.html()}