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:
@@ -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 %}
|
||||
|
||||
Reference in New Issue
Block a user