Fixes star rating displays
This commit is contained in:
@ -1,31 +1,32 @@
|
||||
{% load fr_display %}
|
||||
{% if request.user.is_authenticated %}
|
||||
|
||||
<div class="pulldown-button">
|
||||
<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 type="submit" style="">{% shelve_button_text book %}</button>
|
||||
</form>
|
||||
{% if not hide_pulldown %}
|
||||
<div class="pulldown-container">
|
||||
<button class="pulldown-toggle">
|
||||
<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>
|
||||
<div class="button dropdown-trigger" >
|
||||
<span class="icon icon-arrow-down"><span class="hidden-text">More shelves</span></span>
|
||||
</button>
|
||||
<ul class="pulldown">
|
||||
<form name="shelve" action="/shelve/" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="book" value="{{ book.id }}">
|
||||
{% for shelf in request.user.shelf_set.all %}
|
||||
<li>
|
||||
<button name="shelf" type="submit" value="{{ shelf.identifier }}" {% if shelf in book.shelf_set.all %} disabled {% endif %}>{{ shelf.name }} {% if shelf in book.shelf_set.all %} ✓ {% endif %}</button>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</form>
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if not hide_pulldown %}
|
||||
<div class="dropdown-menu">
|
||||
<ul class="dropdown-content">
|
||||
<form name="shelve" action="/shelve/" method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="book" value="{{ book.id }}">
|
||||
{% for shelf in request.user.shelf_set.all %}
|
||||
<li>
|
||||
<button name="shelf" type="submit" value="{{ shelf.identifier }}" {% if shelf in book.shelf_set.all %} disabled {% endif %}>{{ shelf.name }} {% if shelf in book.shelf_set.all %} ✓ {% endif %}</button>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</form>
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user