mirror of
https://github.com/PhoenixTwoFive/karaoqueue.git
synced 2025-07-06 18:14:31 +02:00
Add entry deletion, footer
This commit is contained in:
@ -45,11 +45,24 @@
|
||||
</form>-->
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<main role="main" class="container">
|
||||
{% block content %}{% endblock %}
|
||||
</main><!-- /.container -->
|
||||
|
||||
<div class="site">
|
||||
<main role="main" class="container">
|
||||
{% block content %}{% endblock %}
|
||||
</main><!-- /.container -->
|
||||
</div>
|
||||
<!-- Footer -->
|
||||
<footer class="footer">
|
||||
<div class="container text-center py-3">
|
||||
{% if not auth %}
|
||||
<a href="/login"><i class='material-icons'>launch</i> Login</a>
|
||||
{% endif %}
|
||||
<a href="https://github.com/PhoenixTwoFive/karaoqueue"><i class='material-icons'>code</i> Github</a>
|
||||
<span class="text-muted">KaraoQueue - <span
|
||||
style="display:inline-block;transform: rotate(180deg);">©</span> 2019 - Phillip
|
||||
Kühne</span>
|
||||
</div>
|
||||
</footer>
|
||||
<!-- Footer -->
|
||||
<!-- Bootstrap core JavaScript
|
||||
================================================== -->
|
||||
<!-- Placed at the end of the document so the pages load faster -->
|
||||
|
45
templates/main_admin.html
Normal file
45
templates/main_admin.html
Normal file
@ -0,0 +1,45 @@
|
||||
|
||||
|
||||
{% extends 'base.html' %}
|
||||
{% block title %}Home{% endblock %}
|
||||
{% block content %}
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th scope="col">Name</th>
|
||||
<th scope="col">Song</th>
|
||||
<th scope="col">Künstler</th>
|
||||
<th scope="col">Löschen</th>
|
||||
</tr>
|
||||
{% for entry in list: %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ entry[0] }}
|
||||
</td>
|
||||
<td>
|
||||
{{ entry[1] }}
|
||||
</td>
|
||||
<td>
|
||||
{{ entry[2] }}
|
||||
</td>
|
||||
<td>
|
||||
<button type='button' class='btn btn-danger' onclick='deleteEntry({{ entry[3] }})'><i
|
||||
class='material-icons'>delete</i></button>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
<a name="end"></a>
|
||||
{% endblock %}
|
||||
{% block extrajs %}
|
||||
<script>
|
||||
function deleteEntry(entry_id) {
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: '/api/entries/delete/'+entry_id,
|
||||
contentType: "application/json",
|
||||
dataType: 'json'
|
||||
});
|
||||
location.reload();
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user