diff --git a/cfp/models.py b/cfp/models.py
index 4344977..1ff409a 100644
--- a/cfp/models.py
+++ b/cfp/models.py
@@ -60,7 +60,7 @@ class Proposal(models.Model):
description = models.TextField(
help_text="The detailed subject and goals for your proposed session. "
"This is mandatory.")
- topic = models.ForeignKey(Topic,
+ topic = models.ForeignKey(Topic, default=1,
help_text="The topic the session belongs in. Click 'Help' below"
" for more details. This is mandatory.")
blueprints = models.CharField(max_length=400, blank=True,
diff --git a/cfp/templates/cfplist.html b/cfp/templates/cfplist.html
index 5777776..bf17f03 100644
--- a/cfp/templates/cfplist.html
+++ b/cfp/templates/cfplist.html
@@ -13,13 +13,15 @@
Session suggestion is now closed.
{% endif %}
{% for topic in reviewable_topics %}
-Review topic: {{ topic.name }}
+Review {% if multitopic %}topic: {{ topic.name }}{% else %}proposed sessions{% endif %}
{% endfor %}
+{% if multitopic %}
Topic![](/media/arrowBlank) |
+{% endif %}
Title
@@ -33,7 +35,9 @@ Session suggestion is now closed.
|
{% for proposal in proposals %}
+{% if multitopic %}
{{ proposal.topic.name }} |
+{% endif %}
{{ proposal.title }}
|
diff --git a/cfp/templates/topiclist.html b/cfp/templates/topiclist.html
index c3b9b57..6424350 100644
--- a/cfp/templates/topiclist.html
+++ b/cfp/templates/topiclist.html
@@ -13,7 +13,7 @@
{% block content %}
-
{{ topic.name }}
+
{% if multitopic %}{{ topic.name }}{% else %}Review proposed sessions{% endif %}
Back to proposals list
{% if sched %}
Scheduling
@@ -22,7 +22,9 @@
+{% if multitopic %}
Topic |
+{% endif %}
Title
@@ -37,6 +39,7 @@
|
{% for proposal in proposals %}
+{% if multitopic %}
{% if proposal.scheduled %}
{{ proposal.topic.name }}
@@ -44,6 +47,7 @@
{{ proposal.topic.name }}
{% endif %}
|
+{% endif %}
{{ proposal.title }}
|
diff --git a/cfp/views.py b/cfp/views.py
index f5d779b..15745e0 100644
--- a/cfp/views.py
+++ b/cfp/views.py
@@ -30,17 +30,20 @@ from cfp.utils import linkify, is_editable, topiclead
@login_required
def list(request):
+ multitopic = Topic.objects.count() > 1
proposals = Proposal.objects.all()
reviewable_topics = Topic.objects.filter(
lead_username=request.user.username)
request.session['lastlist'] = ""
return TemplateResponse(request, "cfplist.html",
{'proposals': proposals,
+ 'multitopic': multitopic,
'reviewable_topics': reviewable_topics})
@login_required
def topiclist(request, topicid):
+ multitopic = Topic.objects.count() > 1
topic = Topic.objects.get(id=topicid)
if not topiclead(request.user, topic):
return HttpResponseForbidden("Forbidden")
@@ -48,6 +51,7 @@ def topiclist(request, topicid):
request.session['lastlist'] = "cfp/topic/%s" % topicid
return TemplateResponse(request, "topiclist.html",
{'proposals': proposals,
+ 'multitopic': multitopic,
'sched': 'scheduling' in settings.INSTALLED_APPS,
'topic': topic})