lostplaces-backend/django_lostplaces/lostplaces/templates/place/place_detail.html

141 lines
5.8 KiB
HTML
Raw Normal View History

{% extends 'global.html'%}
2020-07-27 18:49:50 +02:00
{% load static %}
2020-10-01 23:05:34 +02:00
{% load i18n %}
2020-08-27 09:06:24 +02:00
{% load thumbnail %}
{% load svg_icon %}
2021-04-02 22:00:13 +02:00
{% load lostplaces %}
2020-08-27 09:06:24 +02:00
{% block additional_head %}
2020-08-26 21:36:10 +02:00
<link rel="stylesheet" href="{% static 'maps/ol.css' %}" type="text/css">
<script src="{% static 'maps/ol.js' %}"></script>
2020-08-27 15:46:45 +02:00
<script src="{% static 'tagify.min.js' %}"></script>
{% endblock additional_head %}
{% block title %}{{place.name}}{% endblock %}
2020-08-10 19:36:42 +02:00
{% block additional_menu_items %}
<li class="LP-Menu__Item LP-Menu__Item--additional"><a href="{% url 'place_edit' pk=place.pk %}" class="LP-Link"><span class="LP-Link__Text">{% translate 'Edit place' %}</span></a></li>
<li class="LP-Menu__Item LP-Menu__Item--additional"><a href="{% url 'place_delete' pk=place.pk %}" class="LP-Link"><span class="LP-Link__Text">{% translate 'Delete place' %}</span></a></li>
2020-08-10 19:36:42 +02:00
{% endblock additional_menu_items %}
2020-08-26 21:36:10 +02:00
{% block maincontent %}
2020-08-10 19:06:45 +02:00
<article class="LP-PlaceDetail">
2020-08-30 18:39:45 +02:00
<header class="LP-PlaceDetail__Header">
<h1 class="LP-Headline">
{{ place.name }}
{% include 'partials/icons/place_favorite.html' %}
{% include 'partials/icons/place_visited.html' %}
{% if user.is_superuser %}
<a class="LP-Link" href="{{'/admin/lostplaces/place/'|addstr:place.id }}" target="_blank"><span class="LP-Link__Text">{% translate 'view place in admin panel' %}</span></a>
{% endif %}
</h1>
2021-04-10 08:23:36 +02:00
{% if place.get_hero_image %}
2021-04-02 17:22:28 +02:00
<div class="LP-PlaceDetail__Image">
2022-09-17 21:22:51 +02:00
{% include '../partials/image.html' with source_url=place.get_hero_image.filename.hero.url link_url="#image"|addstr:place.get_hero_index_in_queryset %}
2021-04-02 17:22:28 +02:00
</div>
2020-08-30 18:39:45 +02:00
{% endif %}
</header>
<div class="LP-PlaceDetail__Description">
<p class="LP-Paragraph">{{ place.description }}</p>
</div>
2021-12-30 23:20:05 +01:00
<div class="LP-Quickinfo">
<section class="LP-Section">
{% url 'place_tag_submit' place_id=place.id as tag_submit_url %}
2022-09-17 21:22:51 +02:00
{% include '../partials/tagging.html' with config=tagging_config %}
2021-12-30 23:20:05 +01:00
</section>
<section class="LP-Section">
2022-09-17 21:22:51 +02:00
{% include '../partials/voting.html' with voting=placevoting %}
2021-12-30 23:20:05 +01:00
</section>
</div>
2020-08-30 18:39:45 +02:00
<section class="LP-Section">
<h1 class="LP-Headline">{% translate 'Map links' %}</h1>
2022-09-17 21:22:51 +02:00
{% include '../partials/osm_map.html' with config=mapping_config %}
2021-12-30 23:20:05 +01:00
<ul class="LP-LinkList">
<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 RV-Iconized">
<span class="RV-Iconized__Text">
Google Maps
</span>
<span class="RV-Iconized__Icon RV-Iconized__Icon--left">
<i class="mdi mdi-map-outline"></i>
</span>
</span>
</a>
</li>
<li class="LP-LinkList__Item">
<a target="_blank" href="https://www.tim-online.nrw.de/tim-online2/?center={{place.latitude|safe}},{{place.longitude|safe}}&icon=true&bg=dop" class="LP-Link">
<span class="LP-Text RV-Iconized">
<span class="RV-Iconized__Text">
TIM Online
</span>
<span class="RV-Iconized__Icon RV-Iconized__Icon--left">
<i class="mdi mdi-map-outline"></i>
</span>
</span>
</a>
</li>
<li class="LP-LinkList__Item">
<a target="_blank" href="http://www.openstreetmap.org/?mlat={{place.latitude|safe}}&mlon={{place.longitude|safe}}&zoom=16" class="LP-Link">
<span class="LP-Text RV-Iconized">
<span class="RV-Iconized__Text">
OSM
</span>
<span class="RV-Iconized__Icon RV-Iconized__Icon--left">
<i class="mdi mdi-map-outline"></i>
</span>
</span>
</a>
</li>
</ul>
2020-08-30 18:39:45 +02:00
</section>
<section class=" LP-Section">
<h1 class="LP-Headline">{% translate 'Photo albums' %}</h1>
2020-08-30 18:39:45 +02:00
<div class="LP-LinkList">
<ul class="LP-LinkList__Container">
Squashed commit of the following: commit 0d62e72d72922a84e41c9f2cc21977b794784d1c Merge: 79fee63 85f2a81 Author: reverend <reverend@reverend2048.de> Date: Tue Sep 22 21:55:18 2020 +0200 Merge branch 'develop' into refactor/models commit 79fee631d7ac28509067ecdd74078f1a2f6e0be2 Author: reverend <reverend@reverend2048.de> Date: Tue Sep 22 21:54:32 2020 +0200 Updating references for related name commit 8e07e79df2de2601f2e2eadfdd37eb7c719c51b0 Author: reverend <reverend@reverend2048.de> Date: Tue Sep 22 21:53:31 2020 +0200 Generating of related names fix commit 5fd804f37a805ae4707e13c3d941bdde3660afea Merge: 8cc1d3e 3b526c9 Author: reverend <reverend@reverend2048.de> Date: Tue Sep 22 21:01:48 2020 +0200 Merge branch 'develop' into refactor/models commit 8cc1d3e690211dba6451e86569f00078b23e0621 Author: reverend <reverend@reverend2048.de> Date: Tue Sep 22 20:21:08 2020 +0200 Tests commit 7c0591e5397f892b1f6fb80725a693c21f90468a Author: reverend <reverend@reverend2048.de> Date: Fri Sep 18 23:53:39 2020 +0200 Testing PlaceAsset commit 2e7b49ad1a15173565c81e7eb8bb3f35b9f622a6 Author: reverend <reverend@reverend2048.de> Date: Fri Sep 18 22:25:08 2020 +0200 Restructuring models commit eb7d03b08b326f9115e70d0fd9ed5d0fc229a362 Author: reverend <reverend@reverend2048.de> Date: Fri Sep 18 22:01:54 2020 +0200 Abstract class Expireable commit 2b51e741bb5734c5a578beeadef7819fe58b2223 Author: reverend <reverend@reverend2048.de> Date: Fri Sep 18 21:54:07 2020 +0200 Abstract Model for PlaceAsset (i.e. Photoalbums)
2020-09-22 21:56:51 +02:00
{% for photo_album in place.photoalbums.all %}
2020-08-30 18:39:45 +02:00
<li class="LP-LinkList__Item">
<a target="_blank" href="{{photo_album.url}}" class="LP-Link">
<span class="LP-Text">{{photo_album.label}}</span>
</a>
2020-10-11 07:49:50 +02:00
{% if user.explorer == photo_album.submitted_by or user.explorer == place.submitted_by %}
2020-08-30 18:39:45 +02:00
<a href="{% url 'photo_album_delete' pk=photo_album.pk%}" class="LP-Link LP-LinkList__ItemHover" title="Delete Photo Album">
<div class="RV-Iconized__Container RV-Iconized__Container--small">
{% icon 'trash' className="RV-Iconized__Icon" %}
</div>
</a>
{% endif %}
</li>
{% endfor %}
<li class="LP-LinkList__Item">
<a href="{% url 'photo_album_create' place_id=place.id %}" class="LP-Link">
<div class="RV-Iconized__Container RV-Iconized__Container--small">
<svg class="RV-Iconized__Icon" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 512 512" xml:space="preserve">
<g>
<path d="M492,236H276V20c0-11.046-8.954-20-20-20c-11.046,0-20,8.954-20,20v216H20c-11.046,0-20,8.954-20,20s8.954,20,20,20h216
2020-08-26 21:36:10 +02:00
v216c0,11.046,8.954,20,20,20s20-8.954,20-20V276h216c11.046,0,20-8.954,20-20C512,244.954,503.046,236,492,236z" />
2020-08-30 18:39:45 +02:00
</g>
</svg>
<span class="RV-Iconized__Text">{% translate 'Add photo album' %}</span>
2020-08-30 18:39:45 +02:00
</div>
</a>
</li>
</ul>
</div>
</section>
<section class="LP-Section">
2021-04-02 22:00:13 +02:00
{% translate 'Images' as headline %}
2022-09-17 21:22:51 +02:00
{% include '../partials/placeImageGrid.html' with image_list=place.placeimages.all %}
2020-08-30 18:39:45 +02:00
</section>
2020-08-26 21:36:10 +02:00
2020-07-27 18:49:50 +02:00
</article>
{% endblock maincontent %}