1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 09:58:23 +02:00

Filter buttons list with visible buttons only

This commit is contained in:
Yohann D'ANELLO
2020-04-27 03:56:22 +02:00
parent 2bc2048076
commit 5ea531fe68
6 changed files with 125 additions and 86 deletions

View File

@ -129,13 +129,14 @@ class ButtonTable(tables.Table):
'table table-bordered condensed table-hover'
}
row_attrs = {
'class': lambda record: 'table-row ' + 'table-success' if record.display else 'table-danger',
'class': lambda record: 'table-row ' + ('table-success' if record.display else 'table-danger'),
'id': lambda record: "row-" + str(record.pk),
'data-href': lambda record: record.pk
}
model = TransactionTemplate
exclude = ('id',)
order_by = ('type', '-display', 'destination__name', 'name',)
edit = tables.LinkColumn('note:template_update',
args=[A('pk')],