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>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
e0c2ee57ad
commit
e44b187b47
|
|
@ -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 />
|
||||
|
|
|
|||
|
|
@ -105,9 +105,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 %]
|
||||
|
|
@ -156,20 +156,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 %]
|
||||
|
|
|
|||
|
|
@ -178,11 +178,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>
|
||||
|
|
@ -226,30 +226,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(.*)') ) %]
|
||||
|
|
|
|||
|
|
@ -79,7 +79,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>
|
||||
|
|
@ -137,12 +137,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 %]
|
||||
|
||||
|
|
|
|||
|
|
@ -408,9 +408,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>
|
||||
|
|
@ -465,15 +465,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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue