only submitted can delete tags

This commit is contained in:
reverend 2020-09-02 00:25:31 +02:00
parent 47718ce17b
commit 8ab0e1b177

View File

@ -4,8 +4,9 @@
<li class="LP-TagList__Item"> <li class="LP-TagList__Item">
<div class="LP-Tag"> <div class="LP-Tag">
<a href="#" class="LP-Link"> <a href="#" class="LP-Link">
</a>
<span class="LP-Link__Text">{{tag}}</span> <span class="LP-Link__Text">{{tag}}</span>
</a>
{% if request.user and request.user == config.tagged_item.submitted_by %}
<a href="{% url config.delete_url_name tagged_id=config.tagged_item.id tag_id=tag.id %}" class="LP-Link"> <a href="{% url config.delete_url_name tagged_id=config.tagged_item.id tag_id=tag.id %}" class="LP-Link">
<span class="LP-Tag__Remove RV-Iconized__Container RV-Iconized__Container--extraSmall"> <span class="LP-Tag__Remove RV-Iconized__Container RV-Iconized__Container--extraSmall">
<svg class="RV-Iconized__Icon" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"> <svg class="RV-Iconized__Icon" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
@ -15,6 +16,7 @@
</svg> </svg>
</span> </span>
</a> </a>
{% endif %}
</div> </div>
</li> </li>
{% endfor %} {% endfor %}