Skip to content

Commit

Permalink
Cacher section statuts vide
Browse files Browse the repository at this point in the history
  • Loading branch information
marcantoinedupre committed Jan 22, 2025
1 parent cc028c7 commit 11d1034
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion atlas/atlasRoutes.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,10 +343,11 @@ def is_statut_in_groupe(statut, groupe):
groupes_statuts = []
for config_groupe in current_app.config["GROUPES_STATUTS"]:
groupe = {"label": config_groupe.get("label", ""), "statuts": []}
groupes_statuts.append(groupe)
for statut in statuts:
if is_statut_in_groupe(statut, config_groupe):
groupe["statuts"].append(statut)
if groupe["statuts"]:
groupes_statuts.append(groupe)
return groupes_statuts


Expand Down
2 changes: 1 addition & 1 deletion atlas/templates/speciesSheet/identityCard.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ <h4 class="strong"><i>{{ taxon.taxonSearch.nom_complet_html|safe }} </i></h4>
</div>
</div>

{% if configuration.AFFICHAGE_STATUTS %}
{% if configuration.AFFICHAGE_STATUTS and groupesStatuts|length != 0 %}
{% include url_for('static', filename='custom/templates/statuts.html') %}
{% endif %}

Expand Down

0 comments on commit 11d1034

Please sign in to comment.