Bug 17698: (QA follow-up) few more things
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / transferstoreceive.tt
1 [% USE Asset %]
2 [% USE Koha %]
3 [% USE KohaDates %]
4 [% USE Branches %]
5 [% SET footerjs = 1 %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha &rsaquo; Circulation &rsaquo; Transfers to receive</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 [% Asset.css("css/datatables.css") %]
10 </head>
11
12 <body id="circ_transferstoreceive" class="circ">
13 [% INCLUDE 'header.inc' %]
14 [% INCLUDE 'circ-search.inc' %]
15
16 <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 receive</div>
17
18 [% IF Koha.Preference('CircSidebar') %]<div id="doc3" class="yui-t2">[% ELSE %]<div id="doc" class="yui-t7">[% END %]
19
20    <div id="bd">
21         <div id="yui-main">
22         [% IF Koha.Preference('CircSidebar') %]<div class="yui-b">[% END %]
23         <div class="yui-g">
24
25         <h1>Transfers made to your library as of [% show_date | $KohaDates %]</h1>
26         [% IF ( branchesloop ) %]
27         <p>Your library is the destination for the following transfer(s)</p>
28                 [% IF ( latetransfers ) %]<p>Transfers are <span class="error">considered late</span> after [% TransfersMaxDaysWarning %] days.</p>[% END %]
29         <div id="resultlist">
30         [% FOREACH branchesloo IN branchesloop %]
31             [% IF ( branchesloo.branchcode ) %]
32             <table style="width: 100%" id="transferst[% branchesloo.branchcode %]">
33             <caption>Coming from [% branchesloo.branchname %]</caption>
34             <thead><tr>
35                 <th class="title-string">Date of transfer</th>
36                 <th class="anti-the">Title</th>
37                 <th>On hold for</th>
38                 <th>Home library</th>
39                 <th>Call no.</th>
40                 <th>&nbsp;</th>
41             </tr></thead>
42             <tbody>[% FOREACH reser IN branchesloo.reserv %]
43                 [% IF ( reser.messcompa ) %]
44                 <tr class="problem">
45                 [% ELSE %]
46                 <tr>
47                 [% END %]
48                     <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>
49                     <td>
50                         [% 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 %]
51                             [% IF ( reser.itemtype ) %] (<b>[% reser.itemtype %]</b>)[% END %]
52                             <br />Barcode: [% reser.barcode %]
53                     </td>
54                     <td>[% IF ( reser.patron ) %]
55                         <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% reser.patron.borrowernumber %]">
56                             [% reser.patron.surname %][%IF ( reser.patron.firstname ) %], [% reser.patron.firstname %][% END %]
57                         </a>
58                         [% IF ( reser.patron.phone ) %]<br />[% reser.patron.phone %][% END %]
59                             [% IF ( reser.patron.first_valid_email_address ) %]
60                                 <br />
61                                 [% BLOCK subject %]Hold:[% END %]
62                                 <a href="mailto:[% reser.patron.first_valid_email_address %]?subject=[% INCLUDE subject %] [% reser.title |html %]">
63                                     [% reser.patron.first_valid_email_address %]
64                                 </a>
65                             [% END %]
66                         [% ELSE %]
67                         <p>None</p>
68                     [% END %]
69                     </td>
70                     <td>[% IF reser.homebranch %][% Branches.GetName( reser.homebranch ) %][% END %]</td>
71                     <td>[% reser.itemcallnumber %]</td>
72                     <td class="actions"><a href="/cgi-bin/koha/circ/returns.pl?itemnumber=[% reser.itemnumber %]&amp;canceltransfer=1&amp;dest=ttr" class="btn btn-default btn-xs"><i class="fa fa-times"></i> Cancel transfer</a></td>
73                 </tr>
74             [% END %]</tbody>
75             </table>
76             [% END %]
77         [% END %]
78         </div>
79     [% ELSE %]
80         <p>No transfers to receive</p>
81     [% END %]
82
83 </div>
84 </div>
85 [% IF Koha.Preference('CircSidebar') %]
86 </div>
87 <div class="yui-b noprint">
88     [% INCLUDE 'circ-nav.inc' %]
89 </div>
90 [% END %]
91 </div>
92
93 [% MACRO jsinclude BLOCK %]
94     [% INCLUDE 'datatables.inc' %]
95     <script type="text/javascript">
96         $(document).ready(function() {
97             [% FOREACH branchesloo IN branchesloop %]
98             $("#transferst[% branchesloo.branchcode %]").dataTable($.extend(true, {}, dataTablesDefaults, {
99                 "aoColumnDefs": [
100                     { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
101                     { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
102                     { "sType": "title-string", "aTargets" : [ "title-string" ] }
103                 ],
104                 "sDom": 't',
105                 "bPaginate": false
106             }));
107             [% END %]
108         });
109     </script>
110 [% END %]
111
112 [% INCLUDE 'intranet-bottom.inc' %]