diff --git a/src/bornhack/urls.py b/src/bornhack/urls.py index a0cdc61f3..7e14bf4e9 100644 --- a/src/bornhack/urls.py +++ b/src/bornhack/urls.py @@ -25,6 +25,7 @@ from people.views import PeopleView from sponsors.views import AllSponsorsView from sponsors.views import SponsorsView +from sponsors.views import CallForSponsorsView from utils.views import csrfview # require 2fa token entry (if enabled on admin account) when logging into /admin by using allauth login form @@ -160,6 +161,7 @@ path("info/", CampInfoView.as_view(), name="info"), path("program/", include("program.urls", namespace="program")), path("sponsors/", SponsorsView.as_view(), name="sponsors"), + path("sponsors/call-for-sponsors", CallForSponsorsView.as_view(), name="call_for_sponsors"), path( "map/", include( diff --git a/src/program/templates/includes/program_menu.html b/src/program/templates/includes/program_menu.html deleted file mode 100644 index 9ba2833e8..000000000 --- a/src/program/templates/includes/program_menu.html +++ /dev/null @@ -1,13 +0,0 @@ -{% if camp.show_schedule %} - Schedule -{% endif %} -Events -Speakers -Call for Participation -{% if request.user.is_authenticated %} - {% if camp.call_for_participation_open %} - Submit Proposal - {% else %} - View Proposals - {% endif %} -{% endif %} diff --git a/src/program/templates/program_base.html b/src/program/templates/program_base.html index 5413cf9a6..7a34a53bf 100644 --- a/src/program/templates/program_base.html +++ b/src/program/templates/program_base.html @@ -10,7 +10,19 @@
diff --git a/src/sponsors/templates/call_for_sponsors.html b/src/sponsors/templates/call_for_sponsors.html new file mode 100644 index 000000000..da9678517 --- /dev/null +++ b/src/sponsors/templates/call_for_sponsors.html @@ -0,0 +1,22 @@ +{% extends 'sponsors_base.html' %} +{% load commonmark %} + +{% block title %} + Call for Sponsors | {{ block.super }} +{% endblock %} + +{% block sponsors_content %} + + {% if not camp.call_for_sponsors_open %} +
This CFS has not been written yet.
+ {% else %} + {{ camp.call_for_sponsors|trustedcommonmark }} + {% endif %} + +{% endblock sponsors_content %} diff --git a/src/sponsors/templates/sponsors.html b/src/sponsors/templates/sponsors.html index 9526505f3..febb582da 100644 --- a/src/sponsors/templates/sponsors.html +++ b/src/sponsors/templates/sponsors.html @@ -1,4 +1,4 @@ -{% extends 'base.html' %} +{% extends 'sponsors_base.html' %} {% load static %} {% load commonmark %} @@ -7,7 +7,7 @@ {% endblock %} -{% block content %} +{% block sponsors_content %} {% if sponsors %} @@ -53,16 +53,4 @@This CFS has not been written yet.
- {% else %} - {{ camp.call_for_sponsors|trustedcommonmark }} - {% endif %} - -{% endblock %} +{% endblock sponsors_content %} diff --git a/src/sponsors/templates/sponsors_base.html b/src/sponsors/templates/sponsors_base.html new file mode 100644 index 000000000..b87e04ae2 --- /dev/null +++ b/src/sponsors/templates/sponsors_base.html @@ -0,0 +1,23 @@ +{% extends 'base.html' %} + +{% block title %} + Sponsors | {{ block.super }} +{% endblock %} + +{% block content %} + + {% with url_name=request.resolver_match.url_name proposal_urls="proposal_list,speaker_proposal_create,speaker_proposal_detail,speaker_proposal_update,speaker_proposal_submit,speaker_proposal_picture,event_proposal_create,event_proposal_detail,event_proposal_update,event_proposal_submit" %} + +