mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-24 00:23:50 +00:00
add an icon when the file is opened / closed in result list, and in person rendering macro
This commit is contained in:
@@ -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>
|
||||
|
@@ -1 +1,19 @@
|
||||
{% macro render(p, withLink=true) %}<span class="entity entity-person person-person">{% if withLink %}<a href="{{ path('chill_person_view', { 'person_id' : p.id } ) }}">{% endif %}{{ p.firstName }} {{ p.lastName }}{% if withLink %}</a>{% endif %}</span>{% endmacro %}
|
||||
{% macro render(p, withLink=true, withClosingInfo=false) %}{%spaceless %}
|
||||
<span class="entity entity-person person-person">
|
||||
{% if withLink %}
|
||||
<a href="{{ path('chill_person_view', { 'person_id' : p.id } ) }}">
|
||||
{% endif %}
|
||||
{{ p.firstName }} {{ p.lastName }}
|
||||
{% if withClosingInfo %}
|
||||
{% if chill_person.fields.accompanying_period == 'visible' %}
|
||||
{% set is_open = p.isOpen() %}
|
||||
{% if is_open == false %}
|
||||
<i class="fa fa-folder" ></i>
|
||||
{% else %}
|
||||
<i class="fa fa-folder-open" ></i>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if withLink %}</a>{% endif %}
|
||||
</span>{% endspaceless %}
|
||||
{% endmacro %}
|
||||
|
Reference in New Issue
Block a user