Fix templates + add public wanted reason

This commit is contained in:
Xbird
2022-11-25 10:23:02 +00:00
parent 5f4f9c37f5
commit 5ae08ebd13
9 changed files with 65 additions and 7 deletions

View File

@@ -63,7 +63,10 @@
{% if directory.hasnopapers %}
<li class="list-group-item"><span class="fa-li"><i class="fas fa-scroll"></i></span>{% trans %}title_hasnopapers{% endtrans %}</li>
{% endif %}
{% if directory.wanted %}
{% endif %}
{% if app.user %}
{% if directory.wanted and ( app.user.hasPermission('general_legal_view') or directory.wantedPublicReason) %}
<li class="list-group-item text-danger"><span class="fa-li"><i class="far fa-id-badge"></i></span>{% trans %}title_directory_wanted_light{% endtrans %} : {{ directory.wantedReason | default('value_no_value'|trans) }}</li>
{% endif %}
{% endif %}
@@ -73,7 +76,7 @@
<div class="card-body">
{{ directory.address | default('value_no_value'|trans) | raw }}
</div>
</div>
</div>
</div>
</div>
{% if app.user and app.user.hasPermission('general_medical_view') %}

View File

@@ -15,7 +15,10 @@
<div class="row align-items-center m-b-0">
<div class="col">
<h6 class="m-b-5">{% trans %}title_wanted{% endtrans %}</h6>
<h3 class="m-b-0">{{i.fullname}}</h3>
<h3 class="m-b-0 fw-bold">{{i.fullname}}</h3>
{% if i.wantedPublicReason %}
<h4 class="m-b-0 text-danger">{{i.wantedReason}}</h4>
{% endif %}
</div>
<div class="col-auto">
<a data-toggle="lightbox" data-gallery="wanted"