mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
52 lines
1.8 KiB
Twig
52 lines
1.8 KiB
Twig
{% extends "@ChillPerson/layout.html.twig" %}
|
|
|
|
{% set activeRouteKey = '' %}
|
|
{% set person = element.person %}
|
|
{% set title = 'Resource for %name%'|trans({ '%name%' : person.firstName ~ " " ~ person.lastName } ) %}
|
|
|
|
{% block title title %}
|
|
|
|
{% block personcontent %}
|
|
<h1>{{ title }}</h1>
|
|
|
|
<dl class="chill_view_data">
|
|
<dt>{{ 'Type'|trans }}</dt>
|
|
<dd>{{ element.type|budget_element_type_display('resource') }}</dd>
|
|
|
|
<dt>{{ 'Amount'|trans }}</dt>
|
|
<dd>{{ element.amount|format_currency('EUR') }}</dd>
|
|
|
|
<dt>{{ 'Validity period'|trans }}</dt>
|
|
<dd>
|
|
{% if element.endDate is not null %}
|
|
{{ 'Valid since %startDate% until %endDate%'|trans( { '%startDate%': element.startDate|format_date('long', 'none'), '%endDate%': familyMember.endDate|format_date('long', 'none') } ) }}
|
|
{% else %}
|
|
{{ 'Valid since %startDate%'|trans( { '%startDate%': element.startDate|format_date('long', 'none') } ) }}
|
|
{% endif %}
|
|
</dd>
|
|
|
|
<dt>{{ 'Comment'|trans }}</dt>
|
|
<dd>
|
|
{%- if element.comment is not empty -%}
|
|
<blockquote class="chill-user-quote">
|
|
{{ element.comment }}
|
|
</blockquote>
|
|
{%- else -%}
|
|
<span class="chill-no-data-statement">{{ 'Not given'|trans }}</span>
|
|
{%- endif -%}
|
|
</dd>
|
|
</dl>
|
|
|
|
<ul class="record_actions sticky-form-buttons">
|
|
<li class="cancel">
|
|
<a href="{{ path("chill_budget_elements_index", { 'id': person.id } ) }}" class="sc-button bt-cancel">
|
|
{{ 'Back to the list'|trans }}
|
|
</a>
|
|
</li>
|
|
{% if is_granted(constant('Chill\\AMLI\\BudgetBundle\\Security\\Authorization\\BudgetElementVoter::UPDATE'), element) %}
|
|
<li>
|
|
<a href="{{ path('chill_budget_resource_edit', { 'id': element.id } ) }}" class="sc-button bt-edit">{{ 'Edit'|trans }}</a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
{% endblock %} |