Skip to content

Commit

Permalink
Affichage chaine de caractère vide et non pas None (#566)
Browse files Browse the repository at this point in the history
Affichage chaine de caractère vide et non pas None
---------

Co-authored-by: jacquesfize <jacques.fize@ecrins-parcnational.fr>
  • Loading branch information
amandine-sahl and jacquesfize authored Oct 4, 2024
1 parent bebf081 commit d3aeea8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
21 changes: 10 additions & 11 deletions apptax/admin/templates/admin/details_taxref.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ <h5 class="card-title col-1">
</tr>
<tr>
<th class="col-5"> Nom vernaculaire</th>
<td class="col-5"> {{model.nom_vern}} </th>
<td class="col-5"> {{model.nom_vern or ''}} </th>
</tr>
<tr>
<th class="col-5"> Auteur</th>
<td class="col-5"> {{model.lb_auteur}} </th>
<td class="col-5"> {{model.lb_auteur or ''}} </th>
</tr>
<tr>
<th class="col-5"> Nom vernaculaire anglais</th>
<td class="col-5"> {{model.nom_vern}} </th>
<td class="col-5"> {{model.nom_vern_eng or ''}} </th>
</tr>
<tr>
<th class="col-5"> cd_nom </th>
Expand All @@ -114,23 +114,22 @@ <h5 class="card-title col-1">
{% endif %}
<tr>
<th class="col-5"> Group 1 INPN </th>
<td class="col-5"> {{model.group1_inpn}} </th>
<td class="col-5"> {{model.group1_inpn or ''}} </th>
</tr>
<tr>
<th class="col-5"> Group 2 INPN </th>
<td class="col-5"> {{model.group2_inpn}} </th>
<td class="col-5"> {{model.group2_inpn or ''}} </th>
</tr>
<tr>
<th class="col-5"> Rang </th>
<td class="col-5"> {{model.rang.nom_rang}} </th>
<td class="col-5"> {{model.rang.nom_rang or ''}} </th>
</tr>
</table>

</div>

<div class="tab-pane fade" id="nav-lists" role="tabpanel" aria-labelledby="nav-lists-tab">
<table class="table table-striped mt-3">
{{model.liste}}
{% for liste in model.listes %}
<tr>
<td>
Expand Down Expand Up @@ -184,10 +183,10 @@ <h5 class="card-title"> {{theme}} </h5>
<a target='_blank' href='{{ media.media_url }}'>Lien média</a>
{% endif %}
</td>
<td> {{media.titre}} </td>
<td> {{media.desc_media}} </td>
<td> {{media.auteur}} </td>
<td> {{media.types.nom_type_media}} </td>
<td> {{media.titre or ''}} </td>
<td> {{media.desc_media or ''}} </td>
<td> {{media.auteur or ''}} </td>
<td> {{media.types.nom_type_media or ''}} </td>
</tr>

{% endfor %}
Expand Down
10 changes: 5 additions & 5 deletions apptax/admin/templates/admin/list_taxref.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@
{% endmacro %}

{% macro render_nom_ref(model, column) %}
{% if model.cd_nom == model.cd_ref %}
<strong> {{ model|attr(column)}} </strong>
{% else %}
{{ model|attr(column)}}
{% endif %}
{% if model.cd_nom == model.cd_ref %}
<strong> {{ model|attr(column) or ''}} </strong>
{% else %}
{{ model|attr(column) or ''}}
{% endif %}
{% endmacro %}

{% block model_menu_bar %}
Expand Down

0 comments on commit d3aeea8

Please sign in to comment.