Switch to using a list for buttons.

This commit is contained in:
Adam Kelly 2020-04-09 22:39:12 +01:00
parent 0a4524a524
commit 6fcc183377
2 changed files with 7 additions and 4 deletions

View file

@ -159,7 +159,8 @@ body {
display: block;
}
.pulldown li {
.pulldown a {
display: block;
margin-bottom: 0.5em;
}
@ -184,7 +185,7 @@ div.pulldown-button button {
color: #247BA0;
}
div.pulldown button {
ul.pulldown button {
display: block;
text-align: left;
width: 100%;

View file

@ -7,15 +7,17 @@
<input type="hidden" name="book" value="{{ book.id }}"></input>
<input type="hidden" name="shelf" value="{% shelve_button_identifier book %}"></input>
<button type="submit" style="">{% shelve_button_text book %}</button></form><div class="pulldown-container"><button>&dArr;</button>
<div class="pulldown">
<ul class="pulldown">
<form name="shelve" action="/shelve/" method="post">
{% csrf_token %}
<input type="hidden" name="book" value="{{ book.id }}"></input>
{% 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>
</div>
</ul>
</div>
</div>