]> git.koha-community.org Git - koha.git/commit
Bug 5766 - Add configuration for excluding articles from DataTables sorting
authorOwen Leonard <oleonard@myacpl.org>
Fri, 26 Apr 2013 20:18:05 +0000 (16:18 -0400)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Mon, 12 Aug 2013 13:52:57 +0000 (10:52 -0300)
commit4d428b701a9000c6edd80506d4c491805091010a
tree0063d33325751a64665550e6f003221dc788ab58
parent261c6f39fa234f8795e62eff48db85c9366d4268
Bug 5766 - Add configuration for excluding articles from DataTables sorting

Client-side table sorting should exclude articles like "a," "an," and
"the" when sorting by title. This patch adds a custom sorting plugin for
use by DataTables and a configuration line to the DataTables string
configuration file which can be translated for any language.

As an example, this patch modifies the patron checkout history template
to use the new sort on the title column.

To test, apply the patch and clear your browser cache to ensure the
revised JavaScript file is loaded. Sort the table by title. Titles
should be sorted regardless of the presences of "a," "an", or "the" at
the beginning of the title.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and is a good improvement.
I have added German articles to the list for testing purposes
and it worked nicely.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 33054ce13afe8a0cb1cf5815bbfe3cd18cd8967d)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
koha-tmpl/intranet-tmpl/prog/en/includes/datatables-strings.inc
koha-tmpl/intranet-tmpl/prog/en/js/datatables.js
koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt