Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ajout de 2 paramètres pour afficher ou pas les graph d'altitudes et de phénologie #568

Merged
merged 3 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 %}
Loading