Hide pulldowns on covers shelf snippet

stopgap working on #139
This commit is contained in:
Mouse Reeve 2020-04-24 09:25:11 -07:00
parent 3479185f67
commit d51006b908
2 changed files with 17 additions and 13 deletions

View file

@ -15,7 +15,7 @@
<label for="book-{{ book.id }}-radio">
{% include 'snippets/book_cover.html' with book=book %}
</label>
{% include 'snippets/shelve_button.html' with book=book %}
{% include 'snippets/shelve_button.html' with book=book hide_pulldown=True %}
</div>
{% endfor %}
</div>

View file

@ -6,11 +6,14 @@
{% 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><div class="pulldown-container">
<button type="submit" style="">{% shelve_button_text book %}</button>
</form>
{% if not hide_pulldown %}
<div class="pulldown-container">
<button class="pulldown-toggle">
<span class="icon icon-arrow-down"><span class="hidden-text">More shelves</span></span>
</button>
<ul class="pulldown">
<ul class="pulldown">
<form name="shelve" action="/shelve/" method="post">
{% csrf_token %}
<input type="hidden" name="book" value="{{ book.id }}">
@ -20,8 +23,9 @@
</li>
{% endfor %}
</form>
</ul>
</ul>
</div>
{% endif %}
</div>
{% endif %}