Skip to content

Commit

Permalink
Merge pull request #568 from gildeluermoz/patch-1
Browse files Browse the repository at this point in the history
Ajout de 2 paramètres pour afficher ou pas les graph d'altitudes et de phénologie
  • Loading branch information
camillemonchicourt authored Aug 26, 2024
2 parents 2e5afea + e514c8a commit 5cfa411
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
6 changes: 6 additions & 0 deletions atlas/configuration/config.py.example
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,12 @@ RANG_STAT_FR = ['Faune invertébrée', 'Faune vertébrée', 'Flore']
####### FICHE ESPECE #######
############################

# Afficher le graphique des altitudes. Affichage True/False
AFFICHAGE_GRAPH_ALTITUDES = True

# Afficher le graphique de la phénologie. Affichage True/False
AFFICHAGE_GRAPH_PHENOLOGIE = True

# Rang taxonomique qui fixe jusqu'à quel taxon remonte la filiation taxonomique (hierarchie dans la fiche d'identite : Famille, Ordre etc... )
LIMIT_RANG_TAXONOMIQUE_HIERARCHIE = 13

Expand Down
2 changes: 2 additions & 0 deletions atlas/configuration/config_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ class Meta:
AFFICHAGE_RANG_STAT = fields.Boolean(load_default=True)
AFFICHAGE_NOUVELLES_ESPECES = fields.Boolean(load_default=True)
AFFICHAGE_RECHERCHE_AVANCEE = fields.Boolean(load_default=False)
AFFICHAGE_GRAPH_ALTITUDES = fields.Boolean(load_default=True)
AFFICHAGE_GRAPH_PHENOLOGIE = fields.Boolean(load_default=True)

RANG_STAT = fields.List(
fields.Dict,
Expand Down
20 changes: 12 additions & 8 deletions atlas/templates/speciesSheet/charts.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
{% block charts %}
<div class="card mt-4" id="graphBloc">
<h4 class="title-bar title-spaced center strong">{{ _('alt.classes.obs') }}</h4>
<div class="chart-container" style="position: relative; height:200px; width:100%">
<canvas id="altiChart"></canvas>
</div>
<h4 class="title-bar title-spaced center strong">{{ _('monthly.obs') }}</h4>
<div class="chart-container" style="position: relative; height:200px; width:100%">
<canvas id="monthChart"></canvas>
{% if configuration.AFFICHAGE_GRAPH_ALTITUDES %}
<h4 class="title-bar title-spaced center strong">{{ _('alt.classes.obs') }}</h4>
<div class="chart-container" style="position: relative; height:200px; width:100%">
<canvas id="altiChart"></canvas>
{% endif %}
</div>
{% if configuration.AFFICHAGE_GRAPH_PHENOLOGIE %}
<h4 class="title-bar title-spaced center strong">{{ _('monthly.obs') }}</h4>
<div class="chart-container" style="position: relative; height:200px; width:100%">
<canvas id="monthChart"></canvas>
</div>
{% endif %}
</div>
{% endblock %}
{% endblock %}

0 comments on commit 5cfa411

Please sign in to comment.