From e44b187b4720bb419c00e8afd50b80b4bca07958 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 19 Mar 2021 12:32:35 +0000 Subject: [PATCH] Bug 27998: Replace obsolete title-string sorting: Serials templates This patch modifies several serials templates to replace the use of the "title-string" DataTables sorting method with the newer "data-order" attribute. To test, apply the patch and view the following pages to confirm that columns containing dates sort correctly when using any setting of the "dateformat" system preference: - With the Mana service configured in system preferences, go to Serials -> New subscription and add a subscription for a bibliographic record which will match titles in Mana. In the Mana search results, the "Last import" column should sort correctly. - Serials -> Claims - Serials -> Search - Serials -> Subscription details - The affected table is "Acquisition details," so your subscription must have orders associated with it (I eyeballed this change, so could use extra help testing this area). - Serials -> Subscription details -> Serial collection Signed-off-by: Amit Gupta Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- .../mana/mana-subscription-search-result.inc | 4 +-- .../prog/en/modules/serials/claims.tt | 20 ++++------- .../en/modules/serials/serials-collection.tt | 34 ++++++++----------- .../prog/en/modules/serials/serials-search.tt | 10 ++---- .../en/modules/serials/subscription-detail.tt | 21 ++++++------ 5 files changed, 35 insertions(+), 54 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/mana/mana-subscription-search-result.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/mana/mana-subscription-search-result.inc index 9725e239ba..6944fdda92 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/mana/mana-subscription-search-result.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/mana/mana-subscription-search-result.inc @@ -16,7 +16,7 @@ Frequency Numbering pattern # of users - Last import + Last import Comments [% UNLESS search_only %] Actions @@ -42,7 +42,7 @@ [% IF ( subscription.sfdescription ) %][% subscription.sfdescription | html %][% END %] [% IF ( subscription.numberingmethod ) %][% subscription.numberingmethod | html %][% END %] [% IF ( subscription.nbofusers ) %][% subscription.nbofusers | html %][% END %] - [% subscription.lastimport | $KohaDates %] + [% subscription.lastimport | $KohaDates %] [% FOREACH comment IN subscription.comments %] [% comment.message | html %] ([% comment.nb | html %])
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt index a2dd7fec89..b60243b676 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt @@ -105,9 +105,9 @@ ISSN Issue number Status - Since + Since Claims count - Claim date + Claim date [% FOR field IN additional_fields_for_subscription %] [% field.name | html %] [% END %] @@ -156,20 +156,12 @@ [% IF ( missingissue.status44 ) %]Missing (lost)[% END %] [% IF ( missingissue.status7 ) %]Claimed[% END %] - - [% IF ( missingissue.planneddate ) %] - [% missingissue.planneddate | html %] - [% ELSE %] - - [% END %] + + [% missingissue.planneddate | html %] [% missingissue.claims_count | html %] - - [% IF ( missingissue.claimdate ) %] - [% missingissue.claimdate | html %] - [% ELSE %] - - [% END %] + + [% missingissue.claimdate | html %] [% FOR field IN additional_fields_for_subscription %] [% IF field.authorised_value_category %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt index 36c532ee18..c3f5a65dbc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt @@ -178,11 +178,11 @@ [% IF ( subscriptions.size > 1 ) %] # Subs [% END %] - Date published + Date published - Date published (text) + Date published (text) - Date received + Date received Number @@ -226,30 +226,24 @@ [% IF ( subscriptions.size > 1 ) %] [% serial.subscriptionid | html %] [% END %] - - - [% IF serial.publisheddate %] + + [% IF serial.publisheddate %] [% serial.publisheddate | $KohaDates %] - [% ELSE %] + [% ELSE %] Unknown - [% END %] - + [% END %] - - [% IF serial.publisheddatetext %] - + + [% IF serial.publisheddatetext %] [% serial.publisheddatetext | html %] - - [% END %] + [% END %] - - - [% IF serial.planneddate %] + + [% IF serial.planneddate %] [% serial.planneddate | $KohaDates %] - [% ELSE %] + [% ELSE %] Unknown - [% END %] - + [% END %] [% IF ( matches = serial.serialseq.match('(.*)Spring(.*)') ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt index e639cf6587..724fd91521 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-search.tt @@ -79,7 +79,7 @@ Location Call number [% UNLESS closed %] - Expiration date + Expiration date [% END %] [% FOR field IN additional_fields_for_subscription %] [% field.name | html %] @@ -137,12 +137,8 @@ [% IF ( subscription.callnumber ) %][% subscription.callnumber | html %][% END %] [% UNLESS closed %] - - [% IF ( subscription.enddate ) %] - [% subscription.enddate | $KohaDates %] - [% ELSE %] - - [% END %] + + [% subscription.enddate | $KohaDates %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt index b278c45e8f..361fdb671f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-detail.tt @@ -408,9 +408,9 @@ Invoice Basket Order number - Creation date - Receive date - Status + Creation date + Receive date + Status Internal note Vendor note Fund @@ -465,15 +465,14 @@ [%# basket %] [% order.ordernumber | html %] - [% order.basket.creationdate | $KohaDates%] - [% IF order.datereceived %][% order.datereceived | $KohaDates %][% END %] - + [% order.basket.creationdate | $KohaDates%] + [% order.datereceived | $KohaDates %] [% SWITCH order.orderstatus %] - [% CASE 'new' %]New - [% CASE 'ordered' %]Ordered - [% CASE 'partial' %]Partial - [% CASE 'complete' %]Complete - [% CASE 'cancelled' %]Cancelled + [% CASE 'new' %]New + [% CASE 'ordered' %]Ordered + [% CASE 'partial' %]Partial + [% CASE 'complete' %]Complete + [% CASE 'cancelled' %]Cancelled [% END %] [% order.order_internalnote | html %] -- 2.39.5