Skip to content

Commit

Permalink
link coupled shift
Browse files Browse the repository at this point in the history
  • Loading branch information
felixrindt committed Dec 12, 2024
1 parent 27e68cc commit 716c9fc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ephios/plugins/basesignupflows/flow/coupled.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@ class CoupledSignupActionValidator(NoSignupSignupActionValidator):
def get_no_signup_allowed_message(self):
if self.shift.signup_flow.leader_shift:
return ActionDisallowedError(
_("Participation is coupled to {}.").format(self.shift.signup_flow.leader_shift)
mark_safe(
_("Participation is coupled to {}.").format(
f'<a class="link-primary link-underline-opacity-25" '
f'href="#shift-{self.shift.signup_flow.leader_shift.pk}">'
f"{self.shift.signup_flow.leader_shift.get_datetime_display()}</a>"
)
)
)
# This is red as it requires responsibles to update the shift configuration.
text = _("Participation is coupled to another shift, but the leading shift is missing.")
Expand Down

0 comments on commit 716c9fc

Please sign in to comment.