fixed books on shelf BUG-16 - author missing, its now using ORM with a HACK to remove subs not via ORM, and I also fixed datatable sorting by author for books on shelf via a param past into base.html

This commit is contained in:
2021-01-09 16:54:37 +11:00
parent 40e2ac1a34
commit bccfbadb39
4 changed files with 22 additions and 7 deletions

View File

@@ -122,7 +122,12 @@
<script src="https://cdn.datatables.net/1.10.22/js/dataTables.bootstrap4.min.js"></script>
<script>
$(document).ready(function() {
$('#book_table').DataTable( { 'pageLength': 20, 'lengthMenu': [[10, 20, 50, -1], [10, 20, 50, "All"]] } );
{% if 'Author(s)' in order_by %}
{% set o = "'order': [[ 1, 'asc' ]]," %}
{% else %}
{% set o = "" %}
{% endif %}
document.bookdb_dt = $('#book_table').DataTable( { 'pageLength': 20, {{o|safe}} 'lengthMenu': [[10, 20, 50, -1], [10, 20, 50, "All"]] } );
} );
</script>
{%block script_content %}{% endblock script_content %}