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

Fix/gen pdf #46

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from
4 changes: 2 additions & 2 deletions backend/gn_module_zh/templates/delimitation.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ <h5 class="subtitle">Critères de délimitation de la zone humide</h5>
</section>
<section class="content col">
<h5 class="subtitle">Critères de délimitation de l'espace de fonctionnalité</h5>
<span class="small-title"><b>Critères utilisés : </b><span><br>
<span class="small-title"><b>Critères utilisés :</b></span><br>
{% for critere in data['delimitation']['delimitation_fonctions']['critere'] %}
<span class="small-title">{{ critere }}</span><br>
{% endfor %}
<span class="small-title"><b>Remarques : </b>{{ data['delimitation']['delimitation_fonctions']['remark'] or 'Aucune' }}</span>
</section>
</div>
</div>
22 changes: 14 additions & 8 deletions backend/gn_module_zh/templates/fiche_template_pdf.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,17 @@ <h1 class="title">Renseignements généraux</h1>
<div class="new-page">
<h1 class="title">Délimitation de la zone humide et de son espace de fonctionnalité</h1>
{% include 'delimitation.html' %}
<h1 class="title">Principaux types de milieux humides (H) ou potentiellement humides (P)</h1>
{% include 'milieux.html' %}
<h1 class="title">Principaux types de milieux humides (H) ou potentiellement humides (P)</h1>
{% include 'milieux.html' %}
<h1 class="title">Fonctionnement de la zone humide</h1>
{% include 'fonctionnement.html' %}
</div>
<div class="new-page">
<h1 class="title">Usages ou processus naturels</h1>
{% include 'usages.html' %}
<h1 class="title">Statuts et gestion de la zone humide</h1>
{% include 'statuts.html' %}
</div>
<h1 class="title">Fonctionnement de la zone humide</h1>
{% include 'fonctionnement.html' %}
<h1 class="title">Usages ou processus naturels</h1>
{% include 'usages.html' %}
<h1 class="title">Statuts et gestion de la zone humide</h1>
{% include 'statuts.html' %}
<div class="new-page">
<h1 class="title">Évaluation générale du site</h1>
{% include 'evaluation.html' %}
Expand Down Expand Up @@ -215,5 +217,9 @@ <h1 class="title">Évaluation générale du site</h1>
border-bottom: solid 1px;
}

span {
white-space: pre-wrap;
}

</style>
</html>
20 changes: 16 additions & 4 deletions backend/gn_module_zh/templates/fonctionnement.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,17 @@ <h5 class="subtitle">Régime hydrique</h5>
{% endfor %}
</tbody>
</table>
<span class="small-title"><b>Fréquence des submersions : </b>{{ data['fonctionnement']['regime']['entree']['frequence'] or 'Non déterminé' }}</span><br>
<span class="small-title"><b>Étendue des submersions : </b>{{ data['fonctionnement']['regime']['entree']['etendue'] or 'Non déterminé' }}</span>
</section>
<br>
<section class="content">
<h5 class="subtitle">Connexion de la zone humide dans son environnement</h5>
<span class="small-title">
<b>{{ data['fonctionnement']['connexion'] }}</b>
</span>
{% if data['fonctionnement']['connexion'] %}
<span class="small-title"><b>{{ data['fonctionnement']['connexion'] }}</b></span>
{% else %}
<span class="small-title">Non déterminé</span>
{% endif %}
{% set connexions = {
"Aucune connexion": "aucune_connexion.svg",
"Entrée et sortie": "entree_sortie.svg",
Expand All @@ -53,4 +58,11 @@ <h5 class="subtitle">Connexion de la zone humide dans son environnement</h5>
} %}
<img src="{{ url_for('pr_zh.static', filename=connexions[data['fonctionnement']['connexion']]) }}">
</section>
</div>
<br>
<section class="content">
<h5 class="subtitle">Diagnostic fonctionnel</h5>
<span class="small-title"><b>Fonctionnalité hydrologique / biogéochimique : </b>{{ data['fonctionnement']['diagnostic']['hydrologique'] or 'Non évaluée' }}</span><br>
<span class="small-title"><b>Fonctionnalité biologique / écologique : </b>{{ data['fonctionnement']['diagnostic']['biologique'] or 'Non évaluée' }}</span><br>
<span class="small-title"><b>Remarques : </b>{{ data['fonctionnement']['diagnostic']['commentaires'] or 'Aucune' }}</span>
</section>
</div>
3 changes: 2 additions & 1 deletion backend/gn_module_zh/templates/milieux.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ <h5 class="subtitle">Corine Biotope</h5>
{% endfor %}
</tbody>
</table>
<span class="small-title"><b>Remarques : </b>{{ data['description']['presentation']['remarques'] or 'Aucune' }}</span>
</section>
</div>
{% if data['image_name'] is not none %}
Expand All @@ -41,4 +42,4 @@ <h5 class="subtitle">Corine Biotope</h5>
</div>
{% endif %}
-->
</div>
</div>
6 changes: 5 additions & 1 deletion backend/gn_module_zh/templates/renseignements.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
<label>Typologie SDAGE</label>
<span>{{ data['description']['presentation']['sdage'] }}</span>
</div>
<div class="fieldset">
<label>Typologie SAGE</label>
<span>{{ data['description']['presentation']['typologie_locale'] or '' }}</span>
</div>
<div class="fieldset">
<label>Bassin versant</label>
{% for basin in data['description']['basin']['basins'] %}
Expand Down Expand Up @@ -108,4 +112,4 @@
{% endif %}
</div>
</div>
</section>
</section>
7 changes: 3 additions & 4 deletions backend/gn_module_zh/templates/statuts.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,8 @@ <h5 class="subtitle">
{% else %}
{% for ref in data['statuts']['autres_inventaires'][type['zh_name']] %}
<span>
{{ ref.area_code }} -
<a href="{{ ref.url }}">{{ ref.area_name }}</a>
</span><br>
{{ ref.area_code }} - <a href="{{ ref.url }}">{{ ref.area_name }}</a>
</span>
{% endfor %}
{% endif %}
</td>
Expand Down Expand Up @@ -145,4 +144,4 @@ <h5 class="subtitle">
</tbody>
</table>
</section>
</div>
</div>