60 lines
2.1 KiB
HTML
60 lines
2.1 KiB
HTML
{% extends "base.html" %}
|
|
{% block body %}
|
|
<a href="/add_movie" class="btn btn-primary mb-3">Film hinzufügen</a>
|
|
|
|
<form method="post" action="{{ url_for('index') }}">
|
|
<div class="row mb-3">
|
|
<div class="col">
|
|
<label for="search" class="form-label">Suche</label>
|
|
<input type="text" name="search" id="search" class="form-control" value="{{ search_query }}">
|
|
</div>
|
|
</div>
|
|
<button type="submit" class="btn btn-primary">Suchen</button>
|
|
</form>
|
|
|
|
<table class="table table-striped table-bordered mt-3">
|
|
<thead class="table-dark">
|
|
<tr>
|
|
<th>Id</th>
|
|
<th>Name</th>
|
|
<th>Genre</th>
|
|
<th>Regie</th>
|
|
<th>Medium</th>
|
|
<th>Erscheinungsjahr</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for list_all in data_all %}
|
|
<tr>
|
|
<td>{{list_all.get("id")}}</td>
|
|
<td>{{list_all.get("titel")}}</td>
|
|
<td>{{list_all.get("genre")}}</td>
|
|
<td>{{list_all.get("regie")}}</td>
|
|
<td>{{list_all.get("medium")}}</td>
|
|
<td>{{list_all.get("release_year")}}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
<nav aria-label="Page navigation">
|
|
<ul class="pagination">
|
|
<li class="page-item {% if current_page == 1 %}disabled{% endif %}">
|
|
<a class="page-link" href="{{ url_for('index', page=1, search=search_query) }}">Erste</a>
|
|
</li>
|
|
<li class="page-item {% if current_page == 1 %}disabled{% endif %}">
|
|
<a class="page-link" href="{{ url_for('index', page=current_page - 1, search=search_query) }}">Zurück</a>
|
|
</li>
|
|
<li class="page-item disabled">
|
|
<a class="page-link" href="#">Seite {{ current_page }} von {{ total_pages }}</a>
|
|
</li>
|
|
<li class="page-item {% if current_page == total_pages %}disabled{% endif %}">
|
|
<a class="page-link" href="{{ url_for('index', page=current_page + 1, search=search_query) }}">Weiter</a>
|
|
</li>
|
|
<li class="page-item {% if current_page == total_pages %}disabled{% endif %}">
|
|
<a class="page-link" href="{{ url_for('index', page=total_pages, search=search_query) }}">Letzte</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
|
|
{% endblock %} |