{% extends 'base.html.twig' %} {% block title %}{{ 'library.title'|trans }}{% endblock %} {% block body %}

{{ 'library.heading'|trans|raw }}

{{ 'library.sub'|trans }}

{% if selectedType %}

← {{ 'library.back_to_library'|trans }}

{% endif %} {% if selectedType is null or selectedType == 'article' %}

{{ 'library.articles_heading'|trans }}

{% if articles is empty %}

{{ 'library.no_articles'|trans }}

{% else %}
{% for article in articles %}
{% if not article.imageName %}
📄
{% endif %}
{{ 'library.badge_article'|trans }} {% if article.publishedAt %} {{ article.publishedAt|date('d/m/Y') }}{% endif %}

{{ article.getLocalizedTitle(app.request.locale) }}

{{ article.getLocalizedSummary(app.request.locale) ?? article.getLocalizedContent(app.request.locale)|striptags|slice(0, 150) ~ '…' }}

{% if article.author %}
✍️ {{ article.author.name }}
{% endif %} {{ 'library.read_article'|trans }}
{% endfor %}
{% endif %} {% endif %} {% if selectedType is null or selectedType == 'report' %}

{{ 'library.reports_heading'|trans }}

{% if reports is empty %}

{{ 'library.no_reports'|trans }}

{% else %}
{% for report in reports %}
{% if not report.imageName %}
📊
{% endif %}
{{ 'library.badge_report'|trans }} {% if report.publishedAt %} {{ report.publishedAt|date('d/m/Y') }}{% endif %}

{{ report.getLocalizedTitle(app.request.locale) }}

{{ report.getLocalizedSummary(app.request.locale) ?? report.getLocalizedContent(app.request.locale)|striptags|slice(0, 150) ~ '…' }}

{% if report.author %}
✍️ {{ report.author.name }}
{% endif %} {{ 'library.read_report'|trans }}
{% endfor %}
{% endif %} {% endif %}
{% endblock %}