Bearbeiten Button hinzugefügt
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@ FROM python:3.13-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN pip install --no-cache-dir fastapi uvicorn "psycopg[binary]" python-multipart jinja2 httpx
|
||||
RUN pip install --no-cache-dir fastapi uvicorn "psycopg[binary]" python-multipart jinja2 httpx bcrypt
|
||||
|
||||
COPY . .
|
||||
|
||||
|
||||
+961
-535
File diff suppressed because it is too large
Load Diff
@@ -30,6 +30,21 @@ a {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.edit-button {
|
||||
float: right;
|
||||
display: inline-block;
|
||||
padding: 10px 14px;
|
||||
background: #238636;
|
||||
color: #ffffff;
|
||||
border-radius: 9px;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.edit-button:hover {
|
||||
background: #2ea043;
|
||||
}
|
||||
|
||||
.concert-detail {
|
||||
background: #161b22;
|
||||
border: 1px solid #30363d;
|
||||
@@ -150,6 +165,11 @@ a {
|
||||
padding: 22px;
|
||||
}
|
||||
|
||||
.edit-button {
|
||||
float: none;
|
||||
margin: 0 0 20px;
|
||||
}
|
||||
|
||||
.flyer-container {
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
@@ -27,6 +27,14 @@
|
||||
← Zurück zum Kalender
|
||||
</a>
|
||||
|
||||
{% if can_edit %}
|
||||
|
||||
<a href="/concerts/{{ concert.id }}/edit" class="edit-button">
|
||||
✏️ Konzert bearbeiten
|
||||
</a>
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
<article class="concert-detail">
|
||||
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{ concert.artist }} bearbeiten · Pingu Concerts</title>
|
||||
<link rel="stylesheet" href="/static/css/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="header-inner">
|
||||
<a href="/" class="logo">🎸 Pingu <span>Concerts</span></a>
|
||||
</div>
|
||||
</header>
|
||||
<main>
|
||||
<div class="page-title">
|
||||
<h1>✏️ Konzert bearbeiten</h1>
|
||||
<p>Änderungen werden direkt beim Konzert gespeichert.</p>
|
||||
</div>
|
||||
<section class="empty">
|
||||
<form method="post" action="/concerts/{{ concert.id }}/edit" enctype="multipart/form-data">
|
||||
<p>
|
||||
<label>Künstler / Band<br>
|
||||
<input type="text" name="artist" value="{{ concert.artist }}" {% if not can_edit_title %}disabled{% endif %} required>
|
||||
</label>
|
||||
</p>
|
||||
{% if can_edit_details %}
|
||||
<p>
|
||||
<label>Veranstaltungsort<br>
|
||||
<input type="text" name="venue_name" value="{{ concert.venue.name if concert.venue.id else '' }}" placeholder="Name des Veranstaltungsorts">
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
<label>Straße<br>
|
||||
<input type="text" name="street" value="{{ concert.venue.street or '' }}">
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
<label>PLZ und Ort<br>
|
||||
<input type="text" name="postal_code" value="{{ concert.venue.postal_code or '' }}" placeholder="PLZ">
|
||||
<input type="text" name="city" value="{{ concert.venue.city or '' }}" placeholder="Ort">
|
||||
</label>
|
||||
</p>
|
||||
<input type="hidden" name="country" value="{{ concert.venue.country or 'Deutschland' }}">
|
||||
<input type="hidden" name="latitude" value="{{ concert.venue.latitude or '' }}">
|
||||
<input type="hidden" name="longitude" value="{{ concert.venue.longitude or '' }}">
|
||||
<p>
|
||||
<label>Beginn<br>
|
||||
<input type="datetime-local" name="start_datetime" value="{{ concert.start_local }}" required>
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
<label>Ende<br>
|
||||
<input type="datetime-local" name="end_datetime" value="{{ concert.end_local }}">
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
<label>Beschreibung<br>
|
||||
<textarea name="description" rows="5">{{ concert.description or '' }}</textarea>
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
<label>Ticket-Link<br>
|
||||
<input type="url" name="ticket_url" value="{{ concert.ticket_url or '' }}" placeholder="https://...">
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
<label>Ticketpreis<br>
|
||||
<input type="number" name="ticket_price" value="{{ concert.ticket_price or '' }}" step="0.01" min="0">
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
<label>Neuen Flyer hochladen<br>
|
||||
<input type="file" name="flyer" accept="image/jpeg,image/png,image/webp">
|
||||
</label>
|
||||
<small>Ohne neue Datei bleibt der bisherige Flyer erhalten.</small>
|
||||
</p>
|
||||
{% if concert.flyer_path %}
|
||||
<p><img src="{{ concert.flyer_path }}" alt="Aktueller Flyer" style="max-width: 300px; max-height: 400px; border-radius: 10px;"></p>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<div>
|
||||
<button type="submit" class="button">💾 Änderungen speichern</button>
|
||||
<a href="/concerts/{{ concert.id }}" class="button button-secondary">Abbrechen</a>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user