mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-20 09:14:23 +00:00
79 lines
3.2 KiB
Twig
79 lines
3.2 KiB
Twig
{#
|
|
* Copyright (C) 2014, Champs Libres Cooperative SCRLFS, <http://www.champs-libres.coop>
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU Affero General Public License as
|
|
* published by the Free Software Foundation, either version 3 of the
|
|
* License, or (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU Affero General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
#}
|
|
{% extends "ChillPersonBundle::layout.html.twig" %}
|
|
|
|
{% set activeRouteKey = 'report_select_type' %}
|
|
|
|
{% block title %}{{ 'Report list' |trans }}{% endblock title %}
|
|
|
|
{% block personcontent %}
|
|
|
|
<h1>{{ 'Report list'|trans }}</h1>
|
|
|
|
{% if reports|length == 0 %}
|
|
<p style="text-align:center;">
|
|
<span class="chill-no-data-statement">{{ "No report registered for this person."|trans }}</span>
|
|
<a href="{{ path('report_select_type', { 'person_id' : person.id } ) }}">{{ 'Create a new report'|trans }}</a>
|
|
</p>
|
|
{% else %}
|
|
<table class="" style="width:100%">
|
|
<thead>
|
|
<tr>
|
|
<th class="chill-red">{{ 'Date' | trans }}</th>
|
|
<th class="chill-green">{{ 'Report type' | trans }}</th>
|
|
<th class="chill-orange">{{ 'Circle' | trans }}</th>
|
|
<th>{{ 'Actions'|trans }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for report in reports %}
|
|
<tr>
|
|
<td>{% if report.date %}{{ report.date|localizeddate('long', 'none') }}{% endif %}</td>
|
|
<td>{{ report.cFGroup.getName|localize_translatable_string }}</td>
|
|
<td>{{ report.scope.name|localize_translatable_string }}</td>
|
|
<td>
|
|
<ul class="record_actions">
|
|
{% if is_granted('CHILL_REPORT_SEE', report) %}
|
|
<li>
|
|
<a href="{{ path('report_view', { 'person_id': report.person.id, 'report_id': report.id }) }}" class="sc-button bt-view">{{ 'View the report' | trans | capitalize }}</a>
|
|
</li>
|
|
{% endif %}
|
|
{% if is_granted('CHILL_REPORT_UPDATE', report) %}
|
|
<li>
|
|
<a href="{{ path('report_edit', { 'person_id': report.person.id, 'report_id': report.id }) }}" class="sc-button bt-update">{{ 'Update' | trans }}</a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
{% endif %}
|
|
|
|
<ul class="record_actions">
|
|
<li>
|
|
<a href="{{ path('report_select_type', { 'person_id' : person.id } ) }}" class="sc-button bt-new">
|
|
<i class="fa fa-plus"></i>
|
|
{{ 'Create a new report'|trans }}
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
|
|
{% endblock %}
|