Simplify UI in case there is just one topic
When only one topic is available, havign a column to display topic (or mentioning topic) is a bit confusing. Simplify the UI so that you can safely ignore this concept if there is only one topic available. Change-Id: I69ddef83b586a81df75e04579125681cbe067151
This commit is contained in:
parent
45cce87287
commit
0a77592bd9
@ -60,7 +60,7 @@ class Proposal(models.Model):
|
|||||||
description = models.TextField(
|
description = models.TextField(
|
||||||
help_text="The detailed subject and goals for your proposed session. "
|
help_text="The detailed subject and goals for your proposed session. "
|
||||||
"This is mandatory.")
|
"This is mandatory.")
|
||||||
topic = models.ForeignKey(Topic,
|
topic = models.ForeignKey(Topic, default=1,
|
||||||
help_text="The topic the session belongs in. Click 'Help' below"
|
help_text="The topic the session belongs in. Click 'Help' below"
|
||||||
" for more details. This is mandatory.")
|
" for more details. This is mandatory.")
|
||||||
blueprints = models.CharField(max_length=400, blank=True,
|
blueprints = models.CharField(max_length=400, blank=True,
|
||||||
|
@ -13,13 +13,15 @@
|
|||||||
Session suggestion is now closed.
|
Session suggestion is now closed.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% for topic in reviewable_topics %}
|
{% for topic in reviewable_topics %}
|
||||||
<a class=roundedButton href="/cfp/topic/{{ topic.id }}">Review topic: {{ topic.name }}</A>
|
<a class=roundedButton href="/cfp/topic/{{ topic.id }}">Review {% if multitopic %}topic: {{ topic.name }}{% else %}proposed sessions{% endif %}</A>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
|
{% if multitopic %}
|
||||||
<th><a class="nolink"
|
<th><a class="nolink"
|
||||||
href="" onclick="ts_resortTable(this); return false;">Topic<img
|
href="" onclick="ts_resortTable(this); return false;">Topic<img
|
||||||
class="sortarrow" src="/media/arrowBlank" height="6" width="9"></a></th>
|
class="sortarrow" src="/media/arrowBlank" height="6" width="9"></a></th>
|
||||||
|
{% endif %}
|
||||||
<th><a class="nolink"
|
<th><a class="nolink"
|
||||||
href="" onclick="ts_resortTable(this); return false;">Title<img
|
href="" onclick="ts_resortTable(this); return false;">Title<img
|
||||||
class="sortarrow" src="/media/arrowBlank" height="6" width="9"></a>
|
class="sortarrow" src="/media/arrowBlank" height="6" width="9"></a>
|
||||||
@ -33,7 +35,9 @@ Session suggestion is now closed.
|
|||||||
</tr>
|
</tr>
|
||||||
{% for proposal in proposals %}
|
{% for proposal in proposals %}
|
||||||
<tr>
|
<tr>
|
||||||
|
{% if multitopic %}
|
||||||
<td>{{ proposal.topic.name }}</td>
|
<td>{{ proposal.topic.name }}</td>
|
||||||
|
{% endif %}
|
||||||
<td>
|
<td>
|
||||||
<a href="/cfp/details/{{ proposal.id }}">{{ proposal.title }}</a>
|
<a href="/cfp/details/{{ proposal.id }}">{{ proposal.title }}</a>
|
||||||
</td>
|
</td>
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
<script type="text/javascript" src="/media/sorting.js"></script>
|
<script type="text/javascript" src="/media/sorting.js"></script>
|
||||||
<div class="span-8">
|
<div class="span-8">
|
||||||
<h2>{{ topic.name }}</h2>
|
<h2>{% if multitopic %}{{ topic.name }}{% else %}Review proposed sessions{% endif %}</h2>
|
||||||
<a class=roundedButton href=/>Back to proposals list</A>
|
<a class=roundedButton href=/>Back to proposals list</A>
|
||||||
{% if sched %}
|
{% if sched %}
|
||||||
<a class=roundedButton href="/scheduling/{{ topic.id }}">Scheduling</A>
|
<a class=roundedButton href="/scheduling/{{ topic.id }}">Scheduling</A>
|
||||||
@ -22,7 +22,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
|
{% if multitopic %}
|
||||||
<th>Topic</th>
|
<th>Topic</th>
|
||||||
|
{% endif %}
|
||||||
<th><a class="nolink"
|
<th><a class="nolink"
|
||||||
href="" onclick="ts_resortTable(this); return false;">Title<img
|
href="" onclick="ts_resortTable(this); return false;">Title<img
|
||||||
class="sortarrow" src="/media/arrowBlank" height="6" width="9"></a>
|
class="sortarrow" src="/media/arrowBlank" height="6" width="9"></a>
|
||||||
@ -37,6 +39,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
{% for proposal in proposals %}
|
{% for proposal in proposals %}
|
||||||
<tr>
|
<tr>
|
||||||
|
{% if multitopic %}
|
||||||
<td>
|
<td>
|
||||||
{% if proposal.scheduled %}
|
{% if proposal.scheduled %}
|
||||||
{{ proposal.topic.name }}
|
{{ proposal.topic.name }}
|
||||||
@ -44,6 +47,7 @@
|
|||||||
<a href="/cfp/switch/{{ proposal.id }}">{{ proposal.topic.name }}</a>
|
<a href="/cfp/switch/{{ proposal.id }}">{{ proposal.topic.name }}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
|
{% endif %}
|
||||||
<td>
|
<td>
|
||||||
<a href="/cfp/details/{{ proposal.id }}">{{ proposal.title }}</a>
|
<a href="/cfp/details/{{ proposal.id }}">{{ proposal.title }}</a>
|
||||||
</td>
|
</td>
|
||||||
|
@ -30,17 +30,20 @@ from cfp.utils import linkify, is_editable, topiclead
|
|||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
def list(request):
|
def list(request):
|
||||||
|
multitopic = Topic.objects.count() > 1
|
||||||
proposals = Proposal.objects.all()
|
proposals = Proposal.objects.all()
|
||||||
reviewable_topics = Topic.objects.filter(
|
reviewable_topics = Topic.objects.filter(
|
||||||
lead_username=request.user.username)
|
lead_username=request.user.username)
|
||||||
request.session['lastlist'] = ""
|
request.session['lastlist'] = ""
|
||||||
return TemplateResponse(request, "cfplist.html",
|
return TemplateResponse(request, "cfplist.html",
|
||||||
{'proposals': proposals,
|
{'proposals': proposals,
|
||||||
|
'multitopic': multitopic,
|
||||||
'reviewable_topics': reviewable_topics})
|
'reviewable_topics': reviewable_topics})
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
def topiclist(request, topicid):
|
def topiclist(request, topicid):
|
||||||
|
multitopic = Topic.objects.count() > 1
|
||||||
topic = Topic.objects.get(id=topicid)
|
topic = Topic.objects.get(id=topicid)
|
||||||
if not topiclead(request.user, topic):
|
if not topiclead(request.user, topic):
|
||||||
return HttpResponseForbidden("Forbidden")
|
return HttpResponseForbidden("Forbidden")
|
||||||
@ -48,6 +51,7 @@ def topiclist(request, topicid):
|
|||||||
request.session['lastlist'] = "cfp/topic/%s" % topicid
|
request.session['lastlist'] = "cfp/topic/%s" % topicid
|
||||||
return TemplateResponse(request, "topiclist.html",
|
return TemplateResponse(request, "topiclist.html",
|
||||||
{'proposals': proposals,
|
{'proposals': proposals,
|
||||||
|
'multitopic': multitopic,
|
||||||
'sched': 'scheduling' in settings.INSTALLED_APPS,
|
'sched': 'scheduling' in settings.INSTALLED_APPS,
|
||||||
'topic': topic})
|
'topic': topic})
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user