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