Skip to content

Commit

Permalink
Merge pull request #1124 from CodingPirates/155-tilmeld-knap-på-aktiv…
Browse files Browse the repository at this point in the history
…itetsliste-selvom-der-er-0-pladser-tilbage-på-aktivitet

Aktiviteter: Hvis der er udsolgt så vises tilmeld knappen ikke, men info tekst
  • Loading branch information
lakridserne authored Nov 11, 2024
2 parents 7e6802f + 51db629 commit b692914
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions members/templates/members/activities.html
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,11 @@ <h2>Nuværende og kommende aktiviteter</h2>
{{ person.person.firstname }} er tilmeldt
</div>
{% else %}
{% if activity.seats_left == 0 %}
<div class="info-box">
Udsolgt - kan ikke tilmelde {{ person.person.firstname }}
</div>
{% else %}
{% if person.person in activity.persons %}
<a
class="button-success"
Expand All @@ -231,6 +236,7 @@ <h2>Nuværende og kommende aktiviteter</h2>
Tilmeld {{ person.person.firstname }}
</a>
{% endif %}
{% endif %}
{% endif %}
{% else %}
{% if activity.department in person.departments_is_waiting %}
Expand Down
1 change: 1 addition & 0 deletions members/views/Activities.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ def Activities(request):
"signup_closing": curActivity.signup_closing,
"userregion": user_region,
"address": curActivity.address,
"seats_left": curActivity.seats_left(),
}
if curActivity.address.region == user_region:
activities_for_region_of_user.append(a)
Expand Down

0 comments on commit b692914

Please sign in to comment.