Show category in motion table. Fix template when a motion has no category.

This commit is contained in:
Norman Jäckel 2013-05-11 00:20:42 +02:00
parent 8af50a36cc
commit 96f5122c00
2 changed files with 7 additions and 1 deletions

View File

@ -233,7 +233,11 @@
<!-- Category -->
<h5>{% trans "Category" %}:</h5>
{% if motion.category %}
{{ motion.category }}
{% else %}
<i>{% trans 'No category' %}</i>
{% endif %}
<!-- Creation Time -->
<h5>{% trans "Creation Time" %}:</h5>

View File

@ -53,6 +53,7 @@
<tr>
<th><a href="?sort=number{% if 'number' in request.GET.sort and 'reverse' not in request.GET %}&reverse{%endif%}">{% trans "#" %}</a></th>
<th><a href="?sort=title{% if 'title' in request.GET.sort and 'reverse' not in request.GET %}&reverse{%endif%}">{% trans "Motion title" %}</a></th>
<th>{% trans 'Category' %}</th>
{% if min_supporters > 0 %}
<th class="optional"><a href="?sort=supporter{% if 'supporter' in request.GET.sort and 'reverse' not in request.GET %}&reverse{%endif%}">{% trans "Number of supporters" %}</a></th>
{% endif %}
@ -65,6 +66,7 @@
<tr class="{% if motion.active %}activeline{% endif %}">
<td>{{ motion.identifier|default:'' }}</td>
<td><a href="{% model_url motion %}">{{ motion.title }}</a></td>
<td>{% if motion.category %}{{ motion.category }}{% else %}<i>{% trans 'No category' %}</i>{% endif %}</td>
{% if min_supporters > 0 %}
<td class="optional">{# motion.count_supporters #}</td>
{% endif %}