{#
/**
* @var \Pimcore\Templating\PhpEngine
* @var \Pimcore\Templating\PhpEngine view
* @var \Pimcore\Templating\GlobalVariables app
* #
* @var detailHeadline string
* @var detailLead string optional
* @var detailHeadlineType string optional
* @var detailDescription string
* @var hasGlossar bool default = false
* @var currentInformation string
*/ #}
{% set isSommerCard = false %}
{% set sdtExternalLink = '' %}
{% if infrastructure.getDemiExtension() %}
{% set sdtExternalLink = infrastructure.getDemiExtension().getDemiExternalLink() ? infrastructure.getDemiExtension().getDemiExternalLink().getUrl(app.request.locale) : '' %}
{% set isSommerCard = infrastructure.getDemiExtension().getDemiInfrastructureSommerCardExtension() ? infrastructure.getDemiExtension().getDemiInfrastructureSommerCardExtension().getHasSommerCardOffer() : false %}
{% endif %}
{% set topics = infrastructure.getTopics() %}
{% set subheadString = '' %}
{% if infrastructure.getTowns()|first %}
{% set firstDemiTown = infrastructure.getTowns()|first %}
{% set subheadString = firstDemiTown.getName(app.request.locale) %}
{% set community = stt_getSttCommunityFromDemiTown(firstDemiTown) %}
{% if community %}
{% set communityLink = linkGenerator().generate(community) %}
{% if communityLink %}
{% set subheadString = '<a href="' ~ communityLink ~ '">' ~ subheadString ~'</a>' %}
{% endif %}
{% endif %}
{% endif %}
{% if topics is not null and infrastructure.getProperty('graz_gastroObject') %}
{% set subheadString = subheadString ~ ' - ' %}
{% for topic in topics %}
{% if loop.index is not same as 1 %}
{% set subheadString = subheadString ~ ', ' %}
{% endif %}
{% set subheadString = subheadString ~ topic.getName(app.request.locale) %}
{% endfor %}
{% endif %}
<section class="demi-infrastructure-detail-content-block demi-infrastructure-detail-content-block--intro">
<div class="container">
<div class="row">
<div class="col-md wysiwyg">
<h1 class="mb-2">{{ detailHeadline }}</h1>
<strong class="h5">{{ subheadString|raw }}</strong>
</div>
{% if isSommerCard %}
<div class="col-md-3 mt-4 mt-md-0">
{{ pimcore_asset(925850).getThumbnail("demi-sommercard-logo").getHtml() | raw }}
</div>
{% endif %}
</div>
{% set bergfexLake = not infrastructure.getDemiExtension() is empty and infrastructure.getDemiExtension().demiBergfexLake ? infrastructure.getDemiExtension().demiBergfexLake : null %}
{% if bergfexLake and bergfexLake.bergfexLake %}
{{ include('@ElementsDemiFrontend/Infrastructure/bergfex/bergfex-lake.html.twig', {
bergfexLake: bergfexLake.bergfexLake,
}) }}
{% endif %}
{% if currentInformation is not empty %}
<div class="current-information card">
<div class="card-body">
<h4 class="current-information__title">{{ 'demi.infrastructure.detail.current-information' | trans }}</h4>
<div class="wysiwyg">
{{ currentInformation | raw }}
</div>
</div>
</div>
{% endif %}
{% if detailLead != '' %}
<div class="wysiwyg lead">
<p>{{ detailLead | raw }}</p>
</div>
{% endif %}
<div class="wysiwyg">
{{ detailDescription | raw }}
</div>
{% if sdtExternalLink is not empty and infrastructure.getSystemIdentifier() is not same as "Graz" %}
<div class="mt-md-5 mt-4">
<a class="btn btn-primary-light" href="{{ demi_findNiceUrl(sdtExternalLink) }}" target="_blank">{{ "demi.infrastructure.detail.sdtExternalLinkText" | trans }}</a>
</div>
{% endif %}
</div>
</section>