Koha/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt
Katrin Fischer e5cea455d0 Bug 14356: Improvements to the 'Transfers to receive' page
Patch makes several small changes to the template for the
'Transfers to receive page'

1) Show the branch name instead of the branchcode in the
   table of incoming transfers.

If there is a hold connected with the transfer:
2) Show the patron's name as 'surname, firstname'
   intead of 'surname  firstname'
3) Restore broken feature: Show a mailto: link with a
   generated subject of 'Hold: <title>'.

The mailto: feature actually existed in the templates, but
was broken to a misnamed database column. I made some small
changes to make the subject translatable (see bug 8330).

To test:
- Create a transfer by placing a hold with pickup at another library
- Craete a transfer manually
- Go to the circulation > transfers to receive
- Check the changes explained above, compare before and after
- Check the mailto: link works as expected

Bonus: Check the Hold: bit in the subject is really translatable now.

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-06-22 17:30:53 -03:00

99 lines
4.5 KiB
Text

[% USE KohaDates %]
[% USE Branches %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Circulation &rsaquo; Transfers to your library</title>
[% INCLUDE 'doc-head-close.inc' %]
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
[% INCLUDE 'datatables.inc' %]
<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
[% FOREACH branchesloo IN branchesloop %]
$("#transferst[% branchesloo.branchcode %]").dataTable($.extend(true, {}, dataTablesDefaults, {
"aoColumnDefs": [
{ "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
{ "sType": "anti-the", "aTargets" : [ "anti-the" ] },
{ "sType": "title-string", "aTargets" : [ "title-string" ] }
],
"sDom": 't',
"bPaginate": false
}));
[% END %]
});
//]]>
</script>
</head>
<body id="circ_transferstoreceive" class="circ">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'circ-search.inc' %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> &rsaquo; Transfers to your library</div>
<div id="doc" class="yui-t7">
<div id="bd">
<div id="yui-main">
<div class="yui-g">
<h1>Transfers made to your library as of [% show_date %]</h1>
[% IF ( branchesloop ) %]
<p>Your library is the destination for the following transfer(s)</p>
[% IF ( latetransfers ) %]<p>Transfers are <span class="error">considered late</span> after [% TransfersMaxDaysWarning %] days.</p>[% END %]
<div id="resultlist">
[% FOREACH branchesloo IN branchesloop %]
[% IF ( branchesloo.branchcode ) %]
<table style="width: 100%" id="transferst[% branchesloo.branchcode %]">
<caption>Coming from [% branchesloo.branchname %]</caption>
<thead><tr>
<th class="title-string">Date of transfer</th>
<th class="anti-the">Title</th>
<th>On hold for</th>
<th>Home library</th>
<th>Call no.</th>
<th>&nbsp;</th>
</tr></thead>
<tbody>[% FOREACH reser IN branchesloo.reserv %]
[% IF ( reser.messcompa ) %]
<tr class="problem">
[% ELSE %]
<tr>
[% END %]
<td><p><span title="[% reser.datetransfer %]">[% reser.datetransfer | $KohaDates %]</span></p> [% IF ( reser.messcompa ) %]<span class="error">Transfer is [% reser.diff %] days late</span>[% END %]</td>
<td>
[% INCLUDE 'biblio-default-view.inc' biblionumber = reser.biblionumber %][% reser.title |html %] [% IF ( reser.subtitle ) %] [% FOREACH subtitl IN reser.subtitle %][% subtitl.subfield %][% END %][% END %]</a> [% IF ( reser.author ) %]by [% reser.author %][% END %]
[% IF ( reser.itemtype ) %] (<b>[% reser.itemtype %]</b>)[% END %]
<br />Barcode: [% reser.barcode %]
</td>
<td>[% IF ( reser.borrowername ) %]
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% reser.borrowernum %]">
[% reser.borrowername %][%IF ( reser.borrowerfirstname ) %], [% reser.borrowerfirstname %][% END %]
</a>
[% IF ( reser.borrowerphone ) %]<br />[% reser.borrowerphone %][% END %]
[% IF ( reser.borrowermail ) %]
<br />
[% BLOCK subject %]Hold:[% END %]
<a href="mailto:[% reser.borrowermail %]?subject=[% INCLUDE subject %] [% reser.title |html %]">
[% reser.borrowermail %]
</a>
[% END %]
[% ELSE %]
<p>None</p>
[% END %]
</td>
<td>[% IF reser.homebranch %][% Branches.GetName( reser.homebranch ) %][% END %]</td>
<td>[% reser.itemcallnumber %]</td>
<td><a href="/cgi-bin/koha/circ/returns.pl?itemnumber=[% reser.itemnumber %]&amp;canceltransfer=1&amp;dest=ttr">Cancel transfer</a></td>
</tr>
[% END %]</tbody>
</table>
[% END %]
[% END %]
</div>
[% ELSE %]
<p>No transfers to receive</p>
[% END %]
</div>
</div>
</div>
[% INCLUDE 'intranet-bottom.inc' %]