favorite partial
This commit is contained in:
parent
c7b699f615
commit
d547ee9db3
@ -0,0 +1,14 @@
|
|||||||
|
{%load static %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
|
{% if request.user %}
|
||||||
|
{% if place in request.user.explorer.favorite_places.all %}
|
||||||
|
<a href="{% url 'place_unfavorite' place_id=place.id %}" class="LP-Link" title="{% trans 'Remove from favorites' %}">
|
||||||
|
<img class="LP-Icon" src="{% static '/icons/favourite_filled.svg' %}" />
|
||||||
|
</a>
|
||||||
|
{%else%}
|
||||||
|
<a href="{% url 'place_favorite' place_id=place.id %}" class="LP-Link" title="{% trans 'Save as favorite' %}">
|
||||||
|
<img class="LP-Icon" src="{% static '/icons/favourite.svg' %}" />
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
Loading…
Reference in New Issue
Block a user