Fixed tooltip and duration in agenda.

The tooltip did not show the end of an agenda item, but of the hole event.

If a item was closed, it was not used to calculate the end of the event.

Fixed #833
This commit is contained in:
Oskar Hahn 2013-07-27 09:56:08 +02:00
parent bb538953ee
commit b39cb8e8a4
3 changed files with 5 additions and 5 deletions

View File

@ -45,9 +45,9 @@
<div class="duration">
{% if node.duration %}
{{ node.duration }} h
{% if start and end %}
{% if node.tooltip %}
<a class="btn btn-mini" rel="tooltip" data-original-title="{% trans 'End' %}:
{{ end|date:"DATETIME_FORMAT" }}"><i class="icon-clock"></i>
{{ node.tooltip|date:"DATETIME_FORMAT" }}"><i class="icon-clock"></i>
</a>
{% endif %}
{% endif %}

View File

@ -111,7 +111,7 @@
{% if items %}
<ol class="agenda_list {% if perms.agenda.can_manage_agenda %}sortable{% endif %}">
{% recursetree items %}
<li class="draggable{% if item.active %} activeline{% endif %}{% if item.closed %} offline{% endif %}">
<li class="draggable">
{% include "agenda/item_row.html" %}
{% if not node.is_leaf_node %}
<ol>

View File

@ -59,8 +59,8 @@ class Overview(TemplateView):
duration = timedelta()
for item in items:
if not item.closed and (item.duration is not None
and len(item.duration) > 0):
if (item.duration is not None and
len(item.duration) > 0):
duration_list = item.duration.split(':')
duration += timedelta(hours=int(duration_list[0]),
minutes=int(duration_list[1]))