Cleans up status and shelve button

This commit is contained in:
Mouse Reeve 2020-09-28 17:25:26 -07:00
parent a4d1985f86
commit 8dbfa506b8
2 changed files with 15 additions and 13 deletions

View file

@ -1,21 +1,22 @@
{% load fr_display %}
{% if request.user.is_authenticated %}
<div class="field is-grouped">
<form name="shelve" action="/shelve/" method="post">
{% csrf_token %}
<input type="hidden" name="book" value="{{ book.id }}">
<input type="hidden" name="shelf" value="{% shelve_button_identifier book %}">
<button class="button" type="submit" style="">{% shelve_button_text book %}</button>
</form>
<div class="dropdown is-hoverable">
<form name="shelve" action="/shelve/" method="post">
{% csrf_token %}
<input type="hidden" name="book" value="{{ book.id }}">
<input type="hidden" name="shelf" value="{% shelve_button_identifier book %}">
<button class="button" type="submit" style="">{% shelve_button_text book %}</button>
</form>
{% if not hide_pulldown %}
<div class="button dropdown-trigger" >
<span class="icon icon-arrow-down"><span class="hidden-text">More shelves</span></span>
</div>
{% if not hide_pulldown %}
<div class="dropdown-menu">
<ul class="dropdown-content">
<form name="shelve" action="/shelve/" method="post">
<form class="dropdown-item" name="shelve" action="/shelve/" method="post">
{% csrf_token %}
<input type="hidden" name="book" value="{{ book.id }}">
{% for shelf in request.user.shelf_set.all %}
@ -29,4 +30,5 @@
{% endif %}
</div>
</div>
{% endif %}

View file

@ -1,9 +1,10 @@
{% load fr_display %}
{% if not hide_book and status.mention_books.count %}
<div class="row">
<div class="media">
{% if not hide_book and status.mention_books.count %}
<div class="media-left">
{% for book in status.mention_books.all|slice:"0:4" %}
<div class="row">
<div>
<div class="cover-container">
{% include 'snippets/book_cover.html' with book=book %}
{% if status.mention_books.count > 1 %}
@ -21,9 +22,8 @@
</div>
{% endfor %}
</div>
{% endif %}
{% endif %}
<div class="media">
{% if not hide_book and status.book %}
<div class="media-left">
{% include 'snippets/book_cover.html' with book=status.book %}