set variable and partial template tag

This commit is contained in:
2021-04-02 22:00:13 +02:00
parent bae4e13137
commit fb1237f111
2 changed files with 97 additions and 5 deletions

View File

@@ -4,6 +4,7 @@
{% load thumbnail %}
{% load svg_icon %}
{% load lostplaces %}
{% block additional_head %}
<link rel="stylesheet" href="{% static 'maps/ol.css' %}" type="text/css">
@@ -26,7 +27,9 @@
<h1 class="LP-Headline">{{ place.name }}</h1>
{% if place.placeimages.first.filename.hero.url %}
<div class="LP-PlaceDetail__Image">
{% include 'partials/image.html' with source_url=place.placeimages.first.filename.hero.url %}
{% partial image %}
{% set source_url place.placeimages.first.filename.hero.url %}
{% endpartial %}
</div>
{% endif %}
</header>
@@ -38,13 +41,15 @@
<section class="LP-Section">
{% url 'place_tag_submit' place_id=place.id as tag_submit_url%}
{% include 'partials/tagging.html' with config=tagging_config %}
{% partial tagging %}
{% set config=tagging_config %}
{% endpartial %}
</section>
<section class="LP-Section">
<h1 class="LP-Headline">{% trans 'Map links' %}</h1>
{% include 'partials/osm_map.html' with config=mapping_config%}
{% partial osm_map config=mapping_config %}
<div class="LP-LinkList">
<ul class="LP-LinkList__Container">
<li class="LP-LinkList__Item"><a target="_blank" href="https://www.google.com/maps?q={{place.latitude|safe}},{{place.longitude|safe}}" class="LP-Link"><span class="LP-Text">Google Maps</span></a></li>
@@ -90,8 +95,8 @@
</section>
<section class="LP-Section">
{% translate 'Images' as t_images %}
{% include 'partials/placeImageGrid.html' with headline=t_images image_list=place.placeimages.all%}
{% translate 'Images' as headline %}
{% partial "placeImageGrid" image_list=place.placeimages.all %}
</section>
</article>