Fixed missing creation time of motion version.

Show now string if identifier is not set set (in widgets and motion detail).
This commit is contained in:
Emanuel Schuetze 2013-09-07 12:49:46 +02:00
parent 61a449cc77
commit 1045f14026
4 changed files with 8 additions and 22 deletions

View File

@ -16,11 +16,7 @@
{% for motion in submitted_motions %} {% for motion in submitted_motions %}
<li> <li>
<a href="{% model_url motion %}"> <a href="{% model_url motion %}">
{% if motion.identifier %} {{ motion.identifier|add:' | '|default:'' }}
[# {{ motion.identifier }}]
{% else %}
[---]
{% endif %}
{{ motion }} {{ motion }}
</a> </a>
</li> </li>

View File

@ -16,14 +16,10 @@
<h1> <h1>
{{ title }} {{ title }}
<br> <br>
<small> <small>{% trans "Motion" %} {{ motion.identifier|default:'' }}
{% if motion.identifier %} {% if motion.versions.count > 1 %}
{% trans "Motion" %} {{ motion.identifier|default:'' }}, | {% trans "Version" %} {{ version.version_number }}
{% else %}
<i>[{% trans "no number" %}]</i>,
{% endif %} {% endif %}
{# TODO: show only for workflow with versioning #}
{% trans "Version" %} {{ version.version_number }}
</small> </small>
<small class="pull-right"> <small class="pull-right">
<a href="{% url 'motion_list' %}" class="btn btn-mini" <a href="{% url 'motion_list' %}" class="btn btn-mini"
@ -242,15 +238,13 @@
<!-- Creation Time --> <!-- Creation Time -->
<h5> <h5>
{% with versions=motion.versions.all %} {% if motion.versions.count > 1 %}
{% if versions|length > 1 %}
{% trans "Last changes (of this version)" %}: {% trans "Last changes (of this version)" %}:
{% else %} {% else %}
{% trans "Last changes" %}: {% trans "Last changes" %}:
{% endif %} {% endif %}
{% endwith %}
</h5> </h5>
{{ motion.use_version.creation_time }} {{ version.creation_time }}
<!-- Widthdraw button --> <!-- Widthdraw button -->
{# TODO: Check this button #} {# TODO: Check this button #}

View File

@ -70,7 +70,7 @@
</td> </td>
{% endwith %} {% endwith %}
{% endif %} {% endif %}
<td class="optional">{{ motion.last_version.creation_time }}</td> <td class="optional">{{ motion.get_last_version.creation_time }}</td>
<td> <td>
<span style="width: 1px; white-space: nowrap;"> <span style="width: 1px; white-space: nowrap;">
{% if perms.projector.can_manage_projector %} {% if perms.projector.can_manage_projector %}

View File

@ -14,11 +14,7 @@
<i class="icon-search"></i> <i class="icon-search"></i>
</a> </a>
<a href="{% model_url motion %}"> <a href="{% model_url motion %}">
{% if motion.identifier %} {{ motion.identifier|add:' | '|default:'' }}
[# {{ motion.identifier }}]
{% else %}
[---]
{% endif %}
{{ motion }} {{ motion }}
</a> </a>
</li> </li>