templates/olympiads/smi.html.twig line 1
{% extends 'layout/base.html.twig' %}
{% block title %}
{% if page == 1 %}
{{ title("title.smi.caption"|trans) }}
{% else %}
{{ title( "title.smi.caption"|trans ~ " - " ~ "title.page"|trans ~ " " ~ page) }}
{% endif %}
{% endblock %}
{% block body %}
{% include "olympiads/iofs/presentation.html.twig" with {item: olympiad} %}
<div class="olympiad iofs">
<div class="container iofs__inner">
<div class="iofs__content">
<div class="iofs__text text-block">
{% if is_granted('ROLE_ADMIN') %}
<a href="{{ path('admin_olympiad_smi_list.ru', {org_id: olympiad.id}) }}"
class="btn btn-outline-primary" target="_blank">Редактирование СМИ</a>
{% endif %}
<div class="grid-smi">
{% for i in items %}
<div class="smi-block dark-background">
<div class="header">
{{- i.caption -}}
</div>
<div class="info">
{% if i.shortText %}
{{ i.shortText }}
{% else %}
{{ i.text|raw }}
{% endif %}
</div>
{# {%- if i.link -%}
<div class="source">
Источник: <a class="" target="_blank" href="{{ i.link }}">{{ i.link }}</a>
</div>
{%- endif -%}#}
<div class="">
{% if i.link %}
<a target="_blank" class="secondary-button feed-new__read-more" href="{{ i.link }}">{{ "news.read_full"|trans}}</a>
{% else %}
<a class="secondary-button feed-new__read-more" href="{{ path('olymp_smi_item',{smi_id: i.id}) }}">Читать полностью</a>
{% endif %}
{# <a href="{{ path('olymp_smi_item',{smi_id: i.id}) }}" class="secondary-button feed-new__read-more">Читать полностью</a>#}
</div>
</div>
{% endfor %}
</div>
</div>
{{ knp_pagination_render(items,'@KnpPaginator/Pagination/twitter_bootstrap_v4_pagination.html.twig') }}
</div>
{{ include('olympiads/iofs/stages.html.twig') }}
</div>
</div>
{% endblock %}