rewrote to remove parent_ref and just use parent from ORM
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
{% for book in books %}
|
||||
<tr>
|
||||
<td id="{{book.id}}">
|
||||
{% if book.parent_ref|length %}
|
||||
{% if book.parent|length %}
|
||||
{% set style="style=visibility:hidden" %}
|
||||
{% endif %}
|
||||
<button name="move_button" value="up-{{book.id}}" id="up-{{book.id}}" class="btn btn-outline-primary btn-small" {{style}}
|
||||
@@ -44,8 +44,8 @@
|
||||
{% endif %}
|
||||
{% if SeriesBookNum( series.id, book.id ) == 1 %}
|
||||
<script>
|
||||
{% if book.parent_ref|length %}
|
||||
$('#up-{{book.parent_ref[0].book_id}}').prop("disabled", true)
|
||||
{% if book.parent|length %}
|
||||
$('#up-{{book.parent[0].id}}').prop("disabled", true)
|
||||
{% else %}
|
||||
$('#up-{{book.id}}').prop("disabled", true)
|
||||
{% endif %}
|
||||
@@ -53,8 +53,8 @@
|
||||
{% endif %}
|
||||
{% if SeriesBookNum( series.id, book.id ) == series.num_books %}
|
||||
<script>
|
||||
{% if book.parent_ref|length %}
|
||||
$('#down-{{book.parent_ref[0].book_id}}').prop("disabled", true)
|
||||
{% if book.parent|length %}
|
||||
$('#down-{{book.parent[0].id}}').prop("disabled", true)
|
||||
{% else %}
|
||||
$('#down-{{book.id}}').prop("disabled", true)
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user