templates/olympiads/iofs/text.html.twig line 1

  1. {% extends 'layout/base.html.twig' %}
  2. {% block body_class %}
  3.     {{ parent() }}
  4.     olympiad-page
  5. {% endblock %}
  6. {% block title %}
  7.     {{ title(text.caption, item.caption) }}
  8. {% endblock %}
  9. {% block body %}
  10.     {% import "parts/pretty_date.html.twig" as pd %}
  11.     {% include "olympiads/iofs/presentation.html.twig" %}
  12.     <div class="olympiad iofs">
  13.         <div class="container iofs__inner">
  14.             <div class="iofs__content">
  15.                 {% if text %}
  16.                     {% if is_granted("ROLE_ADMIN") %}
  17.                         <a href="{{ path('admin_olympiad_textblock_edit.ru',{olymp_id:item.id, id:text.id}) }}"
  18.                            class="btn btn-outline-primary">Редактировать страницу</a>
  19.                         <hr>
  20.                     {% endif %}
  21.                     {# {% if text.showCaption %}
  22.                         <h2 class="section-title section-title_size_s olympiad__section-title">{{ text.caption }}</h2>
  23.                     {% endif %} #}
  24.                     <section class="iofs__text text-block">
  25.                         {{ text.content|raw }}
  26.                     </section>
  27.                     {#      {% else %}
  28.                     <h2 class="section-title section-title_size_s olympiad__section-title">Раздел не заполнен</h2> #}
  29.                 {% endif %}
  30.                 {% if materials is defined %}
  31.                     {% for m in materials %}
  32.                         {% if  m.materials|length %}
  33.                             {% include "olympiads/iofs/material.html.twig" with {
  34.                                 caption:  m.caption|trans,
  35.                                 materials: m.materials,
  36.                                 remove_margin: loop.first and text is defined and not text.content
  37.                             } %}
  38.                         {% endif %}
  39.                     {% endfor %}
  40.                 {% endif %}
  41.                 {#                <a class="mobile-fixed-button iofs__mobile-register">Принять участие</a> #}
  42.             </div>
  43.             {{ include('olympiads/iofs/stages.html.twig') }}
  44.         </div>
  45.     </div>
  46. {% endblock %}