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>
|
||||
{% endfor %}
|
||||
</p>
|
||||
{% if conference.opened_categories.exists %}
|
||||
<p>
|
||||
<a href="{% url 'proposal-talk-add' speaker_token=speaker.token %}" class="btn btn-primary">{% trans "New proposal" %}</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -13,9 +13,11 @@
|
|||
<a href="{% url 'proposal-dashboard' speaker_token=speaker.token %}" class="btn btn-primary">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> {% trans "My profile" %}
|
||||
</a>
|
||||
{% if conference.opened_categories.exists %}
|
||||
<a href="{% url 'proposal-talk-add' speaker_token=speaker.token %}" class="btn btn-info">
|
||||
<span class="glyphicon glyphicon-plus"></span> {% trans "New proposal" %}
|
||||
</a>
|
||||
{% endif %}
|
||||
<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" %}
|
||||
</a>
|
||||
|
|
|
@ -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])):
|
||||
|
|
Loading…
Reference in New Issue