Bug 20212: Use the DT column filtering provided by the wrapper
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 11 Jan 2021 14:42:18 +0000 (15:42 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 28 Jan 2021 15:44:40 +0000 (16:44 +0100)
commit6180725e61796252e3f9f735b0af2e91876acf86
treec2177e8e04bf3b9f8047576009570e277fb087d0
parent379b949d247a772126c794dcf02ea4d98e639a0a
Bug 20212: Use the DT column filtering provided by the wrapper

Bug 27402 is adding it, we do not longer need the query_from_filters JS
function.

This patch also remove the filters on the left. As we have DT
remembering the filter on the table we don't need them anymore.

Technical note:
Prior to this patch, the search on biblio.author, biblio.title and
biblio.isbn was done by adding hidden columns. Now we are using:
  "data": "biblio.author:biblio.title:biblio.isbn"
to tell the wrapper we are going to build a search on these 3
attributes.

Another trick is to pass a default_filters parameters to the wrapper, to
tell it we want to filter on the orders of a given vendor (this is a
bugfix, the original implementation was returning all the orders).
However We should not use /acq/orders?vendor_id=42 but /acq/vendor/42/orders instead (which does not exist yet),
otherwise (with bug 27353 ) we are going to display the wrong number of non-filtering rows.

The change in Orders.pm is only formatting to match what's done in
  Bug 27353: Set X-Base-Total-Count header for REST API

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/REST/V1/Acquisitions/Orders.pm
acqui/finishreceive.pl
acqui/parcel.pl
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt
koha-tmpl/intranet-tmpl/prog/js/datatables.js