lostplaces-backend/django_lostplaces/lostplaces/templates/partials/icons/place_visited.html

14 lines
523 B
HTML
Raw Normal View History

{%load static %}
{% load i18n %}
{% if request.user %}
{% if place in request.user.explorer.visited_places.all %}
<a href="{% url 'place_visit_delete' place_id=place.id %}" class="LP-Link" title="{% trans 'Remove from visits' %}">
<img class="LP-Icon" src="{% static '/icons/pin_filled.svg' %}" />
</a>
{%else%}
<a href="{% url 'place_visit_create' place_id=place.id %}" class="LP-Link" title="{% trans 'Save as visited' %}">
<img class="LP-Icon" src="{% static '/icons/pin.svg' %}" />
</a>
{% endif %}
{% endif %}