add indent; don't repeat header

This commit is contained in:
Damien Elmes 2012-01-16 08:51:07 +09:00
parent 5aa3c00594
commit 0039961406

View file

@ -73,10 +73,13 @@ body { margin: 1em; -webkit-user-select: none; }
def _renderDeckTree(self, nodes, depth=0): def _renderDeckTree(self, nodes, depth=0):
if not nodes: if not nodes:
return "" return ""
if depth == 0:
buf = """ buf = """
<tr><th colspan=5 align=left>%s</th><th align=right>%s</th> <tr><th colspan=5 align=left>%s</th><th align=right>%s</th>
<th align=right>%s</th></tr>""" % ( <th align=right>%s</th></tr>""" % (
_("Deck"), _("Due"), _("New")) _("Deck"), _("Due"), _("New"))
else:
buf = ""
for node in nodes: for node in nodes:
buf += self._deckRow(node, depth) buf += self._deckRow(node, depth)
return buf return buf
@ -87,7 +90,8 @@ body { margin: 1em; -webkit-user-select: none; }
return "&nbsp;"*3*depth return "&nbsp;"*3*depth
buf = "<tr>" buf = "<tr>"
# deck link # deck link
buf += "<td colspan=5><a class=deck href='open:%d'>%s</a></td>"% (did, name) buf += "<td colspan=5>%s<a class=deck href='open:%d'>%s</a></td>"% (
indent(), did, name)
# due counts # due counts
def nonzeroColour(cnt, colour): def nonzeroColour(cnt, colour):
if not cnt: if not cnt: