add an icon when the file is opened / closed in result list, and in person rendering macro

This commit is contained in:
2019-07-02 13:18:34 +02:00
parent 2aecaae749
commit 0ccc998e52
5 changed files with 37 additions and 6 deletions

View File

@@ -30,7 +30,7 @@
<table>
<thead>
<tr>
<th class="chill-red">{% trans %}Name{% endtrans %}</th>
<th class="chill-red">{% trans %}Name{% endtrans %}</th>
<th class="chill-green">{% trans %}Date of birth{% endtrans %}</th>
<th class="chill-orange">{% trans %}Nationality{% endtrans %}</th>
</tr>
@@ -39,11 +39,16 @@
{% for person in persons %}
<tr>
<td>
<a href="{{ path('chill_person_view', {person_id : person.getId}) }}">
{% set is_open = person.isOpen() %}
<a href="{{ path('chill_person_view', { person_id : person.getId }) }}" {% if chill_person.fields.accompanying_period == 'visible' %}{% if is_open %} alt="{{ 'An accompanying period is open'|trans|e('html_attr') }}"{% else %} alt="{{ 'Any accompanying periods are open'|trans|e('html_attr') }}" {% endif %}{% endif %}>
{{person.firstName}} {{person.lastName}}
{% spaceless %}
{% if person.isOpen == false %}
<i class="icon-lock"></i>
{% if chill_person.fields.accompanying_period == 'visible' %}
{% if is_open == false %}
<i class="fa fa-folder" ></i>
{% else %}
<i class="fa fa-folder-open" ></i>
{% endif %}
{% endif %}
{% endspaceless %}
</a>