2020-02-21 06:19:19 +00:00
|
|
|
<div class="tag">
|
2020-02-21 17:10:27 +00:00
|
|
|
<a href="/tag/{{ tag.identifier }}">{{ tag.name }}</a>
|
2020-02-21 06:19:19 +00:00
|
|
|
{% if tag.name in user_tags %}
|
|
|
|
<form class="tag-form" name="tag" action="/untag/" method="post">
|
|
|
|
{% csrf_token %}
|
|
|
|
<input type="hidden" name="book" value="{{ book.openlibrary_key }}"></input>
|
|
|
|
<input type="hidden" name="name" value="{{ tag.name }}"></input>
|
|
|
|
<button type="submit">x</button>
|
|
|
|
</form>
|
|
|
|
{% else %}
|
|
|
|
<form class="tag-form" name="tag" action="/tag/" method="post">
|
|
|
|
{% csrf_token %}
|
|
|
|
<input type="hidden" name="book" value="{{ book.openlibrary_key }}"></input>
|
|
|
|
<input type="hidden" name="name" value="{{ tag.name }}"></input>
|
|
|
|
<button type="submit">+</button>
|
|
|
|
</form>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|