-
+
Hand Out Products
Use this view to mark products such as merchandise, cabins, fridges and so on as handed out.
-
+
Check-In Tickets
Use this view to check-in tickets when participants arrive.
-
+
Hand Out Badges
Use this view to mark badges as handed out.
-
+
Approve Public Credit Names
Use this view to check and approve users Public Credit Names
-
+
Manage Proposals
Use this view to manage SpeakerProposals and EventProposals
diff --git a/src/backoffice/templates/manage_eventproposal.html b/src/backoffice/templates/manage_eventproposal.html
index 47690152..4fcb51b7 100644
--- a/src/backoffice/templates/manage_eventproposal.html
+++ b/src/backoffice/templates/manage_eventproposal.html
@@ -3,13 +3,13 @@
{% block content %}
Manage {{ form.instance.event_type.name }} Proposal
-{% include 'includes/eventproposal_detail.html' with camp=bocamp %}
+{% include 'includes/eventproposal_detail.html' with camp=camp %}
{% endblock content %}
diff --git a/src/backoffice/templates/manage_proposals.html b/src/backoffice/templates/manage_proposals.html
index fbb81470..4c28b64d 100644
--- a/src/backoffice/templates/manage_proposals.html
+++ b/src/backoffice/templates/manage_proposals.html
@@ -35,7 +35,7 @@
{{ proposal.needs_oneday_ticket|truefalseicon }} |
{{ proposal.event|truefalseicon }} |
{{ proposal.user }} |
-
Manage |
+
Manage |
{% endfor %}
@@ -63,7 +63,7 @@
{% for speaker in proposal.speakers.all %} {% endfor %} |
{{ proposal.speaker|truefalseicon }} |
{{ proposal.user }} |
-
Manage |
+
Manage |
{% endfor %}
diff --git a/src/backoffice/templates/manage_speakerproposal.html b/src/backoffice/templates/manage_speakerproposal.html
index 89f9e0a8..ab545463 100644
--- a/src/backoffice/templates/manage_speakerproposal.html
+++ b/src/backoffice/templates/manage_speakerproposal.html
@@ -3,13 +3,13 @@
{% block content %}
Manage Speaker Proposal
-{% include 'includes/speakerproposal_detail.html' with camp=bocamp %}
+{% include 'includes/speakerproposal_detail.html' with camp=camp %}
{% endblock content %}
diff --git a/src/backoffice/templates/product_handout.html b/src/backoffice/templates/product_handout.html
index 875c5a80..8496a8a5 100644
--- a/src/backoffice/templates/product_handout.html
+++ b/src/backoffice/templates/product_handout.html
@@ -10,7 +10,7 @@
Hand Out Products
- Use this view to hand out products to participants. Use the search field to search for username, email, products, order ID etc. To check in participants go to the
Ticket Checkin view instead. To hand out badges go to the
Badge Handout view instead.
+ Use this view to hand out products to participants. Use the search field to search for username, email, products, order ID etc. To check in participants go to the
Ticket Checkin view instead. To hand out badges go to the
Badge Handout view instead.
This table shows all OrderProductRelations which are handed_out=False (not including unpaid, cancelled and refunded orders). The table is initally sorted by order ID but the sorting can be changed by clicking the column headlines (if javascript is enabled).
diff --git a/src/backoffice/templates/ticket_checkin.html b/src/backoffice/templates/ticket_checkin.html
index 5f6cfc37..177f7c1b 100644
--- a/src/backoffice/templates/ticket_checkin.html
+++ b/src/backoffice/templates/ticket_checkin.html
@@ -10,7 +10,7 @@
Ticket Check-In
- Use this view to check in participants. Use the search field to search for username, email, products, order ID, ticket UUID, etc. To hand out badges go to the
Badge Handout view instead. To hand out other products go to the
Hand Out Products view instead.
+ Use this view to check in participants. Use the search field to search for username, email, products, order ID, ticket UUID, etc. To hand out badges go to the
Badge Handout view instead. To hand out other products go to the
Hand Out Products view instead.
This table shows all (Shop|Discount|Sponsor)Tickets which are checked_in=False.
diff --git a/src/backoffice/urls.py b/src/backoffice/urls.py
index 2361a240..58da109d 100644
--- a/src/backoffice/urls.py
+++ b/src/backoffice/urls.py
@@ -5,18 +5,15 @@ from .views import *
app_name = 'backoffice'
urlpatterns = [
- path('', CampSelectView.as_view(), name='camp_select'),
- path('
/', include([
- path('', CampIndexView.as_view(), name='camp_index'),
- path('product_handout/', ProductHandoutView.as_view(), name='product_handout'),
- path('badge_handout/', BadgeHandoutView.as_view(), name='badge_handout'),
- path('ticket_checkin/', TicketCheckinView.as_view(), name='ticket_checkin'),
- path('public_credit_names/', ApproveNamesView.as_view(), name='public_credit_names'),
- path('manage_proposals/', include([
- path('', ManageProposalsView.as_view(), name='manage_proposals'),
- path('speakers//', SpeakerProposalManageView.as_view(), name='speakerproposal_manage'),
- path('events//', EventProposalManageView.as_view(), name='eventproposal_manage'),
- ])),
+ path('', BackofficeIndexView.as_view(), name='index'),
+ path('product_handout/', ProductHandoutView.as_view(), name='product_handout'),
+ path('badge_handout/', BadgeHandoutView.as_view(), name='badge_handout'),
+ path('ticket_checkin/', TicketCheckinView.as_view(), name='ticket_checkin'),
+ path('public_credit_names/', ApproveNamesView.as_view(), name='public_credit_names'),
+ path('manage_proposals/', include([
+ path('', ManageProposalsView.as_view(), name='manage_proposals'),
+ path('speakers//', SpeakerProposalManageView.as_view(), name='speakerproposal_manage'),
+ path('events//', EventProposalManageView.as_view(), name='eventproposal_manage'),
])),
]
diff --git a/src/backoffice/views.py b/src/backoffice/views.py
index 2ac2efc3..7f057728 100644
--- a/src/backoffice/views.py
+++ b/src/backoffice/views.py
@@ -12,7 +12,7 @@ from shop.models import OrderProductRelation
from tickets.models import ShopTicket, SponsorTicket, DiscountTicket
from profiles.models import Profile
from camps.models import Camp
-from utils.mixins import StaffMemberRequiredMixin
+from camps.mixins import CampViewMixin
from program.models import SpeakerProposal, EventProposal
from .mixins import BackofficeViewMixin
@@ -20,31 +20,8 @@ from .mixins import BackofficeViewMixin
logger = logging.getLogger("bornhack.%s" % __name__)
-class CampSelectView(StaffMemberRequiredMixin, ListView):
- model = Camp
- template_name = "camp_select.html"
-
- def get_queryset(self):
- """
- Filter away camps that are not writeable, since they are not interesting from a backoffice perspective
- """
- return super().get_queryset().filter(read_only=False)
-
- def get(self, request, *args, **kwargs):
- """
- If we only have one writable Camp redirect directly to it rather than show a 1 item list
- """
- if self.get_queryset().count() == 1:
- return redirect(
- reverse('backoffice:camp_index', kwargs={
- 'bocamp_slug': self.get_queryset().first().slug
- })
- )
- return super().get(request, *args, **kwargs)
-
-
-class CampIndexView(BackofficeViewMixin, TemplateView):
- template_name = "camp_index.html"
+class BackofficeIndexView(BackofficeViewMixin, TemplateView):
+ template_name = "index.html"
class ProductHandoutView(BackofficeViewMixin, ListView):
@@ -96,14 +73,14 @@ class ManageProposalsView(BackofficeViewMixin, ListView):
def get_queryset(self, **kwargs):
return SpeakerProposal.objects.filter(
- camp=self.bocamp,
+ camp=self.camp,
proposal_status=SpeakerProposal.PROPOSAL_PENDING
)
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context['eventproposals'] = EventProposal.objects.filter(
- track__camp=self.bocamp,
+ track__camp=self.camp,
proposal_status=EventProposal.PROPOSAL_PENDING
)
return context
@@ -128,7 +105,7 @@ class ProposalManageView(BackofficeViewMixin, UpdateView):
form.instance.mark_as_rejected(self.request)
else:
messages.error(self.request, "Unknown submit action")
- return redirect(reverse('backoffice:manage_proposals', kwargs={'bocamp_slug': self.bocamp.slug}))
+ return redirect(reverse('backoffice:manage_proposals', kwargs={'camp_slug': self.camp.slug}))
class SpeakerProposalManageView(ProposalManageView):
diff --git a/src/bornhack/urls.py b/src/bornhack/urls.py
index 3bbbe0fe..6c8f2ec9 100644
--- a/src/bornhack/urls.py
+++ b/src/bornhack/urls.py
@@ -113,11 +113,6 @@ urlpatterns = [
name='people',
),
- path(
- 'backoffice/',
- include('backoffice.urls', namespace='backoffice')
- ),
-
# camp specific urls below here
path(
@@ -187,6 +182,10 @@ urlpatterns = [
include('teams.urls', namespace='teams')
),
+ path(
+ 'backoffice/',
+ include('backoffice.urls', namespace='backoffice')
+ ),
])
)
diff --git a/src/templates/base.html b/src/templates/base.html
index 1fb91fd5..4766b709 100644
--- a/src/templates/base.html
+++ b/src/templates/base.html
@@ -73,8 +73,7 @@
Contact
People
- {% if user.is_authenticated and user.is_staff %}
- Backoffice
+ {% if request.user.is_staff %}
Django Admin
{% endif %}
diff --git a/src/templates/includes/menuitems.html b/src/templates/includes/menuitems.html
index 49dd27fd..9b021d07 100644
--- a/src/templates/includes/menuitems.html
+++ b/src/templates/includes/menuitems.html
@@ -5,4 +5,7 @@
+ {% if request.user.is_staff %}
+
+ {% endif %}