Skip to content

Commit

Permalink
Fix prevent missing theme map file
Browse files Browse the repository at this point in the history
  • Loading branch information
smdsgn committed Oct 28, 2024
1 parent 0186c4f commit 7e7b1cb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ <h3>Evolution de l'artificialisation entre {{ first_millesime }} et {{ last_mill
</div>
<div class="fr-col-12 fr-col-lg-4">
{% url 'project:theme-my-artif' project.pk as dynamic_map_url %}
{% include "project/components/widgets/static_map.html" with dynamic_map_url=dynamic_map_url src=project.theme_map_understand_artif.url title="Carte comprendre l'artificialisation de son territoire" %}
{% include "project/components/widgets/static_map.html" with dynamic_map_url=dynamic_map_url static_map=project.theme_map_understand_artif title="Carte comprendre l'artificialisation de son territoire" %}
</div>
</div>

Expand Down Expand Up @@ -259,7 +259,7 @@ <h3 id="conso-annuelle">Artificialisation nette entre {{ first_millesime }} et {
</div>
<div class="fr-col-12 fr-col-lg-4">
{% url 'project:theme-city-artif' project.pk as dynamic_map_url %}
{% include "project/components/widgets/static_map.html" with dynamic_map_url=dynamic_map_url src=project.theme_map_artif.url title="Carte artificialisation des communes du territoire sur la période (en ha)" %}
{% include "project/components/widgets/static_map.html" with dynamic_map_url=dynamic_map_url static_map=project.theme_map_artif title="Carte artificialisation des communes du territoire sur la période (en ha)" %}
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h3 id="conso-annuelle">Consommation d'espace annuelle sur le territoire</h3>
{% if not is_commune %}
<div class="fr-col-12 fr-col-lg-4">
{% url 'project:theme-city-conso' project.pk as dynamic_map_url %}
{% include "project/components/widgets/static_map.html" with dynamic_map_url=dynamic_map_url src=project.theme_map_conso.url title="Carte consommation d'espaces des communes du territoire sur la période (en ha)" %}
{% include "project/components/widgets/static_map.html" with dynamic_map_url=dynamic_map_url static_map=project.theme_map_conso title="Carte consommation d'espaces des communes du territoire sur la période (en ha)" %}
</div>
{% endif %}
</div>
Expand Down
2 changes: 1 addition & 1 deletion project/templates/project/components/dashboard/gpu.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ <h3>Synthèse des zonages d'urbanisme</h3>
</div>

<div class="fr-col-12 fr-col-lg-4">
{% include "project/components/widgets/static_map.html" with src=diagnostic.theme_map_gpu.url title="Carte présentant les zonages d'urbanisme du territoire" %}
{% include "project/components/widgets/static_map.html" with static_map=diagnostic.theme_map_gpu title="Carte présentant les zonages d'urbanisme du territoire" %}
</div>

</div>
Expand Down
4 changes: 2 additions & 2 deletions project/templates/project/components/widgets/static_map.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
<p class="fw-bold">
{{ title }}
</p>
{% if src %}
{% if static_map %}
<img
src="{{ src }}"
src="{{ static_map.url }}"
alt="{{ title }}"
>
{% else %}
Expand Down

0 comments on commit 7e7b1cb

Please sign in to comment.