buchverwaltung drin
This commit is contained in:
1 parent
f4f54af078
commit
217088c47f
5 files changed
+73
-2
No files matched your search
BIN
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Buch bearbeiten</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css') }}">
|
||||
<link rel="icon" href="{{ url_for('static', filename='favicon.ico') }}" type="image/x-icon">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container mt-5">
|
||||
<h1>Buch bearbeiten</h1>
|
||||
<form method="POST">
|
||||
<div class="form-group">
|
||||
<label for="titel">Titel</label>
|
||||
<input type="text" class="form-control" id="titel" name="titel" value="{{ buch.titel }}" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="autor">Autor</label>
|
||||
<input type="text" class="form-control" id="autor" name="autor" value="{{ buch.autor }}" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="jahr">Jahr (optional)</label>
|
||||
<input type="number" class="form-control" id="jahr" name="jahr" value="{{ buch.jahr }}">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Speichern</button>
|
||||
<a href="{{ url_for('index') }}" class="btn btn-secondary">Abbrechen</a>
|
||||
</form>
|
||||
</div>
|
||||
<script src="{{ url_for('static', filename='js/bootstrap.bundle.min.js') }}"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,32 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Neues Buch</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css') }}">
|
||||
<link rel="icon" href="{{ url_for('static', filename='favicon.ico') }}" type="image/x-icon">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container mt-5">
|
||||
<h1>Neues Buch</h1>
|
||||
<form method="POST">
|
||||
<div class="form-group">
|
||||
<label for="titel">Titel</label>
|
||||
<input type="text" class="form-control" id="titel" name="titel" value="{{ titel }}" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="autor">Autor</label>
|
||||
<input type="text" class="form-control" id="autor" name="autor" value="{{ autor }}" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="jahr">Jahr (optional)</label>
|
||||
<input type="number" class="form-control" id="jahr" name="jahr" value="{{ jahr }}">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Anlegen</button>
|
||||
<a href="{{ url_for('index') }}" class="btn btn-secondary">Abbrechen</a>
|
||||
</form>
|
||||
</div>
|
||||
<script src="{{ url_for('static', filename='js/bootstrap.bundle.min.js') }}"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -6,14 +6,21 @@
|
||||
<title>BibelTresor</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css') }}">
|
||||
<link rel="icon" href="{{ url_for('static', filename='favicon.ico') }}" type="image/x-icon">
|
||||
<script>
|
||||
function bestaetigeLoeschen(event) {
|
||||
if (!confirm('Sicher, dass das Buch für immer gelöscht werden soll?')) {
|
||||
event.preventDefault(); // Verhindert das Weiterleiten des Links, wenn der Benutzer "Abbrechen" klickt
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Meine Bücher</h1>
|
||||
<ul>
|
||||
{% for buch in buecher %}
|
||||
<li>{{ buch.titel }} von {{ buch.autor }} ({{ buch.jahr }}) -
|
||||
<a href="{{ url_for('bearbeiten', id=buch.id) }}">Bearbeiten</a> -
|
||||
<a href="{{ url_for('loeschen', id=buch.id) }}">Löschen</a>
|
||||
<a href="{{ url_for('bearbeiten', id=buch.id) }}" class="btn btn-sm btn-primary" >Bearbeiten</a> -
|
||||
<a href="{{ url_for('loeschen', id=buch.id) }}" class="btn btn-sm btn-danger" onclick="bestaetigeLoeschen(event)">Löschen</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
Whitespace-only changes.
Reference in new issue
Block a user