moviewyrm/bookwyrm/templates/snippets/boost_button.html

21 lines
1 KiB
HTML
Raw Normal View History

2020-12-13 02:25:04 +00:00
{% load bookwyrm_tags %}
2020-12-18 17:30:08 +00:00
2020-11-08 02:59:38 +00:00
{% with status.id|uuid as uuid %}
<form name="boost" action="/boost/{{ status.id }}" method="post" class="interaction boost-{{ status.id }}-{{ uuid }} {% if request.user|boosted:status %}hidden{% endif %}" data-id="boost-{{ status.id }}-{{ uuid }}">
{% csrf_token %}
2020-12-18 17:30:08 +00:00
<button class="button is-small" type="submit" {% if not status.boostable %}disabled{% endif %}>
2021-01-14 22:13:23 +00:00
<span class="icon icon-boost" title="Boost status">
<span class="is-sr-only">Boost status</span>
</span>
</button>
</form>
<form name="unboost" action="/unboost/{{ status.id }}" method="post" class="interaction boost-{{ status.id }}-{{ uuid }} active {% if not request.user|boosted:status %}hidden{% endif %}" data-id="boost-{{ status.id }}-{{ uuid }}">
{% csrf_token %}
<button class="button is-small is-success" type="submit">
2021-01-14 22:13:23 +00:00
<span class="icon icon-boost" title="Un-boost status">
<span class="is-sr-only">Un-boost status</span>
</span>
</button>
</form>
{% endwith %}