Bug 11719 - Use new DataTables include in serials templates

Bug 10649 introduced a new include file for adding DataTables-related
JavaScript assets. This patch adds use of this include file to all
serials-related pages which use DataTables.

Apply the patch and test the following pages to confirm that table
sorting works correctly:

- Serials search results (serials/serials-search.pl): Perform a search
  which will return more than one subscription. The expiration date
  column is now sorted using the "title-string" filter for sorting based
  on the unformatted date. The "anti-the" filter has been added to the
  title column to exclude articles when sorting.

- Serials collection (serials/serials-collection.pl): View the serial
  colection page for an existing subscription. The table of issues
  should be sorted correctly.

- Serial claims (serials/claims.pl): The "since" and
  "claim date" columns have been modified to use the title-string filter
  for sorting based on the unformatted date.
  C4::Serials.pm::GetLateOrMissingIssues has been modified to pass an
  unformatted date along with the formatted date. The "anti-the" filter
  has been added to the title column to exclude articles when sorting.

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested all 3 tables, no regressions found.
Passes QA script and tests.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11719: (follow-up) fix column sorting configuration

This patch corrects column sorting configuration to avoid an error when
sorting on the call number column. Also changed: removed obsolete UK
sort mention.

To test, search for serial subscriptions. Test sorting on all columns in
the results table with and without the RoutingSerials preference
enabled. Sorting should work correctly without error.

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 11719: (follow-up) fixed two more sorting issues

This second follow-up addresses QA issues:

- Corrected sorting on claims page while converting sorting
  configuration to up-to-date method.
- Removed sorting from routing list column on serial collection page.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 12088: Improve date handling and sorting in holds to pull report

The holds to pull report could be improved by improving sorting on the
title and date columns. This patch adds "anti-the" sorting to the title
column and "title-string" sorting to the date column.

Date formatting of another variable has been moved to the template for
formatting using KohaDates.

The patch includes other corrections for HTML validity.

To test, apply the patch and view the holds to pull report.
 - Sorting by date should work correctly regardless of dateformat system
   preference setting.
 - Sorting of the title columns should correctly ignore articles.
 - Formatting of the "Reported on" date should be correct.

Revision incorporates the corrections made by Bug 12127 and converts
those changes to use class-based sorting.

Signed-off-by: David Cook <dcook@prosentient.com.au>

The patch works as described. Thanks for including and improving the
changes from Bug 12127, Owen!

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and tests.
No regressions found, works as advertised.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 12089: Remove use of dt_add_type_uk_date() - Members

This patch removes use of dt_add_type_uk_date() from the circulation
history page and updates the sorting configuration according to
current guidelines.

The patch also makes corrections for HTML validity.

To test, open the circulation history page for a patron with a history
of checkouts. Confirm that the date, title, checkout date, due date, and
return date columns sort correctly.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 12089: Remove use of dt_add_type_uk_date() - Budgets

This patch removes use of dt_add_type_uk_date() from the budgets
administration page and updates the sorting configuration according to
current guidelines. Date sorting is converted to the title-string
method. Invalid <td> "align" attribute is replaced with a class.

Also corrected: Active tab selection based on class.

To test, go to Administration -> Budgets and confirm that sorting works
correctly on both the active and inactive budget tabs. Sorting by date
should work correctly regardless of dateformat system preference.

To test tab selection, append "?tab=2" to the page URL and confirm that
the inactive budget tab is selected.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 12089: Remove use of dt_add_type_uk_date() - Circulation

This patch removes instances of dt_add_type_uk_date() from there
circulation templates and updates the sorting configuration according to
current guidelines.

To test, enable the UseTablesortForCirc system preference and open a
patron for circulation who has multiple items checked out. Confirm that
sorting by due date, title, and checkout date work correctly.

Locate a patron who is guarantor to another or is guaranteed by another.
One or both patrons should have checkouts. The "relatives checkouts" tab
on the checkout page should sort correctly on due date, title, and
checkout date.

On the transfers to receive report, confirm that sorting by date of
transfer and title work correctly for all tables.

On the holds awaiting pickup report the "available since" and title
columns should sort correctly for tables in both tabs (waiting and
over).

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 12089: Remove use of dt_add_type_uk_date() - Acquisitions

This patch removes instances of dt_add_type_uk_date() from acquisitions
templates and updates sorting configurations according to current
guidelines.

In cases where a formatted date was passed from a Perl script, the
script has been modified to pass an unformatted date.

Several instances of the no longer valid align attribute have been
removed from <td> tags in favor of an existing "data" class which is
suitable for display of currency values.

To test, view the following pages in Acquisitions. Columns containing
dates should sort correctly regardless of dateformat system preference
setting. Columns containing bibliographic titles should ignore articles
when sorting.

- Add to an order from a staged file: The table of staged files should
  sort correctly. After clicking "add orders" for one of the staged
  files, the table of titles in that staged file should also be sorted
  correctly.

- Add to an order from a subscription. The table of subscription search
  results should sort correctly.

- Orders search results should sort correctly.

- Late orders should sort correctly.

- Search for a vendor. Click on the vendor name to view the vendor
  detail page. The table of contracts on this page should sort
  correctly.

- From the Acquisitions home page click a number in the "spent" column
  of the table of available funds. The table of orders should sort
  correctly.

- From the Acquisitions home page click a number in the "ordered" column
  of the table of available funds. The table of orders should sort
  correctly.

- From a vendor detail page, click the "Receive shipments" button. On
  the receive shipments page the table of shipments should be sorted
  correctly.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Bug 12089: Remove use of dt_add_type_uk_date() - JavaScript

This patch removes the now unused dt_add_type_uk_date function from
Koha's custom DataTables javascript file.

To test, be sure all other patches on Bug 12089 are applied. Apply this
patch and search for instances of dt_add_type_uk_date. There should be
none.

Signed-off-by: David Cook <dcook@prosentient.com.au>

Works as described.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script, works as described.
No regressions found, sorting and searching in all tables
touched by these patches works ok.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>