diff --git a/cfp/templates/cfp/closed.html b/cfp/templates/cfp/closed.html new file mode 100644 index 0000000..3fc2bc3 --- /dev/null +++ b/cfp/templates/cfp/closed.html @@ -0,0 +1,18 @@ +{% extends 'base.html' %} +{% load i18n %} + +{% block proposetab %} class="active"{% endblock %} + +{% block content %} + + +

{% trans "Sorry, the Call for Participation is closed!" %}

+ +{% url 'proposal-mail-token' as mail_token_url %} +

{% blocktrans %}If you already have submitted a talk and you want to edit it, please click here.{% endblocktrans %}

+ +{% endblock %} diff --git a/cfp/templates/cfp/proposal_dashboard.html b/cfp/templates/cfp/proposal_dashboard.html index c1d3b28..0fabb3c 100644 --- a/cfp/templates/cfp/proposal_dashboard.html +++ b/cfp/templates/cfp/proposal_dashboard.html @@ -71,7 +71,9 @@ {% trans "No proposals." %} {% endfor %}

+{% if conference.opened_categories.exists %}

{% trans "New proposal" %}

+{% endif %} {% endblock %} diff --git a/cfp/templates/cfp/proposal_talk_details.html b/cfp/templates/cfp/proposal_talk_details.html index 5707479..7a0fd6a 100644 --- a/cfp/templates/cfp/proposal_talk_details.html +++ b/cfp/templates/cfp/proposal_talk_details.html @@ -13,9 +13,11 @@  {% trans "My profile" %} + {% if conference.opened_categories.exists %}  {% trans "New proposal" %} + {% endif %}  {% trans "Edit this proposal" %} diff --git a/cfp/views.py b/cfp/views.py index 416c6e9..b02ad68 100644 --- a/cfp/views.py +++ b/cfp/views.py @@ -143,6 +143,8 @@ def proposal_home(request): categories = TalkCategory.objects.filter(site=request.conference.site) else: categories = request.conference.opened_categories + if not categories.exists(): + return render(request, 'cfp/closed.html') speaker_form = ParticipantForm(request.POST or None, conference=request.conference, social=False) talk_form = TalkForm(request.POST or None, categories=categories) if request.method == 'POST' and all(map(lambda f: f.is_valid(), [speaker_form, talk_form])):