handle closed cfp
This commit is contained in:
parent
c7f20b2362
commit
6820aaea13
|
@ -0,0 +1,18 @@
|
||||||
|
{% extends 'base.html' %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
|
{% block proposetab %} class="active"{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<div class="page-header">
|
||||||
|
<h1>
|
||||||
|
{% trans "Participate" %}
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h2>{% trans "Sorry, the Call for Participation is closed!" %}</h2>
|
||||||
|
|
||||||
|
{% url 'proposal-mail-token' as mail_token_url %}
|
||||||
|
<p>{% blocktrans %}If you already have submitted a talk and you want to edit it, please click <a href="{{ mail_token_url }}">here</a>.{% endblocktrans %}</p>
|
||||||
|
|
||||||
|
{% endblock %}
|
|
@ -71,7 +71,9 @@
|
||||||
<i>{% trans "No proposals." %}</i>
|
<i>{% trans "No proposals." %}</i>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</p>
|
</p>
|
||||||
|
{% if conference.opened_categories.exists %}
|
||||||
<p>
|
<p>
|
||||||
<a href="{% url 'proposal-talk-add' speaker_token=speaker.token %}" class="btn btn-primary">{% trans "New proposal" %}</a>
|
<a href="{% url 'proposal-talk-add' speaker_token=speaker.token %}" class="btn btn-primary">{% trans "New proposal" %}</a>
|
||||||
</p>
|
</p>
|
||||||
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -13,9 +13,11 @@
|
||||||
<a href="{% url 'proposal-dashboard' speaker_token=speaker.token %}" class="btn btn-primary">
|
<a href="{% url 'proposal-dashboard' speaker_token=speaker.token %}" class="btn btn-primary">
|
||||||
<span class="glyphicon glyphicon-chevron-left"></span> {% trans "My profile" %}
|
<span class="glyphicon glyphicon-chevron-left"></span> {% trans "My profile" %}
|
||||||
</a>
|
</a>
|
||||||
|
{% if conference.opened_categories.exists %}
|
||||||
<a href="{% url 'proposal-talk-add' speaker_token=speaker.token %}" class="btn btn-info">
|
<a href="{% url 'proposal-talk-add' speaker_token=speaker.token %}" class="btn btn-info">
|
||||||
<span class="glyphicon glyphicon-plus"></span> {% trans "New proposal" %}
|
<span class="glyphicon glyphicon-plus"></span> {% trans "New proposal" %}
|
||||||
</a>
|
</a>
|
||||||
|
{% endif %}
|
||||||
<a href="{% url 'proposal-talk-edit' speaker_token=speaker.token talk_id=talk.pk %}" class="btn btn-success">
|
<a href="{% url 'proposal-talk-edit' speaker_token=speaker.token talk_id=talk.pk %}" class="btn btn-success">
|
||||||
<span class="glyphicon glyphicon-pencil"></span> {% trans "Edit this proposal" %}
|
<span class="glyphicon glyphicon-pencil"></span> {% trans "Edit this proposal" %}
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -143,6 +143,8 @@ def proposal_home(request):
|
||||||
categories = TalkCategory.objects.filter(site=request.conference.site)
|
categories = TalkCategory.objects.filter(site=request.conference.site)
|
||||||
else:
|
else:
|
||||||
categories = request.conference.opened_categories
|
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)
|
speaker_form = ParticipantForm(request.POST or None, conference=request.conference, social=False)
|
||||||
talk_form = TalkForm(request.POST or None, categories=categories)
|
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])):
|
if request.method == 'POST' and all(map(lambda f: f.is_valid(), [speaker_form, talk_form])):
|
||||||
|
|
Loading…
Reference in New Issue