Merge pull request #836 from ostcar/issue-833

Fixed tooltip and duration in agenda.
This commit is contained in:
Oskar Hahn 2013-07-27 15:29:21 -07:00
commit b7edee8fdf
3 changed files with 5 additions and 5 deletions

View File

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

View File

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

View File

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