diff --git a/vendor/regidesk/regidesk/templates/regidesk/ci_overview.html b/vendor/regidesk/regidesk/templates/regidesk/ci_overview.html index e9b3795e..cb40e1eb 100644 --- a/vendor/regidesk/regidesk/templates/regidesk/ci_overview.html +++ b/vendor/regidesk/regidesk/templates/regidesk/ci_overview.html @@ -73,9 +73,6 @@ -

Check In

@@ -110,6 +107,7 @@ Show Badge +

Show badge for printing

diff --git a/vendor/registrasion/registrasion/urls.py b/vendor/registrasion/registrasion/urls.py index 88e7f174..77840138 100644 --- a/vendor/registrasion/registrasion/urls.py +++ b/vendor/registrasion/registrasion/urls.py @@ -7,6 +7,7 @@ from .views import ( amend_registration, user_badge, badge, + badge_print, badger, checkout, credit_note, @@ -30,6 +31,7 @@ public = [ url(r"^mybadge\.(png|svg|pdf)", user_badge, name="user_badge"), url(r"^badge/([0-9]+)$", badge, name="badge"), url(r"^badge/([0-9]+).(png|svg|pdf)$", badge, name="badge"), + url(r"^badge_print/([0-9]+).(png|svg|pdf)$", badge_print, name="badge_print"), url(r"^badger/([A-Za-z0-9]+)$", badger, name="badger"), url(r"^badger/", badger, name="badger"), url(r"^category/([0-9]+)$", product_category, name="product_category"), diff --git a/vendor/registrasion/registrasion/views.py b/vendor/registrasion/registrasion/views.py index d69e4f97..d233f841 100644 --- a/vendor/registrasion/registrasion/views.py +++ b/vendor/registrasion/registrasion/views.py @@ -1139,6 +1139,15 @@ def user_badge(request, format="png"): overlay=False return render_badge(request.user, format, overlay, request) +@user_passes_test(_staff_only) +def badge_print(request, user_id, format="pdf"): + ''' Renders a single user's badge overlay (PDF). ''' + + user_id = int(user_id) + user = User.objects.get(pk=user_id) + + return render_badge(user, format=format, overlay=True) + @user_passes_test(_staff_only) def badge(request, user_id, format="png"): ''' Renders a single user's badge (PNG). '''