changeset 160:04ac384a9525

Only show the sum time if a project has entries
author Björn Ricks <bjoern.ricks@intevation.de>
date Thu, 06 Dec 2012 14:55:16 +0100 (2012-12-06)
parents 3f547b1d8322
children d524bc0c1bd5
files getan/view.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/getan/view.py	Thu Dec 06 14:54:40 2012 +0100
+++ b/getan/view.py	Thu Dec 06 14:55:16 2012 +0100
@@ -147,11 +147,14 @@
     def update(self):
         logger.debug("Update ProjectNode '%s'" % self.item.key)
         time_str    = self._get_formatted_time()
-        time        = urwid.Text('%s (%s)' % (self.mode[1], time_str))
         description = urwid.Text([' ' * self.indent,
                                   ('project_key', self.item.key),
                                   (' '),
                                   (self.item.desc)])
+        if self._get_time():
+            time = urwid.Text('%s (%s)' % (self.mode[1], time_str))
+        else:
+            time = urwid.Text('')
         self.widget = urwid.AttrWrap(urwid.Columns([description, time]),None)
         self._w     = self.widget
         self.update_w()
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)