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"> <section class="LP-Section">
<h1 class="LP-Headline">Map-Links</h1> <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"> <div class="LP-LinkList">
<ul class="LP-LinkList__Container"> <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> <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) place = Place.objects.get(pk=pk)
context = { context = {
'place': place, 'place': place,
'place_list': [ place ], 'map_config': {
'place_map_center': [ place.latitude, place.longitude ], 'point_list': [ place ],
'map_center': {'latitude': place.latitude, 'longitude': place.longitude},
},
'tagging_config': { 'tagging_config': {
'all_tags': Tag.objects.all(), 'all_tags': Tag.objects.all(),
'submit_form': TagSubmitForm(), 'submit_form': TagSubmitForm(),