From 33139bdbde84cca159a06d09aabf3e41f3425d59 Mon Sep 17 00:00:00 2001 From: Pierre-antoine Comby Date: Tue, 24 Mar 2020 00:07:25 +0100 Subject: [PATCH] Dynamic search of buttons --- apps/note/tables.py | 3 +- templates/note/transactiontemplate_list.html | 44 +++++++++++++++++--- 2 files changed, 40 insertions(+), 7 deletions(-) diff --git a/apps/note/tables.py b/apps/note/tables.py index a2044a21..2986c748 100644 --- a/apps/note/tables.py +++ b/apps/note/tables.py @@ -80,10 +80,11 @@ class ButtonTable(tables.Table): class Meta: attrs = { 'class': - 'table table condensed table-striped table-hover' + 'table table-bordered condensed table-striped table-hover' } row_attrs = { 'class': 'table-row', + 'id': lambda record: "row-"+str(record.pk), 'data-href': lambda record: record.pk } diff --git a/templates/note/transactiontemplate_list.html b/templates/note/transactiontemplate_list.html index d1934988..00903e25 100644 --- a/templates/note/transactiontemplate_list.html +++ b/templates/note/transactiontemplate_list.html @@ -8,12 +8,7 @@

{% trans "search button" %}

-
- {% csrf_token %} - -
- +
Créer un bouton @@ -24,3 +19,40 @@ {% endblock %} + +{% block extrajavascript %} + +{% endblock %}