socialbase-1.1.0/templates/node/event/node--event--full.html.twig

templates/node/event/node--event--full.html.twig
{% extends "node--full.html.twig" %}


{% block metainfo %}
  {% if display_submitted %}
    <header class="metainfo">

      <div class="metainfo__avatar">
        {{ author_picture }}
      </div>

      <div class="metainfo__content">

        {{ author }}

        <div>
          {% if event_type %}
            {{ event_type }}
          {% endif %}
          {% if group_link %}
            {% trans %} in group {% endtrans %}
            {{ group_link }}
          {% endif %}
        </div>

      </div>

      {{ content.links.moderation }}

    </header>
  {% endif %}
{% endblock %}

{# add specific fields to body for events only #}
{% block nodefull_specialfields %}

  <div class="article__special-fields">
    {#
    @todo: Leave only the event_date_advanced variable for
      Open Social 11.4.x and above.
      @see https://github.com/goalgorilla/open_social/pull/2853
    #}
    {% if event_date_advanced is defined %}
      {{ event_date_advanced }}
    {% else %}
      <div class="article__special-field">
        <svg class="article__special-fields-icon" aria-hidden="true">
          <title>{% trans %} Event date {% endtrans %}</title>
          <use xlink:href="#icon-event"></use>
        </svg>
        <span class="sr-only">{% trans %}Event date {% endtrans %}</span>
        <span class="inline-center">
          <strong>{{event_date}}</strong>
        </span>
      </div>
    {% endif %}

    {% if content.field_event_address|render or content.field_event_location|render %}
      {#
      @todo: Leave only the event_location_address variable for
        Open Social 11.4.x and above.
        @see https://github.com/goalgorilla/open_social/pull/2853
      #}
      {% if event_location_address is defined %}
        {{ event_location_address }}
      {% else %}
        <div class="article__special-field">
          <svg class="article__special-fields-icon" aria-hidden="true">
            <title>{% trans %} Located at: {% endtrans %}</title>
            <use xlink:href="#icon-location"></use></svg>
          <span class="sr-only">{% trans %}Event location {% endtrans %}</span>
          <span class="inline-center">
            <strong>{{content.field_event_location}}</strong>
            {% if content.field_event_address|render is not empty and content.field_event_location|render is not empty %} &bullet; {% endif %}
            {{content.field_event_address}}
          </span>
        </div>
      {% endif %}
    {% endif %}
  </div>

{% endblock %}

{% block nodefull_body %}

  {{ content|without('field_event_address','field_event_location', 'field_event_type', 'book_navigation', 'flag_follow_content', 'field_event_an_enroll', 'field_enrollment_status', 'enrolled', 'enrollments_count', 'links', 'ongoing', 'field_event_addtocal') }}

{% endblock %}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc