refactors tag model to fit ordered collection structure

This commit is contained in:
Mouse Reeve
2020-11-28 11:00:40 -08:00
parent a93b5cf5bc
commit fd7e476c9b
10 changed files with 110 additions and 52 deletions

View File

@ -1,14 +1,14 @@
<div class="control">
<form name="tag" action="/{% if tag.identifier in user_tags %}untag{% else %}tag{% endif %}/" method="post">
<form name="tag" action="/{% if tag.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 }}">
<input type="hidden" name="name" value="{{ tag.tag.name }}">
<div class="tags has-addons">
<a class="tag" href="/tag/{{ tag.identifier|urlencode }}">
{{ tag.name }}
<a class="tag" href="/tag/{{ tag.tag.identifier|urlencode }}">
{{ tag.tag.name }}
</a>
{% if tag.identifier in user_tags %}
{% if tag.tag.identifier in user_tags %}
<button class="tag is-delete" type="submit">
<span class="is-sr-only">remove tag</span>
</button>