Adapting place detail view

This commit is contained in:
reverend 2020-09-12 11:42:31 +02:00
parent fed90d4f7b
commit e1002b5315
2 changed files with 5 additions and 3 deletions

View File

@ -43,7 +43,7 @@
<section class="LP-Section">
<h1 class="LP-Headline">Map-Links</h1>
{% include 'partials/osm_map.html' %}
{% include 'partials/osm_map.html' with config=map_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}},{{place.longitude}}" class="LP-Link"><span class="LP-Text">Google Maps</span></a></li>

View File

@ -31,8 +31,10 @@ class PlaceDetailView(IsAuthenticated, View):
place = Place.objects.get(pk=pk)
context = {
'place': place,
'place_list': [ place ],
'place_map_center': [ place.latitude, place.longitude ],
'map_config': {
'point_list': [ place ],
'map_center': {'latitude': place.latitude, 'longitude': place.longitude},
},
'tagging_config': {
'all_tags': Tag.objects.all(),
'submit_form': TagSubmitForm(),