diff --git a/tabbycat/privateurls/templates/public_url_landing.html b/tabbycat/privateurls/templates/public_url_landing.html index 3f181c601ab..dd8d52982d8 100644 --- a/tabbycat/privateurls/templates/public_url_landing.html +++ b/tabbycat/privateurls/templates/public_url_landing.html @@ -1,5 +1,5 @@ {% extends "tables/base_vue_table.html" %} -{% load i18n debate_tags %} +{% load i18n static debate_tags %} {% block page-title %}{% trans "Private URL" %}{% endblock %} {% block head-title %}{% trans "Private URL" %}{% endblock %} @@ -50,13 +50,18 @@ {% blocktrans trimmed with check_time=event.time asvar text %} You have been checked in at {{ check_time }} {% endblocktrans %} - {% include "components/item-info.html" with type='success' %} + {% include "components/item-info.html" with type='success' nopad=True %} {% else %} {% trans "You are not currently checked in." as text %} - {% include "components/item-info.html" with type='warning' %} + {% include "components/item-info.html" with type='warning' nopad=True %} {% endif %} {% endif %} + {% if checkins_used %} + {% trans "Show barcode for check-in" as text %} + {% include "components/item-action.html" with id="openBarcode" url="" icon="grid" child=False %} + {% endif %} + {% if object.adjudicator and pref.participant_ballots == 'private-urls' %} {% for dadj in debateadjudications %} {% roundurl 'results-public-ballotset-new-randomised' dadj.debate.round url_key as url %} @@ -95,6 +100,25 @@ {{ block.super }} {# this is the Vue table, which is populated with previous results #} + + + {% endblock %} @@ -108,4 +132,14 @@ }); }); + {% if checkins_used %} + + + {% endif %} {% endblock js %} diff --git a/tabbycat/privateurls/views.py b/tabbycat/privateurls/views.py index f49ebcc465d..f283c4b5490 100644 --- a/tabbycat/privateurls/views.py +++ b/tabbycat/privateurls/views.py @@ -209,6 +209,7 @@ def get_context_data(self, **kwargs) -> Dict[str, Any]: try: checkin_id = PersonIdentifier.objects.get(person=self.object) kwargs['checkins_used'] = True + kwargs['identifier'] = checkin_id checkins = get_unexpired_checkins(t, 'checkin_window_people')