Add band and venue follows with concert diary
This commit is contained in:
@@ -25,6 +25,14 @@
|
||||
.flyer-source { display: block; width: 100%; flex: 0 0 100%; margin: 10px 0 0; color: #a8a29e; font-size: .85rem; text-align: center; }
|
||||
.flyer-source a { color: #f87171; text-decoration: underline; }
|
||||
.flyer-disclaimer { display: block; margin-top: 4px; font-size: .75rem; }
|
||||
.follow-actions { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin:0 0 20px; }
|
||||
.follow-actions form { margin:0; }
|
||||
.follow-button { padding:8px 11px; color:#fca5a5; background:#171212; border:1px solid var(--border); border-radius:9px; cursor:pointer; }
|
||||
.follow-button.is-following { color:#fff; border-color:#dc2626; background:#7f1d1d; }
|
||||
.diary-section { margin-top:26px; padding-top:22px; border-top:1px solid var(--border); }
|
||||
.diary-form { max-width:none; }
|
||||
.diary-form select, .diary-form input, .diary-form textarea { width:100%; }
|
||||
.diary-form textarea { min-height:130px; resize:vertical; }
|
||||
</style>
|
||||
|
||||
</head>
|
||||
@@ -70,6 +78,19 @@
|
||||
{{ concert.artist }}
|
||||
</h1>
|
||||
|
||||
<div class="follow-actions" id="following">
|
||||
{% for band in concert_bands %}<form method="post" action="/concerts/{{ concert.id }}/follow-band">
|
||||
<input type="hidden" name="band_key" value="{{ band.key }}">
|
||||
<input type="hidden" name="action" value="{% if band.is_following %}unfollow{% else %}follow{% endif %}">
|
||||
<button class="follow-button {% if band.is_following %}is-following{% endif %}" type="submit">{% if band.is_following %}★ {{ band.name }} gefolgt{% else %}☆ {{ band.name }} folgen{% endif %}</button>
|
||||
</form>{% endfor %}
|
||||
{% if concert.venue.id %}<form method="post" action="/concerts/{{ concert.id }}/follow-venue">
|
||||
<input type="hidden" name="action" value="{% if follows_venue %}unfollow{% else %}follow{% endif %}">
|
||||
<button class="follow-button {% if follows_venue %}is-following{% endif %}" type="submit">{% if follows_venue %}★ Location gefolgt{% else %}☆ Location folgen{% endif %}</button>
|
||||
</form>{% endif %}
|
||||
<a class="follow-button" href="/following">Meine gefolgten Inhalte</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="concert-info">
|
||||
|
||||
@@ -366,6 +387,29 @@
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if concert.is_past %}
|
||||
<section class="diary-section" id="diary">
|
||||
<h2>📓 Mein Konzerttagebuch</h2>
|
||||
{% if can_write_diary %}
|
||||
<p>Dieser Eintrag ist privat und nur für dich sichtbar.</p>
|
||||
<form class="diary-form" method="post" action="/concerts/{{ concert.id }}/diary">
|
||||
<label for="diary-rating">Bewertung</label>
|
||||
<select id="diary-rating" name="rating" required>
|
||||
{% for value in range(1, 6) %}<option value="{{ value }}" {% if diary_entry and diary_entry.rating == value %}selected{% endif %}>{{ value }} von 5 Sternen</option>{% endfor %}
|
||||
</select>
|
||||
<label for="favorite-song">Lieblingssong <small>(optional)</small></label>
|
||||
<input id="favorite-song" name="favorite_song" maxlength="255" value="{{ diary_entry.favorite_song if diary_entry else '' }}">
|
||||
<label for="diary-notes">Erinnerungen <small>(optional)</small></label>
|
||||
<textarea id="diary-notes" name="notes" maxlength="5000" placeholder="Was ist dir von diesem Abend geblieben?">{{ diary_entry.notes if diary_entry else '' }}</textarea>
|
||||
<button class="attendance-option" type="submit">{% if diary_entry %}Eintrag aktualisieren{% else %}Im Tagebuch speichern{% endif %}</button>
|
||||
</form>
|
||||
{% if diary_entry %}<form method="post" action="/concerts/{{ concert.id }}/diary/delete" onsubmit="return confirm('Tagebucheintrag wirklich löschen?');"><button class="button button-secondary" type="submit">Tagebucheintrag löschen</button></form>{% endif %}
|
||||
{% else %}
|
||||
<p>Das private Tagebuch ist verfügbar, wenn du dieses vergangene Konzert als „Zugesagt“ markiert hattest.</p>
|
||||
{% endif %}
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
<section class="comments-section" id="comments">
|
||||
|
||||
<h2>💬 Kommentare</h2>
|
||||
|
||||
Reference in New Issue
Block a user