mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-23 13:56:37 +02:00
Add buttons to hide notes from public if needed
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
@ -703,8 +703,11 @@ class TournamentPublishNotesView(VolunteerMixin, SingleObjectMixin, RedirectView
|
||||
raise Http404
|
||||
|
||||
tournament = Tournament.objects.get(pk=kwargs["pk"])
|
||||
tournament.pools.filter(round=kwargs["round"]).update(results_available=True)
|
||||
messages.success(request, _("Notes published!"))
|
||||
tournament.pools.filter(round=kwargs["round"]).update(results_available='hide' not in request.GET)
|
||||
if 'hide' not in request.GET:
|
||||
messages.success(request, _("Notes published!"))
|
||||
else:
|
||||
messages.success(request, _("Notes hidden!"))
|
||||
return super().get(request, *args, **kwargs)
|
||||
|
||||
def get_redirect_url(self, *args, **kwargs):
|
||||
|
Reference in New Issue
Block a user