add unattend button

This commit is contained in:
pstruebi
2022-06-14 13:00:16 +02:00
parent 78109f313f
commit 0dfa5d30fe
3 changed files with 28 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
{% extends 'base.html' %}
{% block content %}
<h1>{% block title %} Hallo, {{user["username"]}} {% endblock %}</h1>
<h1>{% block title %} Hallo, {{user["username"]}} ({{user["email"]}}) {% endblock %}</h1>
{% set ns = namespace(last_date='...') %}
{% for event in events %}
@@ -12,6 +12,14 @@
<h1>{{event["weekday"] + " " + event["start"]["date"] }}</h1>
{% endif %}
<h2>{{ event['subject'] }}</h2>
<a href="{{ url_for('attend', id=event['id']) }}">
<span class="badge badge-warning">Teilnehmen</span>
</a>
<a href="{{ url_for('unattend', id=event['id']) }}">
<span class="badge badge-warning">Abmelden</span>
</a>
<span class="badge badge-primary">{{ event["start"]["time"] }}</span>
<span class="badge badge-primary">{{ event["duration"] }}</span>
{% for attendee in event["attendees"] %}