Implemented tag that checks if user is authorized.
This commit is contained in:
@@ -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">
|
||||
@@ -36,10 +37,8 @@
|
||||
</div>
|
||||
|
||||
<section class="LP-Section">
|
||||
|
||||
{% url 'place_tag_submit' place_id=place.id as tag_submit_url%}
|
||||
{% include 'partials/tagging.html' with config=tagging_config %}
|
||||
|
||||
</section>
|
||||
|
||||
<section class="LP-Section">
|
||||
@@ -63,7 +62,8 @@
|
||||
<a target="_blank" href="{{photo_album.url}}" class="LP-Link">
|
||||
<span class="LP-Text">{{photo_album.label}}</span>
|
||||
</a>
|
||||
{% if user.explorer == photo_album.submitted_by or user.explorer == place.submitted_by %}
|
||||
{% can_modify_place_asset photo_album request as authorized %}
|
||||
{% if authorized %}
|
||||
<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" %}
|
||||
@@ -98,7 +98,8 @@
|
||||
<a href="{{ place_image.filename.large.url }}" class="LP-Link">
|
||||
<img class="LP-Image" src="{{ place_image.filename.thumbnail.url }}">
|
||||
</a>
|
||||
{% if user.explorer == place_image.submitted_by or user.explorer == place.submitted_by %}
|
||||
{% can_modify_place_asset place_image request as authorized %}
|
||||
{% if authorized %}
|
||||
<span class="LP-ImageGrid__DeleteItem" title="Bild löschen">
|
||||
<a href="{% url 'place_image_delete' pk=place_image.id %}" class="LP-Link">
|
||||
<img class="LP-Icon" src="{% static 'icons/cancel.svg' %}" />
|
||||
|
Reference in New Issue
Block a user