Bug 19532: Recalls on intranet
[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>Transfers to receive &rsaquo; Circulation &rsaquo; Koha</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 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
17     <ol>
18         <li>
19             <a href="/cgi-bin/koha/mainpage.pl">Home</a>
20         </li>
21         <li>
22             <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
23         </li>
24         <li>
25             <a href="#" aria-current="page">
26                 Transfers to receive
27             </a>
28         </li>
29     </ol>
30 </nav>
31
32 <div class="main container-fluid">
33     <div class="row">
34         <div class="col-sm-12">
35             <main>
36                 <div class="row">
37
38                 [% IF Koha.Preference('CircSidebar') %]
39                     <div class="col-sm-10 col-sm-push-2">
40                 [% ELSE %]
41                     <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
42                 [% END %]
43
44         <h1>Transfers made to your library as of [% show_date | $KohaDates %]</h1>
45         [% IF ( branchesloop ) %]
46         <p>Your library is the destination for the following transfer(s)</p>
47                 [% IF ( latetransfers ) %]<p>Transfers are <span class="error">considered late</span> after [% TransfersMaxDaysWarning | html %] days.</p>[% END %]
48         <div id="resultlist">
49         [% FOREACH branchesloo IN branchesloop %]
50             [% IF ( branchesloo.branchcode ) %]
51             <table style="width: 100%" id="transferst[% branchesloo.branchcode | html %]">
52             <caption>Coming from [% branchesloo.branchname | html %]</caption>
53             <thead><tr>
54                 <th>Date of transfer</th>
55                 <th class="anti-the">Title</th>
56                 <th>On hold for</th>
57                 <th>Home library</th>
58                 <th>Call number</th>
59                 <th>&nbsp;</th>
60             </tr></thead>
61             <tbody>[% FOREACH reser IN branchesloo.reserv %]
62                 [% IF ( reser.messcompa ) %]
63                 <tr class="problem">
64                 [% ELSE %]
65                 <tr>
66                 [% END %]
67                     <td data-order="[% reser.datetransfer | html %]"><p>[% reser.datetransfer | $KohaDates %]</p> [% IF ( reser.messcompa ) %]<span class="error">Transfer is [% reser.diff | html %] days late</span>[% END %]</td>
68                     <td>
69                         [% INCLUDE 'biblio-title.inc' biblio=reser link = 1 %] [% IF ( reser.author ) %]by [% reser.author | html %][% END %]
70                             [% IF ( reser.itemtype ) %] (<strong>[% reser.itemtype | html %]</strong>)[% END %]
71                             <br />Barcode: [% reser.barcode | html %]
72                     </td>
73                     <td>[% IF ( reser.patron ) %]
74                         <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% reser.patron.borrowernumber | uri %]">
75                             [% reser.patron.surname | html %][%IF ( reser.patron.firstname ) %], [% reser.patron.firstname | html %][% END %]
76                         </a>
77                         [% IF ( reser.patron.phone ) %]<br />[% reser.patron.phone | html %][% END %]
78                             [% IF ( reser.patron.first_valid_email_address ) %]
79                                 <br />
80                                 [% BLOCK subject %]Hold:[% END %]
81                                 <a href="mailto:[% reser.patron.first_valid_email_address | uri %]?subject=[% INCLUDE subject %] [% reser.title | uri %]">
82                                     [% reser.patron.first_valid_email_address | html %]
83                                 </a>
84                             [% END %]
85                         [% ELSIF ( reser.recall ) %]
86                             Recall requested by <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% reser.recall.borrowernumber | uri %]">[% reser.recall.patron.surname | html %][% IF reser.recall.patron.firstname %], [% reser.recall.patron.firstname | html %][% END %] ([% reser.recall.patron.cardnumber | html %])</a>
87                         [% ELSE %]
88                         <p>None</p>
89                     [% END %]
90                     </td>
91                     <td>[% IF reser.homebranch %][% Branches.GetName( reser.homebranch ) | html %][% END %]</td>
92                     <td>[% reser.itemcallnumber | html %]</td>
93                     <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>
94                 </tr>
95             [% END %]</tbody>
96             </table>
97             [% END %]
98         [% END %]
99         </div>
100     [% ELSE %]
101         <p>No transfers to receive</p>
102     [% END %]
103
104                     [% IF Koha.Preference('CircSidebar') %]
105                             </div> <!-- /.col-sm-10.col-sm-push-2 -->
106                             <div class="col-sm-2 col-sm-pull-10">
107                                 <aside>
108                                     [% INCLUDE 'circ-nav.inc' %]
109                                 </aside>
110                             </div> <!-- /.col-sm-2.col-sm-pull-10 -->
111                         </div> <!-- /.row -->
112                     [% END %]
113
114             </main>
115         </div> <!-- /.col-sm-12 -->
116     </div> <!-- /.row -->
117
118 [% MACRO jsinclude BLOCK %]
119     [% INCLUDE 'datatables.inc' %]
120     <script>
121         $(document).ready(function() {
122             [% FOREACH branchesloo IN branchesloop %]
123             $("#transferst[% branchesloo.branchcode | html %]").dataTable($.extend(true, {}, dataTablesDefaults, {
124                 "aoColumnDefs": [
125                     { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
126                     { "sType": "anti-the", "aTargets" : [ "anti-the" ] }
127                 ],
128                 "sDom": 't',
129                 "bPaginate": false
130             }));
131             [% END %]
132         });
133     </script>
134 [% END %]
135
136 [% INCLUDE 'intranet-bottom.inc' %]