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