{% extends 'layout.html.twig' %} {% import "macros.html.twig" as macros %} {% set breadcrumb = buildBreadcrumb([{'route': 'app_collection_index', 'trans': 'menu.collections'}], collection) %} {% block title %} {{ renderTitle(breadcrumb) }} {% endblock %} {% block breadcrumb %} {{ renderBreadcrumb(breadcrumb) }} {% endblock %} {% block meta %} {% if context == 'user' %} {{ include('App/_partials/_meta.html.twig', { 'title': renderTitle(breadcrumb), 'description': 'menu.collections_user'|trans({'%username%': app.request.get('username')}), 'image': collection.image }) }} {% else %} {{ parent() }} {% endif %} {% endblock %} {% block content %}
{% if collection.image != null %} {% else %} {{collection.title|first|upper}} {% endif %}

{{ collection.title }}

{% if context == 'default' %} {% if isFeatureEnabled('tags') %} {% endif %} {% if isFeatureEnabled('history') %} {% endif %} {% endif %}
{% if collection.data is not empty %}

{{ 'title.infos'|trans }}

{% set underlinedTags = getUnderlinedTags(collection.data) %} {% for datum in collection.data %}
{{ datum.label }} : {% if datum.type == constant('App\\Enum\\DatumTypeEnum::TYPE_TEXT') %} {% for value in datum.value|split(',') %} {{ underlinedTags[value|trim] is defined ? underlinedTags[value|trim]|raw : value }}{{ not loop.last ? ',' }} {% endfor %} {% elseif datum.type == constant('App\\Enum\\DatumTypeEnum::TYPE_COUNTRY') %} ({{ getCountryName(datum.value) }}) {% elseif datum.type == constant('App\\Enum\\DatumTypeEnum::TYPE_FILE') %} {{ datum.originalFilename }} {% elseif datum.type == constant('App\\Enum\\DatumTypeEnum::TYPE_DATE') %} {{ datum.value|date(app.user.dateFormat|default('Y-m-d')) }} {% endif %}
{% endfor %}
{% endif %} {% if children is not empty %}

{{ collection.childrenTitle|default('title.children'|trans) }}

{{ include('App/Collection/_list.html.twig', {'collections': children|naturalSorting}) }}
{% endif %} {% if items is not empty %}

{{ collection.itemsTitle|default('title.items'|trans) }}

{% endif %}
{% endblock %} {% block footer %} {{ renderFooter(collection) }} {% endblock %} {% block modals %} {% if context == 'default' %} {{ include('App/_partials/_modal/_share.html.twig', {'entity': collection, 'route': url('app_user_collection_show', {id: collection.id, username: app.user.username})}) }} {{ include('App/_partials/_modal/_delete.html.twig', {'id': 'delete', 'route': url('app_collection_delete', {id: collection.id}), transKey: 'message.delete.collection'}) }} {% endif %} {% endblock %}