Tags and tables
This commit is contained in:
@ -1,16 +1,14 @@
|
||||
{% load fr_display %}
|
||||
<div class="cover-container is-{{ size }}">
|
||||
{% if book.cover %}
|
||||
<div class="cover-container">
|
||||
<img class="book-cover {{ size }}" src="/images/{{ book.cover }}" alt="{% include 'snippets/cover_alt.html' with book=book %}">
|
||||
</div>
|
||||
<img class="book-cover" src="/images/{{ book.cover }}" alt="{% include 'snippets/cover_alt.html' with book=book %}">
|
||||
{% else %}
|
||||
<div class="cover-container">
|
||||
<div class="no-cover book-cover {{ size }}">
|
||||
<img class="book-cover {{ size }}" src="/static/images/no_cover.jpg" alt="No cover">
|
||||
<div class="no-cover book-cover">
|
||||
<img class="book-cover" src="/static/images/no_cover.jpg" alt="No cover">
|
||||
<div>
|
||||
<p>{{ book.title }}</p>
|
||||
<p>({{ book|edition_info }})</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
@ -1,7 +1,8 @@
|
||||
{% load humanize %}
|
||||
{% load fr_display %}
|
||||
{% if shelf.books %}
|
||||
<table class="table">
|
||||
<table class="table is-striped is-fullwidth">
|
||||
|
||||
<tr class="book-preview">
|
||||
<th>
|
||||
Cover
|
||||
|
@ -1,20 +1,24 @@
|
||||
<div class="tag">
|
||||
<a href="/tag/{{ tag.identifier|urlencode }}">{{ tag.name }}</a>
|
||||
{% if tag.identifier in user_tags %}
|
||||
<form class="tag-form" name="tag" action="/untag/" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="book" value="{{ book.id }}">
|
||||
<input type="hidden" name="name" value="{{ tag.name }}">
|
||||
<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.id }}">
|
||||
<input type="hidden" name="name" value="{{ tag.name }}">
|
||||
<button type="submit">+</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
<div class="control">
|
||||
<div class="tags has-addons">
|
||||
<a class="tag is-link" href="/tag/{{ tag.identifier|urlencode }}">
|
||||
{{ tag.name }}
|
||||
</a>
|
||||
<div class="tag">
|
||||
{% if tag.identifier in user_tags %}
|
||||
<form name="tag" action="/untag/" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="book" value="{{ book.id }}">
|
||||
<input type="hidden" name="name" value="{{ tag.name }}">
|
||||
<button type="submit">x<span class="hidden-text"> remove tag</span></button>
|
||||
</form>
|
||||
{% else %}
|
||||
<form name="tag" action="/tag/" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="book" value="{{ book.id }}">
|
||||
<input type="hidden" name="name" value="{{ tag.name }}">
|
||||
<button type="submit">+<span class="hidden-text"> add tag</span></button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user