altered book delete status to success, completed TODO-05 (books must be sold to be deleted - with tooltip to explain), and added new BUG-17 - changing some fields of parent book need to be reflected into sub book
This commit is contained in:
1
BUGs
1
BUGs
@@ -1,4 +1,5 @@
|
||||
#### BUGS (next-17)
|
||||
BUG-17: if change publisher, owned, covertype, condition, or blurb of parent book, then need to reflect that change to ALL sub books
|
||||
|
||||
### DB/back-end
|
||||
BUG-2: series does not deal with calcd_rating...
|
||||
|
||||
1
README
1
README
@@ -30,7 +30,6 @@ sudo docker-compose -f /srv/docker/config/docker-compose.yml up bookdb_web
|
||||
|
||||
|
||||
########################################################### TODOS (next 29):
|
||||
TODO-05: should deleting really just ask if want to mark it as SOLD? IN FACT, make delete button disabled until its sold... (and a tooltip to explain)
|
||||
TODO-09: show books to buy view / printable
|
||||
|
||||
Validation:
|
||||
|
||||
5
main.py
5
main.py
@@ -490,9 +490,8 @@ def book(id):
|
||||
st.SetMessage( "This is a parent book, cannot delete it without deleting sub books first" )
|
||||
return redirect( '/book/{}'.format(book.id) )
|
||||
else:
|
||||
st.SetAlert("warning")
|
||||
st.SetMessage("WARNING: Deleting being tested at present.<br>")
|
||||
st.AppendMessage("Deleted {}".format(book.title) )
|
||||
st.SetAlert("success")
|
||||
st.SetMessage("Deleted {}".format(book.title) )
|
||||
pid = 0
|
||||
if len(book.parent) > 0:
|
||||
pid = book.parent[0].id
|
||||
|
||||
@@ -366,7 +366,14 @@ function AddAuthorToBook(num) {
|
||||
<div class="form-row col mx-0">
|
||||
{{ book_form.submit( class="btn btn-primary offset-lg-2 col-lg-2" )}}
|
||||
{% if 'Edit' in page_title %}
|
||||
{% if GetOwnedById(b.owned) == 'Sold' %}
|
||||
{{ book_form.delete( class="btn btn-outline-danger col-lg-2" )}}
|
||||
{% else %}
|
||||
<span class="col-lg-2" tabindex="0" data-toggle="tooltip"
|
||||
title="Cannot Delete unless the book is saved as Sold">
|
||||
{{ book_form.delete( class="btn btn-outline-danger col disabled", disabled="true", style="pointer-events: none;" )}}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div class="form-row">
|
||||
</div class="form-row">
|
||||
@@ -411,6 +418,7 @@ function AddAuthorToBook(num) {
|
||||
{% block script_content %}
|
||||
<script>
|
||||
$(document).ready( function() {
|
||||
$('[data-toggle="tooltip"]').tooltip()
|
||||
$("#sub_book_content").load("/subbooks_for_book/{{books.id}}")
|
||||
{% if CheckSeriesChange is defined and CheckSeriesChange != None %}
|
||||
{% if CheckSeriesChange.type == 'parent' %}
|
||||
|
||||
Reference in New Issue
Block a user