Add class identifier and services condition to templates (#63)

This commit is contained in:
Carlos Pozo 2022-04-11 09:26:32 +02:00 committed by GitHub
parent 79bda0ce72
commit d71e785d8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,157 +1,157 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:for each="{entities}" as="entity">
<div class="row">
<div class="col-12 col-md-6">
<f:if condition="{entity.slogan}"><span class="badge bg-danger">{entity.slogan}</span></f:if>
<h1>{entity.title} ({entity.town.title})</h1>
{entity.description -> f:format.html()}
<div class="thuecat">
<f:for each="{entities}" as="entity">
<div class="row thuecat__abstract">
<div class="col-12 col-md-6">
<f:if condition="{entity.slogan}"><span class="badge bg-danger">{entity.slogan}</span></f:if>
<h1>{entity.title} ({entity.town.title})</h1>
{entity.description -> f:format.html()}
</div>
<div class="col-12 col-md-6 order-first order-md-last">
<f:if condition="{entity.media.mainImage}">
<f:image src="{entity.media.mainImage.url}" class="img-fluid"/>
</f:if>
</div>
</div>
<div class="col-12 col-md-6 order-first order-md-last">
<f:if condition="{entity.media.mainImage}">
<f:image src="{entity.media.mainImage.url}" class="img-fluid"/>
</f:if>
</div>
</div>
<div class="row">
<f:if condition="{entity.parkingFacilitiesNearBy -> f:count()} > 3">
<f:then>
<div class="col-md-4">
<f:if condition="{entity.address}">
<img src="{f:uri.resource(path:'Icons/icon-info.svg', extensionName:'sitepackage')}" width="30" class="svg-icon" alt="Address">
<h2>{f:translate(id: 'content.address', extensionName: 'Thuecat')}</h2>
{f:render(partial: 'Address', arguments: {address: entity.address})}
</f:if>
<f:if condition="{entity.distanceToPublicTransport}">
<div class="distance-transport mt-5">
<img src="{f:uri.resource(path:'Icons/icon-bus.svg', extensionName:'sitepackage')}" width="30" class="svg-icon" alt="Address">
<div class="row thuecat__address">
<f:if condition="{entity.parkingFacilitiesNearBy -> f:count()} > 3">
<f:then>
<div class="col-md-4">
<f:if condition="{entity.address}">
<img src="{f:uri.resource(path:'Icons/icon-info.svg', extensionName:'Thuecat')}" width="30" class="svg-icon" alt="Address">
<h2>{f:translate(id: 'content.address', extensionName: 'Thuecat')}</h2>
{f:render(partial: 'Address', arguments: {address: entity.address})}
</f:if>
<f:if condition="{entity.distanceToPublicTransport}">
<div class="distance-transport mt-5">
<img src="{f:uri.resource(path:'Icons/icon-bus.svg', extensionName:'Thuecat')}" width="30" class="svg-icon" alt="Address">
<h2>{f:translate(id: 'content.distanceToPublicTransport', extensionName: 'Thuecat')}</h2>
<p>
{entity.distanceToPublicTransport.value} {f:translate(id: 'content.unit.{entity.distanceToPublicTransport.unit}', default: entity.distanceToPublicTransport.unit, extensionName: 'Thuecat')}
</p>
</div>
</f:if>
</div>
<div class="col-md-8 multiple-parking">
<f:if condition="{entity.parkingFacilitiesNearBy}">
<img src="{f:uri.resource(path:'Icons/icon-parking.svg', extensionName:'Thuecat')}" width="30" class="svg-icon" alt="Address">
<h2>{f:translate(id: 'content.parkingFacilitiesNearBy', extensionName: 'Thuecat')}</h2>
{f:render(partial: 'Parking', arguments: {parkingFacilitiesNearBy: entity.parkingFacilitiesNearBy})}
</f:if>
</div>
</f:then>
<f:else>
<div class="col-md-4">
<f:if condition="{entity.address}">
<img src="{f:uri.resource(path:'Icons/icon-info.svg', extensionName:'Thuecat')}" width="30" class="svg-icon" alt="Address">
<h2>{f:translate(id: 'content.address', extensionName: 'Thuecat')}</h2>
{f:render(partial: 'Address', arguments: {address: entity.address})}
</f:if>
</div>
<div class="col-md-4">
<f:if condition="{entity.distanceToPublicTransport}">
<img src="{f:uri.resource(path:'Icons/icon-bus.svg', extensionName:'Thuecat')}" width="30" class="svg-icon" alt="Address">
<h2>{f:translate(id: 'content.distanceToPublicTransport', extensionName: 'Thuecat')}</h2>
<p>
{entity.distanceToPublicTransport.value} {f:translate(id: 'content.unit.{entity.distanceToPublicTransport.unit}', default: entity.distanceToPublicTransport.unit, extensionName: 'Thuecat')}
</p>
</div>
</f:if>
</div>
<div class="col-md-4">
<f:if condition="{entity.parkingFacilitiesNearBy}">
<img src="{f:uri.resource(path:'Icons/icon-parking.svg', extensionName:'Thuecat')}" width="30" class="svg-icon" alt="Address">
<h2>{f:translate(id: 'content.parkingFacilitiesNearBy', extensionName: 'Thuecat')}</h2>
{f:render(partial: 'Parking', arguments: {parkingFacilitiesNearBy: entity.parkingFacilitiesNearBy})}
</f:if>
</div>
</f:else>
</f:if>
</div>
<div class="row thuecat__services">
<f:if condition="{entity.generalInformation || entity.otherServices || entity.petsAllowed || entity.isAccessibleForFree
|| entity.publicAccess || entity.accessibilitySpecification.certificationStatus || entity.museumServices
|| entity.digitalOffer || entity.trafficInfrastructures || entity.paymentAccepted || entity.availableLanguages
|| 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>
</div>
<div class="col-md-8 multiple-parking">
<f:if condition="{entity.parkingFacilitiesNearBy}">
<img src="{f:uri.resource(path:'Icons/icon-parking.svg', extensionName:'sitepackage')}" width="30" class="svg-icon" alt="Address">
<h2>{f:translate(id: 'content.parkingFacilitiesNearBy', extensionName: 'Thuecat')}</h2>
{f:render(partial: 'Parking', arguments: {parkingFacilitiesNearBy: entity.parkingFacilitiesNearBy})}
<p>
<f:if condition="{entity.otherServices}">
{f:render(partial: 'Service', arguments: {otherServices: entity.otherServices})}
</f:if>
<span class="badge bg-light">{f:translate(id: 'content.petsAllowed.{entity.petsAllowed}', default: entity.petsAllowed, extensionName: 'Thuecat')}</span>
<span class="badge bg-light">{f:translate(id: 'content.isAccessibleForFree.{entity.isAccessibleForFree}', default: entity.isAccessibleForFree, extensionName: 'Thuecat')}</span>
<span class="badge bg-light">{f:translate(id: 'content.publicAccess.{entity.publicAccess}', default: entity.publicAccess, extensionName: 'Thuecat')}</span>
<span class="badge bg-light">{f:translate(id: 'content.accessibilitySpecification.certificationStatus.{entity.accessibilitySpecification.certificationStatus}', default: entity.accessibilitySpecification.certificationStatus, extensionName: 'Thuecat')}</span>
</p>
<f:if condition="{entity.museumServices}">
<h3>{f:translate(id: 'content.museum', extensionName: 'Thuecat')}</h3>
{f:render(partial: 'Museum', arguments: {museumServices: entity.museumServices})}
</f:if>
</div>
</f:then>
<f:else>
<div class="col-md-4">
<f:if condition="{entity.address}">
<img src="{f:uri.resource(path:'Icons/icon-info.svg', extensionName:'sitepackage')}" width="30" class="svg-icon" alt="Address">
<h2>{f:translate(id: 'content.address', extensionName: 'Thuecat')}</h2>
{f:render(partial: 'Address', arguments: {address: entity.address})}
<f:if condition="{entity.digitalOffer}">
<h3>{f:translate(id: 'content.digital', extensionName: 'Thuecat')}</h3>
{f:render(partial: 'Digital', arguments: {digitalOffer: entity.digitalOffer})}
</f:if>
</div>
<div class="col-md-4">
<f:if condition="{entity.distanceToPublicTransport}">
<img src="{f:uri.resource(path:'Icons/icon-bus.svg', extensionName:'sitepackage')}" width="30" class="svg-icon" alt="Address">
<h2>{f:translate(id: 'content.distanceToPublicTransport', extensionName: 'Thuecat')}</h2>
<f:if condition="{entity.trafficInfrastructures}">
<h3>{f:translate(id: 'content.traffic', extensionName: 'Thuecat')}</h3>
{f:render(partial: 'Traffic', arguments: {trafficInfrastructures: entity.trafficInfrastructures})}
</f:if>
<f:if condition="{entity.paymentAccepted}">
<h3>{f:translate(id: 'content.payment', extensionName: 'Thuecat')}</h3>
{f:render(partial: 'Payment', arguments: {paymentAccepted: entity.paymentAccepted})}
</f:if>
<f:if condition="{entity.availableLanguages}">
<h3>{f:translate(id: 'content.languages', extensionName: 'Thuecat')}</h3>
{f:render(partial: 'Payment', arguments: {availableLanguages: entity.availableLanguages})}
</f:if>
<f:if condition="{entity.sanitation}">
<h3>{f:translate(id: 'content.sanitation', extensionName: 'Thuecat')}</h3>
{f:render(partial: 'Sanitation', arguments: {sanitation: entity.sanitation})}
</f:if>
<f:if condition="{entity.photography}">
<h3>{f:translate(id: 'content.photography', extensionName: 'Thuecat')}</h3>
{f:render(partial: 'Photography', arguments: {photography: entity.photography})}
</f:if>
<f:if condition="{entity.startOfConstruction}">
<h3>{f:translate(id: 'content.construction', extensionName: 'Thuecat')}</h3>
<p>
{entity.distanceToPublicTransport.value} {f:translate(id: 'content.unit.{entity.distanceToPublicTransport.unit}', default: entity.distanceToPublicTransport.unit, extensionName: 'Thuecat')}
<span class="badge bg-light">{entity.startOfConstruction}</span>
</p>
</f:if>
<f:if condition="{entity.architecturalStyles}">
<h3>{f:translate(id: 'content.architecture', extensionName: 'Thuecat')}</h3>
<p>
<f:for each="{entity.architecturalStyles}" as="style">
<span class="badge bg-light">{f:translate(id: 'content.architecturalStyle.{style}', default: style, extensionName: 'Thuecat')}</span>
</f:for>
</p>
</f:if>
</div>
<div class="col-md-4">
<f:if condition="{entity.parkingFacilitiesNearBy}">
<img src="{f:uri.resource(path:'Icons/icon-parking.svg', extensionName:'sitepackage')}" width="30" class="svg-icon" alt="Address">
<h2>{f:translate(id: 'content.parkingFacilitiesNearBy', extensionName: 'Thuecat')}</h2>
{f:render(partial: 'Parking', arguments: {parkingFacilitiesNearBy: entity.parkingFacilitiesNearBy})}
</f:if>
</div>
</f:else>
</f:if>
</div>
<div class="row">
<div class="col-md-6">
<h2>{f:translate(id: 'content.generalInformation', extensionName: 'Thuecat')}</h2>
<p>
<f:if condition="{entity.otherServices}">
{f:render(partial: 'Service', arguments: {otherServices: entity.otherServices})}
</f:if>
<span class="badge bg-light">{f:translate(id: 'content.petsAllowed.{entity.petsAllowed}', default: entity.petsAllowed, extensionName: 'Thuecat')}</span>
<span class="badge bg-light">{f:translate(id: 'content.isAccessibleForFree.{entity.isAccessibleForFree}', default: entity.isAccessibleForFree, extensionName: 'Thuecat')}</span>
<span class="badge bg-light">{f:translate(id: 'content.publicAccess.{entity.publicAccess}', default: entity.publicAccess, extensionName: 'Thuecat')}</span>
<span class="badge bg-light">{f:translate(id: 'content.accessibilitySpecification.certificationStatus.{entity.accessibilitySpecification.certificationStatus}', default: entity.accessibilitySpecification.certificationStatus, extensionName: 'Thuecat')}</span>
</p>
<f:if condition="{entity.museumServices}">
<h3>{f:translate(id: 'content.museum', extensionName: 'Thuecat')}</h3>
{f:render(partial: 'Museum', arguments: {museumServices: entity.museumServices})}
</f:if>
<f:if condition="{entity.digitalOffer}">
<h3>{f:translate(id: 'content.digital', extensionName: 'Thuecat')}</h3>
{f:render(partial: 'Digital', arguments: {digitalOffer: entity.digitalOffer})}
</f:if>
<f:if condition="{entity.trafficInfrastructures}">
<h3>{f:translate(id: 'content.traffic', extensionName: 'Thuecat')}</h3>
{f:render(partial: 'Traffic', arguments: {trafficInfrastructures: entity.trafficInfrastructures})}
</f:if>
<f:if condition="{entity.paymentAccepted}">
<h3>{f:translate(id: 'content.payment', extensionName: 'Thuecat')}</h3>
{f:render(partial: 'Payment', arguments: {paymentAccepted: entity.paymentAccepted})}
</f:if>
<f:if condition="{entity.availableLanguages}">
<h3>{f:translate(id: 'content.languages', extensionName: 'Thuecat')}</h3>
{f:render(partial: 'Payment', arguments: {availableLanguages: entity.availableLanguages})}
</f:if>
<f:if condition="{entity.sanitation}">
<h3>{f:translate(id: 'content.sanitation', extensionName: 'Thuecat')}</h3>
{f:render(partial: 'Sanitation', arguments: {sanitation: entity.sanitation})}
</f:if>
<f:if condition="{entity.photography}">
<h3>{f:translate(id: 'content.photography', extensionName: 'Thuecat')}</h3>
{f:render(partial: 'Photography', arguments: {photography: entity.photography})}
</f:if>
<f:if condition="{entity.startOfConstruction}">
<h3>{f:translate(id: 'content.construction', extensionName: 'Thuecat')}</h3>
<p>
<span class="badge bg-light">{entity.startOfConstruction}</span>
</p>
</f:if>
<f:if condition="{entity.architecturalStyles}">
<h3>{f:translate(id: 'content.architecture', extensionName: 'Thuecat')}</h3>
<p>
<f:for each="{entity.architecturalStyles}" as="style">
<span class="badge bg-light">{f:translate(id: 'content.architecturalStyle.{style}', default: style, extensionName: 'Thuecat')}</span>
</f:for>
</p>
</f:if>
</div>
<div class="col-md-6">
<f:if condition="{entity.openingHours}">
<h2>{f:translate(id: 'content.openingHours', extensionName: 'Thuecat')}</h2>
{f:render(partial: 'Opening', arguments: {openingHours: entity.openingHours})}
<div class="col-md-6">
<h2>{f:translate(id: 'content.openingHours', extensionName: 'Thuecat')}</h2>
{f:render(partial: 'Opening', arguments: {openingHours: entity.openingHours})}
</div>
</f:if>
</div>
</div>
<f:if condition="{entity.offers}">
<div class="row">
<h2 class="text-center">{f:translate(id: 'content.offers', extensionName: 'Thuecat')}</h2>
{f:render(partial: 'Offers', arguments: {offers: entity.offers, uid: entity.uid})}
<div class="thuecat__offers">
<f:if condition="{entity.offers}">
<div class="row">
<h2 class="text-center">{f:translate(id: 'content.offers', extensionName: 'Thuecat')}</h2>
{f:render(partial: 'Offers', arguments: {offers: entity.offers, uid: entity.uid})}
</div>
</f:if>
<f:if condition="{entity.accessibilitySpecification.certificationStatus} != ''">
<div class="row">
<h2 class="text-center">{f:translate(id: 'content.accessibility', extensionName: 'Thuecat')}</h2>
{f:render(partial: 'Accessibility', arguments: {specification: entity.accessibilitySpecification, uid: entity.uid})}
</div>
</f:if>
</div>
</f:if>
<f:if condition="{entity.accessibilitySpecification.certificationStatus} != ''">
<div class="row">
<h2 class="text-center">{f:translate(id: 'content.accessibility', extensionName: 'Thuecat')}</h2>
{f:render(partial: 'Accessibility', arguments: {specification: entity.accessibilitySpecification, uid: entity.uid})}
</div>
</f:if>
</f:for>
</f:for>
</div>
</html>