2021-05-11 21:41:28 +00:00
|
|
|
{% load interaction %}
|
|
|
|
{% load utilities %}
|
2021-02-28 02:48:10 +00:00
|
|
|
{% load i18n %}
|
2021-05-11 21:41:28 +00:00
|
|
|
|
2020-11-08 02:59:38 +00:00
|
|
|
{% with status.id|uuid as uuid %}
|
2021-05-23 01:34:34 +00:00
|
|
|
{% with request.user|liked:status as liked %}
|
2021-08-23 20:02:27 +00:00
|
|
|
<form
|
|
|
|
name="favorite"
|
|
|
|
action="/favorite/{{ status.id }}"
|
|
|
|
method="POST"
|
|
|
|
class="interaction fav_{{ status.id }}_{{ uuid }} {% if liked %}is-hidden{% endif %}"
|
|
|
|
data-id="fav_{{ status.id }}_{{ uuid }}"
|
|
|
|
>
|
2020-11-05 19:40:03 +00:00
|
|
|
{% csrf_token %}
|
2021-04-21 20:32:14 +00:00
|
|
|
<button class="button is-small is-light is-transparent" type="submit">
|
2021-08-23 20:02:27 +00:00
|
|
|
<span class="icon icon-heart m-0-mobile" title="{% trans 'Like' %}"></span>
|
2021-04-21 20:32:14 +00:00
|
|
|
<span class="is-sr-only-mobile">{% trans "Like" %}</span>
|
2020-11-05 19:40:03 +00:00
|
|
|
</button>
|
|
|
|
</form>
|
2021-08-23 20:02:27 +00:00
|
|
|
|
|
|
|
<form
|
|
|
|
name="unfavorite"
|
|
|
|
action="/unfavorite/{{ status.id }}"
|
|
|
|
method="POST"
|
|
|
|
class="interaction fav_{{ status.id }}_{{ uuid }} active {% if not liked %}is-hidden{% endif %}"
|
|
|
|
data-id="fav_{{ status.id }}_{{ uuid }}"
|
|
|
|
>
|
2020-11-05 19:40:03 +00:00
|
|
|
{% csrf_token %}
|
2021-04-21 20:32:14 +00:00
|
|
|
<button class="button is-light is-transparent is-small" type="submit">
|
|
|
|
<span class="icon icon-heart has-text-primary m-0-mobile" title="{% trans 'Un-like' %}"></span>
|
|
|
|
<span class="is-sr-only-mobile">{% trans "Un-like" %}</span>
|
2020-11-05 19:40:03 +00:00
|
|
|
</button>
|
|
|
|
</form>
|
|
|
|
{% endwith %}
|
2021-05-23 01:34:34 +00:00
|
|
|
{% endwith %}
|