src/StartPlatz/Bundle/EventBundle/Resources/views/Default/_event.part.archive-banner.html.twig line 1

Open in your IDE?
  1. {#
  2.     Event Archive Banner
  3.     Displays an info banner for archived events (status = 'archive')
  4.     SEO-optimized: Shows content without redirect to preserve backlinks and SEO juice
  5.     Required variables:
  6.     - event: Event entity
  7.     - isEnglish: Boolean (optional, defaults to false)
  8.     Usage:
  9.     {% include '@StartPlatzEvent/Default/_event.part.archive-banner.html.twig' %}
  10. #}
  11. {% if event.status == 'archive' %}
  12.     <section class="bg-light py-4 border-bottom">
  13.         <div class="container">
  14.             <div class="alert alert-info mb-0" role="alert">
  15.                 <div class="row align-items-center">
  16.                     <div class="col-md-8">
  17.                         <h4 class="alert-heading mb-2">
  18.                             <i class="fas fa-archive mr-2"></i>
  19.                             {% if isEnglish is defined and isEnglish %}
  20.                                 This event has taken place
  21.                             {% else %}
  22.                                 Diese Veranstaltung hat stattgefunden
  23.                             {% endif %}
  24.                         </h4>
  25.                         <p class="mb-0">
  26.                             {% if event.startDate %}
  27.                                 {% if isEnglish is defined and isEnglish %}
  28.                                     Event date: {{ event.startDate|date('F j, Y') }}
  29.                                 {% else %}
  30.                                     Veranstaltungsdatum: {{ event.startDate|date('d.m.Y') }}
  31.                                 {% endif %}
  32.                             {% endif %}
  33.                         </p>
  34.                     </div>
  35.                     <div class="col-md-4 text-md-right mt-3 mt-md-0">
  36.                         <a href="{{ path('events_list') }}" class="btn btn-primary">
  37.                             <i class="fas fa-calendar-alt mr-2"></i>
  38.                             {% if isEnglish is defined and isEnglish %}
  39.                                 View current events
  40.                             {% else %}
  41.                                 Aktuelle Events ansehen
  42.                             {% endif %}
  43.                         </a>
  44.                     </div>
  45.                 </div>
  46.             </div>
  47.         </div>
  48.     </section>
  49. {% endif %}