mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
69 lines
2.7 KiB
Twig
69 lines
2.7 KiB
Twig
{% extends "@ChillPerson/layout.html.twig" %}
|
|
|
|
{% set activeRouteKey = 'chill_activity_activity_list' %}
|
|
|
|
{% block title 'Activity'|trans %}
|
|
|
|
{% import 'ChillActivityBundle:ActivityReason:macro.html.twig' as m %}
|
|
|
|
{% block personcontent -%}
|
|
<h1 >{{ "Activity"|trans }}</h1>
|
|
|
|
<dl class="chill_view_data">
|
|
<dt class="inline">{{ 'User'|trans }}</dt>
|
|
<dd>{{ entity.user }}</dd>
|
|
<dt class="inline">{{ 'Scope'|trans }}</dt>
|
|
<dd><span class="scope">{{ entity.scope.name|localize_translatable_string }}</span></dd>
|
|
|
|
<h2 class="chill-red">{{ 'Activity data'|trans }}</h2>
|
|
<dt class="inline">{{ 'Person'|trans }}</dt>
|
|
<dd>{{ entity.person }}</dd>
|
|
|
|
<dt class="inline">{{ 'Date'|trans }}</dt>
|
|
<dd>{{ entity.date|format_date('long') }}</dd>
|
|
<dt class="inline">{{ 'Duration Time'|trans }}</dt>
|
|
<dd>{{ entity.durationTime|date('H:i') }}</dd>
|
|
<dt class="inline">{{ 'Type'|trans }}</dt>
|
|
<dd>{{ entity.type.name | localize_translatable_string }}</dd>
|
|
|
|
<dt class="inline">{{ 'Attendee'|trans }}</dt>
|
|
<dd>{% if entity.attendee is not null %}{% if entity.attendee %}{{ 'present'|trans|capitalize }} {% else %} {{ 'not present'|trans|capitalize }}{% endif %}{% else %}{{ 'None'|trans|capitalize }}{% endif %}</dd>
|
|
|
|
<dt class="inline">{{ 'Reasons'|trans }}</dt>
|
|
{%- if entity.reasons is empty -%}
|
|
<dd><span class="chill-no-data-statement">{{ 'No reason associated'|trans }}</span></dd>
|
|
{%- else -%}
|
|
<dd>{% for r in entity.reasons %}{{ r|chill_entity_render_box }} {% endfor %}</dd>
|
|
{%- endif -%}
|
|
|
|
<dt class="inline">{{ 'Comment'|trans }}</dt>
|
|
{%- if entity.comment is empty -%}
|
|
<dd><span class="chill-no-data-statement">{{ 'No comment associated'|trans }}</span></dd>
|
|
{%- else -%}
|
|
<dd>{{ entity.comment|chill_entity_render_box }}</dd>
|
|
{%- endif -%}
|
|
|
|
</dl>
|
|
|
|
<ul class="record_actions">
|
|
<li class="cancel">
|
|
<a class="sc-button bt-cancel" href="{{ path('chill_activity_activity_list', { 'person_id': person.id } ) }}">
|
|
{{ 'Back to the list'|trans }}
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a class="sc-button bt-update" href="{{ path('chill_activity_activity_edit', { 'id': entity.id, 'person_id': person.id }) }}">
|
|
{{ 'Edit the activity'|trans }}
|
|
</a>
|
|
</li>
|
|
{% if is_granted('CHILL_ACTIVITY_DELETE', entity) %}
|
|
<li>
|
|
<a href="{{ path('chill_activity_activity_delete', { 'id': entity.id, 'person_id' : person.id } ) }}" class="sc-button bt-delete">
|
|
{{ 'Delete'|trans }}
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
|
|
{% endblock personcontent %}
|