Julien Fastré 20f2bc6c35
Enhance signature display with detailed person information
Updated the signature view template to include person details using the '_insert_vue_onthefly.html.twig' template. This change adds more contextual information about the signer, such as their name and status, improving the user experience.
2024-09-04 17:26:46 +02:00

32 lines
1.6 KiB
Twig

<h2>{{ 'workflow.signature_zone.title'|trans }}</h2>
<div class="container">
{% for s in signatures %}
<div class="row align-items-center">
<div class="col-sm-12 col-md-8">
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
action: 'show', displayBadge: true,
targetEntity: { name: 'person', id: s.signer.id },
buttonText: s.signer|chill_entity_render_string,
isDead: s.signer.deathDate is not null
} %}
</div>
<div class="col-sm-12 col-md-4">
{% if s.isSigned %}
<p class="text-end">{{ 'workflow.signature_zone.has_signed_statement'|trans({ 'datetime' : s.stateDate }) }}</p>
{% else %}
<ul class="record_actions">
<li>
<a class="btn btn-misc" href="{{ chill_path_add_return_path('chill_main_workflow_signature_metadata', { 'signature_id': s.id}) }}"><i class="fa fa-pencil-square-o"></i> {{ 'workflow.signature_zone.button_sign'|trans }}</a>
{% if s.state is same as('signed') %}
<p class="updatedBy">{{ s.stateDate }}</p>
{% endif %}
</li>
</ul>
{% endif %}
</div>
</div>
{% endfor %}
</div>