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

  1. {% set st_description %}
  2.     {%- if config_value('olymp-right-block','desc-show-text') -%}
  3.          {{ config_value('olymp-right-block','text-block-'~app.request.locale)|raw }}
  4.     {%- endif -%}
  5. {% endset %}
  6. {% set button_task %}
  7.     {{ config_value('olymp-right-block','down-block-'~app.request.locale)|raw }}
  8.     {#    <a class="iofs__register-offer-button mt-5" style="padding: 9px 6px"
  9.        href="/file/1419/tasks.pdf">{{ 'site.stages.tasks'|trans }}</a> #}
  10. {% endset %}
  11. {% set button_review %}
  12.     {% if config_value('olymp-right-block','show-review') %}
  13.         <a class="iofs__register-offer-button mt-3"
  14.            href="{{ path('review_60_submit') }}">{{ 'site.stages.review_create'|trans }}</a>
  15.     {% endif %}
  16. {% endset %}
  17. {% if stages is defined and stages %}
  18.     {% import "parts/pretty_date.html.twig" as pd %}
  19.     <div class="iofs__register-offer-container">
  20.         <div class="iofs__register-offer-wrapper">
  21.             {% for st in stages %}
  22.                 {% set online_stage = (onlineStages[ st.id] is defined)?onlineStages[ st.id]:null %}
  23.                 <div class="iofs__register-offer
  24.                                  {% if online_stage %}online-stage
  25.                                  {% if  online_stage.active %} online-stage-active {% endif %}
  26.                                  {% if  online_stage.inPast %} online-stage-past {% endif %}
  27. {% endif %}
  28. ">
  29.                     {#                    <h2 class="iofs__register-offer-title">{{ st.caption }}</h2> #}
  30.                     {{ st_description }}
  31.                     {% if config_value('olymp-right-block','desc-show-auto') %}
  32.                         <h2 class="iofs__register-offer-title">{{ st.caption }}</h2>
  33.                         {% if  online_stage %}
  34.                             {% for c in online_stage.categories %}
  35.                                 <div class="iofs__register-offer-row">
  36.                                     <div class="iofs__register-offer-row-icon"><i class="fal fa-calendar-alt"></i></div>
  37.                                     <div class="iofs__register-offer-row-text">{{ c.caption }}
  38.                                         : {{ pd.pretty_date_full(c.interval.from,c.interval.to) }}
  39.                                         {{ pd.pretty_time(c.timeInterval.from,c.timeInterval.to) }}</div>
  40.                                 </div>
  41.                             {% endfor %}
  42.                         {% else %}
  43.                             <div class="iofs__register-offer-row">
  44.                                 <div class="iofs__register-offer-row-icon"><i class="fal fa-calendar-alt"></i></div>
  45.                                 <div class="iofs__register-offer-row-text">{{ pd.pretty_date_full(st.interval.from,st.interval.to) }}</div>
  46.                             </div>
  47.                         {% endif %}
  48.                         {% if st.placeShort %}
  49.                             <div class="iofs__register-offer-row">
  50.                                 <div class="iofs__register-offer-row-icon"><i class="fal fa-map-marker-alt"></i>
  51.                                 </div>
  52.                                 <div class="iofs__register-offer-row-text">{{ st.placeShort }}</div>
  53.                             </div>
  54.                         {% endif %}
  55.                         {% if   online_stage and not online_stage.inPast %}
  56.                             {% set showSoprovod = false %}
  57.                             {% set eventID=null %}
  58.                             {% for c in online_stage.categories|filter(c=>c.isRegistrationEnable) %}
  59.                                 {% if loop.first %}
  60.                                     {% set eventID=c.event.id %}
  61.                                 {% endif %}
  62.                                 <a class="iofs__register-offer-button {% if not is_granted('online_category_registration_open', c) %}disabled{% else %}{% set showSoprovod=true %}{% endif %}"
  63.                                    href="{{ path('online_apply', {id:c.id}) }}">{{ c.applyButton }}</a>
  64.                             {% endfor %}
  65.                             {#    {% if eventID %}
  66.                             <a class="iofs__register-offer-button mt-4"
  67.                                href="{{ path('online_attendant_apply', {id:eventID}) }}">Регистрация сопровождающих</a>
  68.                         {% endif %} #}
  69.                         {% endif %}
  70.                         <hr class="mt-4 mb-4">
  71.                     {% endif %}
  72.                     {% if is_granted('trial_test_enabled') and config_value('trial-test','show_button') %}
  73.                         <a class="iofs__register-offer-button highlight-white-border mt-4 "
  74.                            href="{{ path('online_trial') }}">{{ "olymp_online.trial.reg_block_button"|trans }}</a>
  75.                     {% endif %}
  76.                     {{ button_task }}
  77.                     {{ button_review }}
  78.                 </div>
  79.             {% endfor %}
  80.         </div>
  81.     </div>
  82. {% else %}
  83.     <div class="iofs__register-offer-container">
  84.         <div class="iofs__register-offer-wrapper">
  85.             <div class="iofs__register-offer  online-stage
  86.                                   online-stage-active ">
  87.                 {{ st_description }}
  88.                 {{ button_task }}
  89.                 {{ button_review }}
  90.             </div>
  91.         </div>
  92.     </div>
  93. {% endif %}