only show attend button if user is not already attending

This commit is contained in:
pstruebi
2022-06-15 12:41:43 +02:00
parent 7278054e95
commit cec54b66e5
4 changed files with 25 additions and 11 deletions

View File

@@ -13,12 +13,15 @@
{% 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>
{% if not event["user_attends"] %}
<a href="{{ url_for('attend', id=event['id']) }}">
<span class="badge badge-warning">Teilnehmen</span>
</a>
{% else %}
{# <a href="{{ url_for('unattend', id=event['id']) }}"> #}
<span class="badge badge-success">Nehme Teil</span>
{# </a> #}
{% endif %}
<span class="badge badge-primary">{{ event["start"]["time"] }}</span>
<span class="badge badge-primary">{{ event["duration"] }}</span>