src/Elements/Bundle/DemiFrontendBundle/Resources/views/Infrastructure/detail/intro.html.twig line 1

Open in your IDE?
  1. {#
  2. /**
  3.  * @var \Pimcore\Templating\PhpEngine 
  4.  * @var \Pimcore\Templating\PhpEngine view
  5.  * @var \Pimcore\Templating\GlobalVariables app
  6.  * #
  7.  * @var detailHeadline string
  8.  * @var detailLead string optional
  9.  * @var detailHeadlineType string optional
  10.  * @var detailDescription string
  11.  * @var hasGlossar bool default = false
  12.  * @var currentInformation string
  13.  */ #}
  14. {% set isSommerCard = false %}
  15. {% set sdtExternalLink = '' %}
  16. {% if infrastructure.getDemiExtension() %}
  17.     {% set sdtExternalLink = infrastructure.getDemiExtension().getDemiExternalLink() ? infrastructure.getDemiExtension().getDemiExternalLink().getUrl(app.request.locale) : '' %}
  18.     {% set isSommerCard = infrastructure.getDemiExtension().getDemiInfrastructureSommerCardExtension() ? infrastructure.getDemiExtension().getDemiInfrastructureSommerCardExtension().getHasSommerCardOffer() : false  %}
  19. {% endif %}
  20. {% set topics = infrastructure.getTopics() %}
  21. {% set subheadString = (infrastructure.getTowns() | first) ? (infrastructure.getTowns() | first).getName(app.request.locale) : '' %}
  22. {% if topics is not null and infrastructure.getProperty('graz_gastroObject') %}
  23.     {% set subheadString = subheadString ~ ' - ' %}
  24.     {% for topic in topics %}
  25.         {% if loop.index is not same as 1 %}
  26.             {% set subheadString = subheadString ~ ', ' %}
  27.         {% endif %}
  28.         {% set subheadString = subheadString ~ topic.getName(app.request.locale) %}
  29.     {% endfor %}
  30. {% endif %}
  31. <section class="demi-infrastructure-detail-content-block demi-infrastructure-detail-content-block--intro">
  32.     <div class="container">
  33.         <div class="row">
  34.             <div class="col-md">
  35.                 <h1 class="mb-2">{{ detailHeadline }}</h1>
  36.                 <strong class="h5">{{ subheadString }}</strong>
  37.             </div>
  38.             {% if isSommerCard %}
  39.                 <div class="col-md-3 mt-4 mt-md-0">
  40.                     {{ pimcore_asset(925850).getThumbnail("demi-sommercard-logo").getHtml() | raw }}
  41.                 </div>
  42.             {% endif %}
  43.         </div>
  44.         {% set bergfexLake = not infrastructure.getDemiExtension() is empty and infrastructure.getDemiExtension().demiBergfexLake ? infrastructure.getDemiExtension().demiBergfexLake : null %}
  45.         {% if bergfexLake and bergfexLake.bergfexLake %}
  46.             {{ include('@ElementsDemiFrontend/Infrastructure/bergfex/bergfex-lake.html.twig', {
  47.                 bergfexLake: bergfexLake.bergfexLake,
  48.             }) }}
  49.         {% endif %}
  50.         {% if currentInformation is not empty %}
  51.             <div class="current-information card">
  52.                 <div class="card-body">
  53.                     <h4 class="current-information__title">{{ 'demi.infrastructure.detail.current-information' | trans }}</h4>
  54.                     <div class="wysiwyg">
  55.                         {{ currentInformation | raw }}
  56.                     </div>
  57.                 </div>
  58.             </div>
  59.         {% endif %}
  60.         {% if  detailLead != '' %}
  61.             <div class="wysiwyg lead">
  62.                 <p>{{ detailLead | raw }}</p>
  63.             </div>
  64.         {% endif %}
  65.         <div class="wysiwyg">
  66.             {{ detailDescription | raw }}
  67.         </div>
  68.         {% if sdtExternalLink is not empty and infrastructure.getSystemIdentifier() is not same as "Graz" %}
  69.             <div class="mt-md-5 mt-4">
  70.                 <a class="btn btn-primary-light" href="{{ demi_findNiceUrl(sdtExternalLink) }}" target="_blank">{{ "demi.infrastructure.detail.sdtExternalLinkText" | trans }}</a>
  71.             </div>
  72.         {% endif %}
  73.     </div>
  74. </section>