mirror of
https://github.com/ankitects/anki.git
synced 2025-11-08 21:57:12 -05:00
add indent; don't repeat header
This commit is contained in:
parent
5aa3c00594
commit
0039961406
1 changed files with 6 additions and 2 deletions
|
|
@ -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 " "*3*depth
|
return " "*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:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue