diff --git a/frontend/scss/app.scss b/frontend/scss/app.scss
index 71b73ac..c9e7c41 100644
--- a/frontend/scss/app.scss
+++ b/frontend/scss/app.scss
@@ -84,10 +84,4 @@
z-index: 1;
}
}
-
-.deregister-btn {
- + .register-btn {
- display: none;
- }
-}
/* purgecss end ignore */
diff --git a/templates/index.html.tera b/templates/index.html.tera
index 6747cd9..466028d 100644
--- a/templates/index.html.tera
+++ b/templates/index.html.tera
@@ -34,30 +34,41 @@
Details
+ {% set_global cur_user_participates = false %}
{% for rower in planned_event.rower%}
{% if rower.name == loggedin_user.name %}
-
Abmelden
+ {% set_global cur_user_participates = true %}
{% endif %}
{% endfor %}
+ {% if cur_user_participates %}
+
Abmelden
+ {% endif %}
{% if planned_event.max_people > planned_event.rower | length %}
-
Mitrudern
- {% endif %}
+ {% if cur_user_participates == false %}
+
Mitrudern
+ {% endif %}
+ {% endif %}
{% if loggedin_user.is_cox %}
+ {% set_global cur_user_participates = false %}
{% for cox in planned_event.cox %}
{% if cox.name == loggedin_user.name %}
+ {% set_global cur_user_participates = true %}
+ {% endif %}
+ {% endfor %}
+ {% if cur_user_participates %}
Abmelden
- {% endif %}
- {% endfor %}
-
-
- Steuern
-
+ {% else %}
+
+
+ Steuern
+
+ {% endif %}
{% endif %}
+ {% set_global cur_user_participates = false %}
{% for rower in trip.rower %}
{% if rower.name == loggedin_user.name %}
-
Abmelden
+ {% set_global cur_user_participates = true %}
{% endif %}
{% endfor %}
- {% if trip.max_people > trip.rower | length and trip.cox_id != loggedin_user.id %}
+ {% if cur_user_participates %}
+
Abmelden
+ {% endif %}
+ {% if trip.max_people > trip.rower | length and trip.cox_id != loggedin_user.id and cur_user_participates == false%}
Mitrudern
{% endif %}