allow Edit Author to show list of books for author

This commit is contained in:
2023-07-04 23:00:39 +10:00
parent caf65be74c
commit 1e7a47f43e
3 changed files with 57 additions and 3 deletions

View File

@@ -18,6 +18,8 @@
</head>
<body>
{% if not no_navbar %}
<!-- Modal Dialog Box, jquery used to show / set content -->
<div id="dbox" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog mw-100 w-100">
@@ -129,19 +131,20 @@
</div class="collapse navbar-collapse">
</div class="container-fluid">
</nav>
{% endif %}
{% if message is defined and message|length %}
<div class="row alert alert-{{alert}}">
{{message|safe}}
{{ ClearStatus() }}
</div>
{% endif %}
{% endif %}
{% endif %}
{% block main_content %}
{% endblock main_content %}
{% if not InDBox %}
{% if not InDBox and not no_navbar %}
<!-- code to get bootstrap & bootstrap datatable to work -->
<script src="{{ url_for( 'static', filename='upstream/jquery-3.6.0.min.js')}}"></script>
<script src="{{ url_for( 'static', filename='upstream/bootstrap-5.0.2-dist/js/bootstrap.bundle.min.js')}}"></script>

View File

@@ -24,4 +24,16 @@
</div class="form">
</div class="row">
</div class="container">
{% if page_title == 'Edit Author' %}
<div class="row mt-5">
<div class="offset-1 col-10" id="books_by_author">
</div>
</div>
{% endif %}
{% endblock main_content %}
{% block script_content %}
<script>
$.get( "/author/{{object.id}}/books", function(data) { $('#books_by_author').html(data) } );
</script>
{% endblock script_content %}