{% set selectionLength = records|length %} {% set nbHdSubstitute = 0 %} {% set nbSubdefSubstitute = 0 %} {% for record in records %} {% set subdefs = record.get_subdefs() %} {% if subdefs|length > 0 %} {% for key, subdef in subdefs if subdef.is_substituted() %} {% if key == 'document' %} {% set nbHdSubstitute = nbHdSubstitute + 1 %} {% else %} {% set nbSubdefSubstitute = nbSubdefSubstitute + 1 %} {% endif %} {% endfor %} {% endif %} {% endfor %}
{# jquery Tabs #}
{# jquery menu #}
{# subdef section #}
 {{ "Reconstruire les sous definitions" | trans }}  {% if nbSubdefSubstitute > 0 %}
{{ "Attention, certain documents ont des sous-definitions substituees" | trans }}

{% else %} {% endif %}
{% for subdefLabel in availableSubdefLabel %}
{% endfor %}

{{ 'Are you sure you want to rebuild the sub-definitions of selected records?' | trans }}

{{ 'prod::tool:recreatesubviews: warning for rebuild sub-definitions' | trans }}
{% trans %}Changes for rotation will be applied only on the sub-definitions of "image" type.{% endtrans %}
 {{ "image rotation" | trans }} 
{# substitution section #} {% if substituables|length > 0 %} {# substituables is empty if multiple records #} {% for record in records %}
{% if "unknown" == record.get_type() %} {{ "Substitution is not possible for this kind of record" | trans }} {% else %} {% for substituable in substituables %} {% set d = (substituable == "document") ? true : false %}
  {% trans with {'%sd%' : substituable} %}substitution of %sd%{% endtrans %} 
{% if d %}
{% else %} {% endif %}
{% endfor %} {% endif %}
{% endfor %} {% endif %} {# exiftool section #} {% if metadatas %}
{% endif %} {% if selectionLength == 1 and recordSubdefs is not empty %}
{% for subdef in recordSubdefs %}
{{ subdef.label }}
{% endfor %}
{% endif %}
{# hidden iframe to handle upload #}