mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
improve layout of list when no report
This commit is contained in:
parent
8ebacb22ac
commit
7d19b4d8b7
@ -18,6 +18,7 @@ User: Utilisateur
|
|||||||
Report data: Données du rapport
|
Report data: Données du rapport
|
||||||
'Report view : %name%': 'Rapport : %name%'
|
'Report view : %name%': 'Rapport : %name%'
|
||||||
Report: Rapport
|
Report: Rapport
|
||||||
|
No report registered for this person.: Aucun rapport pour cette personne.
|
||||||
|
|
||||||
#Flash messages
|
#Flash messages
|
||||||
'Success : report created!': "Succès : le rapport a bien été créé !"
|
'Success : report created!': "Succès : le rapport a bien été créé !"
|
||||||
|
@ -21,27 +21,35 @@
|
|||||||
{% block title %}{{ 'Report list' |trans }}{% endblock title %}
|
{% block title %}{{ 'Report list' |trans }}{% endblock title %}
|
||||||
|
|
||||||
{% block personcontent %}
|
{% 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%">
|
<table class="" style="width:100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="chill-red">{{ 'Date' | trans }}</th>
|
<th class="chill-red">{{ 'Date' | trans }}</th>
|
||||||
<th class="chill-green">{{ 'Report type' | trans }}</th>
|
<th class="chill-green">{{ 'Report type' | trans }}</th>
|
||||||
<th class="chill-orange">{{ 'Circle' | trans }}</th>
|
<th class="chill-orange">{{ 'Circle' | trans }}</th>
|
||||||
<th></th>
|
<th>{{ 'Actions'|trans }}</th>
|
||||||
<th></th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% for report in reports %}
|
{% for report in reports %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% if report.date %}{{ report.date|localizeddate('long', 'none') }}{% endif %}</td>
|
<td>{% if report.date %}{{ report.date|localizeddate('long', 'none') }}{% endif %}</td>
|
||||||
<td>{{ report.cFGroup.getName(app.request.locale) }}</td>
|
<td>{{ report.cFGroup.getName|localize_translatable_string }}</td>
|
||||||
<td>{{ report.scope.name|localize_translatable_string }}</td>
|
<td>{{ report.scope.name|localize_translatable_string }}</td>
|
||||||
<td>
|
<td>
|
||||||
<ul class="record_actions">
|
<ul class="record_actions">
|
||||||
{% if is_granted('CHILL_REPORT_SEE', report) %}
|
{% if is_granted('CHILL_REPORT_SEE', report) %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ path('report_view', { 'person_id': report.person.id, 'report_id': report.id }) }}" class="sc-button black">{{ 'View the report' | trans | capitalize }}</a>
|
<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>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if is_granted('CHILL_REPORT_UPDATE', report) %}
|
{% if is_granted('CHILL_REPORT_UPDATE', report) %}
|
||||||
@ -55,4 +63,16 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</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 %}
|
{% endblock %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user