Koha/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersubscription.tt
Owen Leonard 7fba4e3ef8 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>
2014-04-28 18:41:28 +00:00

119 lines
5.6 KiB
Text

[% USE KohaDates %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Serials [% biblionumber %]</title>
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
[% INCLUDE 'doc-head-close.inc' %]
[% INCLUDE 'datatables.inc' %]
<script type="text/javascript">
//<![CDATA[
function updateRowsVisibility(show_only_renewed) {
if ( show_only_renewed ) {
$("#srlt [data-reneweddate='']").hide();
} else {
$("#srlt > tbody > tr").show();
}
}
$(document).ready(function() {
$("#srlt").dataTable($.extend(true, {}, dataTablesDefaults, {
"aoColumnDefs": [
{ "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
{ "sType": "anti-the", "aTargets" : [ "anti-the" ] },
{ "sType": "title-string", "aTargets" : [ "title-string" ] }
]
} ) )
$("#show_only_renewed").click(function(){
updateRowsVisibility($(this+":checked").val());
});
$("#show_only_renewed").attr('checked', false);
updateRowsVisibility(false);
$("#advsearch_form").show();
});
//]]>
</script>
</head>
<body>
[% INCLUDE 'header.inc' %]
[% INCLUDE 'acquisitions-search.inc' %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% supplierid %]">[% booksellername %]</a> &rsaquo; <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Shopping Basket [% basketno %]</a> &rsaquo; Add order from a subscription</div>
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<h2>Serials subscriptions</h2>
[% IF (done_searched) %]
<label for="show_only_renewed">
<input type="checkbox" style="vertical-align: middle;" id="show_only_renewed" />
Show only renewed
</label>
[% IF (subs_loop) %]
<table id="srlt">
<thead>
<tr>
<th>ISSN</th>
<th class="anti-the">Title</th>
<th> Notes </th>
<th>Library</th>
<th>Call number</th>
<th class="title-string">Expiration date</th>
<th class="NoSort"></th>
</tr>
</thead>
<tbody>
[% FOREACH sub IN subs_loop %]
<tr data-reneweddate="[% sub.reneweddate %]" >
<td>[% sub.issn %]</td>
<td><a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% sub.subscriptionid %]" class="button" title="subscription detail">[% IF (sub.title) %][% sub.title |html %][% ELSE %]
---
[% END %][% IF (sub.unititle) %], [% sub.unititle %][% END %]</a>
</td>
<td>[% IF (sub.publicnotes) %][% sub.publicnotes %][% END %]
[% IF (sub.internalnotes) %]([% sub.internalnotes %])[% END %]
</td>
<td>
[% IF (sub.branchcode) %][% sub.branchcode %][% END %]
</td>
<td>
[% IF (sub.callnumber) %][% sub.callnumber %][% END %]
</td>
<td>
[% IF (sub.enddate) %]
<span title="[% sub.enddate %]">[% sub.enddate | $KohaDates %]</span>
[% ELSE %]
<span title="0000-00-00"></span>
[% END %]
</td>
<td>
[% IF (sub.alreadyOnOrder) %]
Outstanding order (only one order per subscription is allowed)
[% ELSIF not sub.aqbooksellerid || booksellerid == sub.aqbooksellerid%]
<a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]&amp;biblionumber=[% sub.biblionumber %]&amp;subscriptionid=[% sub.subscriptionid %]" title="Order this one">
Order
</a>
[% ELSE %]
<a title="This subscription depends on another supplier" style="cursor:help">Cannot be ordered</a>
[% END %]
</td>
</tr>
[% END %]
</tbody>
</table>
[% ELSE %]
<p>Sorry, there is no result for your search.</p>
[% END %]
[% ELSE %]
<p>Use the search form on the left to find subscriptions.</p>
[% END %]
</div>
</div>
<div class="yui-b">
[% INCLUDE 'subscriptions-search.inc' %]
[% INCLUDE 'acquisitions-menu.inc' %]
</div>
</div>
[% INCLUDE 'intranet-bottom.inc' %]