Bugzilla – Attachment 118670 Details for
Bug 27998
Replace obsolete title-string sorting: Serials templates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27998: Replace obsolete title-string sorting: Serials templates
0001-Bug-27998-Replace-obsolete-title-string-sorting-Seri.patch (text/plain), 13.18 KB, created by
Amit Gupta
on 2021-03-23 15:37:20 UTC
(
hide
)
Description:
Bug 27998: Replace obsolete title-string sorting: Serials templates
Filename:
MIME Type:
Creator:
Amit Gupta
Created:
2021-03-23 15:37:20 UTC
Size:
13.18 KB
patch
obsolete
>From c9e4dd7e0b7d009c581f915a6b997b01aefe79cc Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >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 <amitddng135@gmail.com> >--- > .../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 9725e23..6944fdd 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 @@ > <th>Frequency</th> > <th>Numbering pattern</th> > <th title="Number of libraries using this pattern"># of users</th> >- <th class="title-string" title="Last time a library used this pattern">Last import</th> >+ <th title="Last time a library used this pattern">Last import</th> > <th> Comments </th> > [% UNLESS search_only %] > <th class="NoSort noExport">Actions</th> >@@ -42,7 +42,7 @@ > <td>[% IF ( subscription.sfdescription ) %][% subscription.sfdescription | html %][% END %]</td> > <td>[% IF ( subscription.numberingmethod ) %][% subscription.numberingmethod | html %][% END %]</td> > <td>[% IF ( subscription.nbofusers ) %][% subscription.nbofusers | html %][% END %]</td> >- <td><span title="[% subscription.lastimport | html %]">[% subscription.lastimport | $KohaDates %]</span></td> >+ <td data-order="[% subscription.lastimport | html %]">[% subscription.lastimport | $KohaDates %]</td> > <td> > [% FOREACH comment IN subscription.comments %] > [% comment.message | html %] ([% comment.nb | html %])<br /> >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 d25a515..eb5fa55 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 @@ > <th>ISSN</th> > <th>Issue number</th> > <th>Status</th> >- <th class="title-string">Since</th> >+ <th>Since</th> > <th>Claims count</th> >- <th class="title-string">Claim date</th> >+ <th>Claim date</th> > [% FOR field IN additional_fields_for_subscription %] > <th>[% field.name | html %]</th> > [% END %] >@@ -142,20 +142,12 @@ > [% IF ( missingissue.status44 ) %]<span class="status-missing_lost">Missing (lost)</span>[% END %] > [% IF ( missingissue.status7 ) %]<span class="status-claimed">Claimed</span>[% END %] > </td> >- <td class="planneddate"> >- [% IF ( missingissue.planneddate ) %] >- <span title="[% missingissue.planneddateISO | html %]">[% missingissue.planneddate | html %]</span> >- [% ELSE %] >- <span title="0000-00-00"></span> >- [% END %] >+ <td class="planneddate" data-order="[% missingissue.planneddateISO | html %]"> >+ [% missingissue.planneddate | html %] > </td> > <td>[% missingissue.claims_count | html %]</td> >- <td> >- [% IF ( missingissue.claimdate ) %] >- <span title="[% missingissue.claimdateISO | html %]">[% missingissue.claimdate | html %]</span> >- [% ELSE %] >- <span title="0000-00-00"></span> >- [% END %] >+ <td data-order="[% missingissue.claimdateISO | html %]"> >+ [% missingissue.claimdate | html %] > </td> > [% 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 d0b6d72..a70131d 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 ) %] > <th># Subs</th> > [% END %] >- <th class="title-string">Date published >+ <th>Date published > </th> >- <th class="title-string">Date published (text) >+ <th>Date published (text) > </th> >- <th class="title-string">Date received >+ <th>Date received > </th> > <th>Number > </th> >@@ -212,30 +212,24 @@ > [% IF ( subscriptions.size > 1 ) %] > <td><a href="serials-collection.pl?subscriptionid=[% serial.subscriptionid | uri %]">[% serial.subscriptionid | html %]</a></td> > [% END %] >- <td> >- <span title="[% serial.publisheddate | html %]"> >- [% IF serial.publisheddate %] >+ <td data-order="[% serial.publisheddate | html %]"> >+ [% IF serial.publisheddate %] > [% serial.publisheddate | $KohaDates %] >- [% ELSE %] >+ [% ELSE %] > Unknown >- [% END %] >- </span> >+ [% END %] > </td> >- <td> >- [% IF serial.publisheddatetext %] >- <span title="[% serial.publisheddatetext | html %]"> >+ <td data-order="[% serial.publisheddatetext | html %]"> >+ [% IF serial.publisheddatetext %] > [% serial.publisheddatetext | html %] >- </span> >- [% END %] >+ [% END %] > </td> >- <td> >- <span title="[% serial.planneddate | html %]"> >- [% IF serial.planneddate %] >+ <td data-order="[% serial.planneddate | html %]"> >+ [% IF serial.planneddate %] > [% serial.planneddate | $KohaDates %] >- [% ELSE %] >+ [% ELSE %] > Unknown >- [% END %] >- </span> >+ [% END %] > </td> > <td> > [% 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 3a538e1..d3ed758 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 @@ > <th>Location</th> > <th>Call number</th> > [% UNLESS closed %] >- <th class="title-string">Expiration date</th> >+ <th>Expiration date</th> > [% END %] > [% FOR field IN additional_fields_for_subscription %] > <th>[% field.name | html %]</th> >@@ -115,12 +115,8 @@ > [% IF ( subscription.callnumber ) %][% subscription.callnumber | html %][% END %] > </td> > [% UNLESS closed %] >- <td> >- [% IF ( subscription.enddate ) %] >- <span title="[% subscription.enddate | html %]">[% subscription.enddate | $KohaDates %]</span> >- [% ELSE %] >- <span title="0000-00-00"></span> >- [% END %] >+ <td data-order="[% subscription.enddate | html %]"> >+ [% subscription.enddate | $KohaDates %] > </td> > [% 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 cdb5a2f..3b1c18d 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 @@ > <th>Invoice</th> > <th>Basket</th> > <th>Order number</th> >- <th class="title-string">Creation date</th> >- <th class="title-string">Receive date</th> >- <th class="title-string">Status</th> >+ <th>Creation date</th> >+ <th>Receive date</th> >+ <th>Status</th> > <th>Internal note</th> > <th>Vendor note</th> > <th>Fund</th> >@@ -446,15 +446,14 @@ > </td> > <td></td> [%# basket %] > <td>[% order.ordernumber | html %]</td> >- <td><span title="[% order.basket.creationdate | uri %]">[% order.basket.creationdate | $KohaDates%]</span></td> >- <td>[% IF order.datereceived %]<span title="[% order.datereceived | uri %]">[% order.datereceived | $KohaDates %]</span>[% END %]</td> >- <td> >+ <td data-order="[% order.basket.creationdate | uri %]">[% order.basket.creationdate | $KohaDates%]</td> >+ <td data-order="[% order.datereceived | uri %]">[% order.datereceived | $KohaDates %]</td> > [% SWITCH order.orderstatus %] >- [% CASE 'new' %]<span title="status_1">New</span> >- [% CASE 'ordered' %]<span title="status_2">Ordered</span> >- [% CASE 'partial' %]<span title="status_3">Partial</span> >- [% CASE 'complete' %]<span title="status_4">Complete</span> >- [% CASE 'cancelled' %]<span title="status_5">Cancelled</span> >+ [% CASE 'new' %]<td data-order="status_1">New >+ [% CASE 'ordered' %]<td data-order="status_2">Ordered >+ [% CASE 'partial' %]<td data-order="status_3">Partial >+ [% CASE 'complete' %]<td data-order="status_4">Complete >+ [% CASE 'cancelled' %]<td data-order="status_5">Cancelled > [% END %] > </td> > <td>[% order.order_internalnote | html %]</td> >-- >2.7.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27998
:
118551
|
118670
|
118790
|
118900
|
118901