2020-09-29 21:11:55 +00:00
|
|
|
<div class="control">
|
2020-11-06 22:01:43 +00:00
|
|
|
<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>
|
2020-09-29 21:11:55 +00:00
|
|
|
{% if tag.identifier in user_tags %}
|
2020-11-06 22:01:43 +00:00
|
|
|
<button class="tag is-delete" type="submit">
|
|
|
|
<span class="is-sr-only">remove tag</span>
|
|
|
|
</button>
|
2020-09-29 21:11:55 +00:00
|
|
|
{% else %}
|
2020-11-06 22:01:43 +00:00
|
|
|
<button class="tag" type="submit">+
|
|
|
|
<span class="is-sr-only">add tag</span>
|
|
|
|
</button>
|
2020-09-29 21:11:55 +00:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
2020-11-06 22:01:43 +00:00
|
|
|
</form>
|
2020-02-21 06:19:19 +00:00
|
|
|
</div>
|