mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
add tags column in browser
This commit is contained in:
parent
463fec1158
commit
b49d52393e
1 changed files with 4 additions and 1 deletions
|
@ -234,6 +234,8 @@ class DataModel(QAbstractTableModel):
|
||||||
return str(c.reps)
|
return str(c.reps)
|
||||||
elif type == "cardLapses":
|
elif type == "cardLapses":
|
||||||
return str(c.lapses)
|
return str(c.lapses)
|
||||||
|
elif type == "noteTags":
|
||||||
|
return str(" ".join(c.note().tags))
|
||||||
elif type == "note":
|
elif type == "note":
|
||||||
return c.model()['name']
|
return c.model()['name']
|
||||||
elif type == "cardIvl":
|
elif type == "cardIvl":
|
||||||
|
@ -487,6 +489,7 @@ class Browser(QMainWindow):
|
||||||
('cardEase', _("Ease")),
|
('cardEase', _("Ease")),
|
||||||
('cardReps', _("Reviews")),
|
('cardReps', _("Reviews")),
|
||||||
('cardLapses', _("Lapses")),
|
('cardLapses', _("Lapses")),
|
||||||
|
('noteTags', _("Tags")),
|
||||||
('note', _("Note")),
|
('note', _("Note")),
|
||||||
]
|
]
|
||||||
self.columns.sort(key=itemgetter(1))
|
self.columns.sort(key=itemgetter(1))
|
||||||
|
@ -631,7 +634,7 @@ class Browser(QMainWindow):
|
||||||
|
|
||||||
def onSortChanged(self, idx, ord):
|
def onSortChanged(self, idx, ord):
|
||||||
type = self.model.activeCols[idx]
|
type = self.model.activeCols[idx]
|
||||||
noSort = ("question", "answer", "template", "deck", "note")
|
noSort = ("question", "answer", "template", "deck", "note", "noteTags")
|
||||||
if type in noSort:
|
if type in noSort:
|
||||||
if type == "template":
|
if type == "template":
|
||||||
showInfo(_("""\
|
showInfo(_("""\
|
||||||
|
|
Loading…
Reference in a new issue