2021-05-11 21:41:28 +00:00
|
|
|
{% load interaction %}
|
|
|
|
{% load utilities %}
|
2021-02-28 02:48:10 +00:00
|
|
|
{% load i18n %}
|
2020-12-18 17:30:08 +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|boosted:status as boosted %}
|
|
|
|
<form
|
|
|
|
name="boost"
|
|
|
|
action="/boost/{{ status.id }}"
|
|
|
|
method="post"
|
2021-08-09 01:40:47 +00:00
|
|
|
class="interaction boost_{{ status.id }}_{{ uuid }}{% if boosted %} is-hidden{% endif %}"
|
|
|
|
data-id="boost_{{ status.id }}_{{ uuid }}"
|
2021-05-23 01:34:34 +00:00
|
|
|
>
|
2020-11-05 19:40:03 +00:00
|
|
|
{% csrf_token %}
|
2021-05-23 01:34:34 +00:00
|
|
|
<button
|
|
|
|
class="button is-small is-light is-transparent"
|
|
|
|
type="submit"
|
|
|
|
{% if not status.boostable %}disabled{% endif %}
|
|
|
|
>
|
2021-04-21 20:32:14 +00:00
|
|
|
<span class="icon icon-boost m-0-mobile" title="{% trans 'Boost' %}"></span>
|
|
|
|
<span class="is-sr-only-mobile">{% trans "Boost" %}</span>
|
2020-11-05 19:40:03 +00:00
|
|
|
</button>
|
|
|
|
</form>
|
2021-05-23 01:34:34 +00:00
|
|
|
<form
|
|
|
|
name="unboost"
|
|
|
|
action="/unboost/{{ status.id }}"
|
|
|
|
method="post"
|
2021-08-09 01:40:47 +00:00
|
|
|
class="interaction boost_{{ status.id }}_{{ uuid }} active {% if not boosted %}is-hidden{% endif %}"
|
|
|
|
data-id="boost_{{ status.id }}_{{ uuid }}"
|
2021-05-23 01:34:34 +00:00
|
|
|
>
|
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">
|
|
|
|
<span class="icon icon-boost has-text-primary m-0-mobile" title="{% trans 'Un-boost' %}"></span>
|
|
|
|
<span class="is-sr-only-mobile">{% trans "Un-boost" %}</span>
|
2020-11-05 19:40:03 +00:00
|
|
|
</button>
|
|
|
|
</form>
|
|
|
|
{% endwith %}
|
2021-05-23 01:34:34 +00:00
|
|
|
{% endwith %}
|