{% extends "@ChillPerson/Person/layout.html.twig"  %}
{% set activeRouteKey = 'chill_person_signature_list' %}

{% block title %}{{ 'Person signatures'|trans ~ ' ' ~ person|chill_entity_render_string }}{% endblock %}

{% block dam %}
    <a class="btn btn-misc" href="{{ chill_path_add_return_path('chill_main_workflow_signature_metadata', { 'signature_id': s.signature.id}) }}"><i class="fa fa-pencil-square-o"></i> {{ 'workflow.signature_zone.button_sign'|trans }}</a>
{% endblock %}

{% block content %}

    <h1>{{ 'workflow.signature_list.title'|trans }}</h1>

    <div class="container">
        <div class="row align-items-center">
            {% for s in signatures %}
                {% set signature = s.signature %}
                {% set workflow = s.workflow %}
                {% set document = s.document %}

                <div class="item-bloc">
                        <div class="item-row">
                            <div class="item-col flex-grow-1">
                                {% include workflow.handler_template with workflow.handler_template_data|merge({'display_action': true, 'display_action_more': [block('dam')|raw] }) %}
                            </div>
                        </div>
                </div>
            {% endfor %}
        </div>
    </div>

{% endblock %}

{% block css %}
    {{ parent() }}
    {{ encore_entry_link_tags('mod_async_upload') }}
    {{ encore_entry_script_tags('mod_document_action_buttons_group') }}
{% endblock css %}

{% block js %}
    {{ parent() }}
    {{ encore_entry_script_tags('mod_async_upload') }}
    {{ encore_entry_link_tags('mod_document_action_buttons_group') }}
{% endblock js %}
