This commit is contained in:
Damien Elmes 2012-05-06 15:11:54 +09:00
parent c6c938a262
commit 9fc3647842
2 changed files with 6 additions and 1 deletions

View file

@ -165,6 +165,8 @@ body { margin: 1em; -webkit-user-select: none; }
def nonzeroColour(cnt, colour):
if not cnt:
colour = "#e0e0e0"
if cnt >= 1000:
cnt = "1000+"
return "<font color='%s'>%s</font>" % (colour, cnt)
buf += "<td align=right>%s</td><td align=right>%s</td>" % (
nonzeroColour(due, "#007700"),

View file

@ -108,8 +108,11 @@ class Overview(object):
desc[:160], desc)
def _table(self):
counts = self.mw.col.sched.counts()
counts = list(self.mw.col.sched.counts())
finished = not sum(counts)
for n in range(len(counts)):
if counts[n] == 1000:
counts[n] = "1000+"
but = self.mw.button
if finished:
return '<div class=fin style="white-space: pre-wrap;">%s</div>' % (