diff --git a/mobile/templates/mobile/_calendar_referee_row.html b/mobile/templates/mobile/_calendar_referee_row.html index 70dfdde..9530e15 100644 --- a/mobile/templates/mobile/_calendar_referee_row.html +++ b/mobile/templates/mobile/_calendar_referee_row.html @@ -12,13 +12,12 @@ Expects ``row`` ({event, referee_signup, referee_member}) in scope -- referee_member is only set once there's more than one managed person to tell apart, same rule mobile/_calendar_row.html's own ``member`` uses. - Accept/Decline are two small forms, not a single multi-button one -- - and, unlike this app's RSVP forms, boosted (no hx-boost="false"): - nothing here is Alpine-owned/toggled, so there's no htmx/Alpine conflict - to dodge, and a boosted POST avoids the jarring full-page reload a plain - form submit would cause on a page the user is mid-scroll on. + Just a link to the event, same as every other calendar row -- no + Accept/Decline here; event_detail.html's own "Refereeing" card (same + signup) is where that action lives, so this row and every other one + share one interaction model (tap through, act on the event page). {% endcomment %} -
+
{{ row.event.start|date:"D" }}
{{ row.event.start|date:"d" }}
@@ -36,20 +35,7 @@ {% if row.event.location %}· {{ row.event.location.name }}{% endif %}
- {% if row.referee_signup.status == "accepted" %} - {% trans "Confirmed" %} - {% else %} -
-
- {% csrf_token %} - - -
-
- {% csrf_token %} - - -
-
- {% endif %} - + + {% if row.referee_signup.status == "accepted" %}{% trans "Confirmed" %}{% else %}{% trans "Reply needed" %}{% endif %} + +
diff --git a/mobile/tests.py b/mobile/tests.py index 0ed2148..8806e27 100644 --- a/mobile/tests.py +++ b/mobile/tests.py @@ -1044,7 +1044,8 @@ class CalendarRefereeSignupTests(TestCase): response = self._get() self.assertContains(response, "Referee") - self.assertContains(response, "I'll ref") + self.assertContains(response, "Reply needed") + self.assertContains(response, f'href="{reverse("mobile:event_detail", kwargs={"pk": self.game.pk})}"') def test_declined_signup_is_not_shown(self): signup = RefereeSignup.objects.get(event=self.game, member=self.member) @@ -1054,9 +1055,9 @@ class CalendarRefereeSignupTests(TestCase): response = self._get() - self.assertNotContains(response, "I'll ref") + self.assertNotContains(response, "Reply needed") - def test_accepted_signup_shows_a_confirmed_pill_with_no_actions(self): + def test_accepted_signup_shows_a_confirmed_pill(self): signup = RefereeSignup.objects.get(event=self.game, member=self.member) signup.status = RefereeSignup.Status.ACCEPTED signup.save() @@ -1065,14 +1066,14 @@ class CalendarRefereeSignupTests(TestCase): response = self._get() self.assertContains(response, "Confirmed") - self.assertNotContains(response, "I'll ref") + self.assertNotContains(response, "Reply needed") def test_training_filter_excludes_referee_rows(self): self.client.force_login(self.user) response = self._get(kind="training") - self.assertNotContains(response, "I'll ref") + self.assertNotContains(response, "Reply needed") def test_a_managed_childs_invite_shows_up_and_names_them(self): family = Family.objects.create(name="Eree")