mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-03 14:56:42 +00:00
Disable button for current shelf.
This commit is contained in:
parent
1783330708
commit
97e752cc12
2 changed files with 9 additions and 1 deletions
|
@ -754,6 +754,14 @@ button.dropdown-button {
|
|||
border: none;
|
||||
}
|
||||
|
||||
.dropdown-content button[disabled] {
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
.dropdown-content button[disabled]:hover {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
.dropdown-content button:hover {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
{% csrf_token %}
|
||||
<input type="hidden" name="book" value="{{ book.id }}"></input>
|
||||
{% for shelf in request.user.shelf_set.all %}
|
||||
<button class="secondary" name="shelf" type="submit" value="{{ shelf.identifier }}">{{ shelf.name }}</button>
|
||||
<button class="secondary" 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>
|
||||
{% endfor %}
|
||||
</form>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue