forked from mirrors/bookwyrm
22 lines
841 B
HTML
22 lines
841 B
HTML
<div class="control">
|
|
<form name="tag" action="/{% if tag.identifier in user_tags %}untag{% else %}tag{% endif %}/" method="post">
|
|
{% csrf_token %}
|
|
<input type="hidden" name="book" value="{{ book.id }}">
|
|
<input type="hidden" name="name" value="{{ tag.name }}">
|
|
|
|
<div class="tags has-addons">
|
|
<a class="tag" href="/tag/{{ tag.identifier|urlencode }}">
|
|
{{ tag.name }}
|
|
</a>
|
|
{% if tag.identifier in user_tags %}
|
|
<button class="tag is-delete" type="submit">
|
|
<span class="is-sr-only">remove tag</span>
|
|
</button>
|
|
{% else %}
|
|
<button class="tag" type="submit">+
|
|
<span class="is-sr-only">add tag</span>
|
|
</button>
|
|
{% endif %}
|
|
</div>
|
|
</form>
|
|
</div>
|