1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2024-11-30 04:13:01 +00:00

row color to show if display

This commit is contained in:
Pierre-antoine Comby 2020-03-24 23:32:48 +01:00
parent b3c1032f4f
commit 20ea017e96
2 changed files with 3 additions and 3 deletions

View File

@ -87,10 +87,10 @@ class ButtonTable(tables.Table):
class Meta: class Meta:
attrs = { attrs = {
'class': 'class':
'table table-bordered condensed table-striped table-hover' 'table table-bordered condensed table-hover'
} }
row_attrs = { row_attrs = {
'class': 'table-row', 'class': lambda record: 'table-row ' + 'table-success' if record.display else 'table-danger',
'id': lambda record: "row-"+str(record.pk), 'id': lambda record: "row-"+str(record.pk),
'data-href': lambda record: record.pk 'data-href': lambda record: record.pk
} }

View File

@ -132,7 +132,7 @@ class TransactionTemplateUpdateView(LoginRequiredMixin, UpdateView):
""" """
model = TransactionTemplate model = TransactionTemplate
form_class = TransactionTemplateForm form_class = TransactionTemplateForm
success_url = reverse_lazy('note:template_list')
class ConsoView(LoginRequiredMixin, SingleTableView): class ConsoView(LoginRequiredMixin, SingleTableView):
""" """