From 7cdfa6370f720b99694902c24297a9118a877e50 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 --- .../mana/mana-subscription-search-result.inc | 4 +-- .../prog/en/modules/serials/claims.tt | 20 ++++--------- .../prog/en/modules/serials/serials-collection.tt | 34 +++++++++------------- .../prog/en/modules/serials/serials-search.tt | 10 ++----- .../prog/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 d25a515675..eb5fa555a0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/claims.tt @@ -91,9 +91,9 @@ ISSN Issue number Status - Since + Since Claims count - Claim date + Claim date [% FOR field IN additional_fields_for_subscription %] [% field.name | html %] [% END %] @@ -142,20 +142,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 d0b6d72cf0..a70131dfa9 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 @@ -164,11 +164,11 @@ [% IF ( subscriptions.size > 1 ) %] # Subs [% END %] - Date published + Date published - Date published (text) + Date published (text) - Date received + Date received Number @@ -212,30 +212,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 3a538e1e8e..d3ed7584c2 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 @@ -57,7 +57,7 @@ Location Call number [% UNLESS closed %] - Expiration date + Expiration date [% END %] [% FOR field IN additional_fields_for_subscription %] [% field.name | html %] @@ -115,12 +115,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 cdb5a2f895..3b1c18da96 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 @@ -389,9 +389,9 @@ Invoice Basket Order number - Creation date - Receive date - Status + Creation date + Receive date + Status Internal note Vendor note Fund @@ -446,15 +446,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.11.0