Bug 32452: Link basket group on basket summary to basket groups page
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / recalls / recalls_to_pull.tt
1 [% USE raw %]
2 [% USE Koha %]
3 [% USE KohaDates %]
4 [% USE AuthorisedValues %]
5 [% USE Branches %]
6 [% USE ItemTypes %]
7 [% USE Asset %]
8 [% SET footerjs = 1 %]
9 [% INCLUDE 'doc-head-open.inc' %]
10 <title>Recalls to pull &rsaquo; Circulation &rsaquo; Koha</title>
11 [% INCLUDE 'doc-head-close.inc' %]
12 </head>
13 <body id="circ_recalls_to_pull" class="circ">
14 [% WRAPPER 'header.inc' %]
15     [% INCLUDE 'cat-search.inc' %]
16 [% END %]
17
18 <div id="breadcrumbs">
19     <a href="/cgi-bin/koha/mainpage.pl">Home</a>
20     &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
21     &rsaquo; <a href="/cgi-bin/koha/recalls/recalls_to_pull.pl">Recalls to pull</a>
22 </div>
23
24 <div class="main container-fluid">
25     <div class="row">
26         [% IF Koha.Preference('CircSidebar') %]
27             <div class="col-sm-10 col-sm-push-2">
28         [% ELSE %]
29             <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
30         [% END %]
31         <main>
32
33         <h1>Recalls to pull</h1>
34         The following recalls could be fulfilled by available items.
35
36         [% IF Koha.Preference('UseRecalls') %]
37             <div id="recalls">
38                 [% IF recalls %]
39                 <table id="recalls-table">
40                     <thead>
41                         <tr>
42                             <th class="recall-topull">Pull this many items</th>
43                             <th class="recall-items">Items available</th>
44                             <th class="recall-patrons">Patrons with recalls</th>
45                             <th class="recall-firstpatron">First patron</th>
46                             <th class="recall-title anti-the">Title</th>
47                             <th class="recall-libraries">Libraries</th>
48                             <th class="recall-callnumbers">Available call numbers</th>
49                             <th class="recall-copynumbers">Available copy numbers</th>
50                             <th class="recall-enumeration">Available enumeration</th>
51                             <th class="recall-itemtypes">Available item types</th>
52                             <th class="recall-locations">Available locations</th>
53                             <th class="recall-date title-string">Earliest recall date</th>
54                             <th class="recall-action nosort">&nbsp;</th>
55                         </tr>
56                     </thead>
57                     <tbody>
58                         [% FOREACH recall IN recalls %]
59                         <tr>
60                             <td class="recall-topull"><b>[% recall.pull_count | html %]</b></td>
61                             <td class="recall-items">[% recall.items_count | html %]</td>
62                             <td class="recall-patrons">[% recall.patrons_count | html %]</td>
63                             <td class="recall-firstpatron"><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% recall.first_recall.patron_id | uri %]">[% recall.first_recall.patron.firstname | html %] [% recall.first_recall.patron.surname | html %]</a></td>
64                             <td class="recall-title">
65                                 [% INCLUDE 'biblio-title.inc' biblio=recall.first_recall.biblio link=1 %]
66                                 [% IF recall.first_recall.biblio.author %] by [% recall.first_recall.biblio.author | html %][% END %]
67                             </td>
68                             <td class="recall-libraries">
69                                 <ul>
70                                     [% FOREACH library IN recall.libraries %]
71                                         <li>[% Branches.GetName( library ) | html %]</li>
72                                     [% END %]
73                                 </ul>
74                             </td>
75                             <td class="recall-callnumbers">
76                                 <ul>
77                                     [% FOREACH callnumber IN recall.callnumbers %]
78                                         <li>[% callnumber | html %]</li>
79                                     [% END %]
80                                 </ul>
81                             </td>
82                             <td class="recall-copynumbers">
83                                 <ul>
84                                     [% FOREACH copyno IN recall.copynumbers %]
85                                         <li>[% copyno | html %]</li>
86                                     [% END %]
87                                 </ul>
88                             </td>
89                             <td class="recall-enumeration">
90                                 <ul>
91                                     [% FOREACH enumchron IN recall.enumchrons %]
92                                         <li>[% enumchron | html %]</li>
93                                     [% END %]
94                                 </ul>
95                             </td>
96                             <td class="recall-itemtypes">
97                                 <ul>
98                                     [% FOREACH itemtype IN recall.itemtypes %]
99                                         <li>[% ItemTypes.GetDescription( itemtype ) | html %]</li>
100                                     [% END %]
101                                 </ul>
102                             </td>
103                             <td class="recall-locations">
104                                 <ul>
105                                     [% FOREACH loc IN recall.locations %]
106                                         <li>[% AuthorisedValues.GetByCode('LOC', loc) | html %]</li>
107                                     [% END %]
108                                 </ul>
109                             </td>
110                             <td class="recall-date">
111                                 <span title="[% recall.first_recall.created_date | html %]">[% recall.first_recall.created_date | $KohaDates %] in [% recall.first_recall.library.branchname | html %]</span>
112                             </td>
113                             <td class="recall-action">
114                                 <form action="/cgi-bin/koha/recalls/recalls_to_pull.pl" method="post">
115                                     <input type="hidden" name="recall_id" value="[% recall.first_recall.id | html %]">
116                                     <input type="hidden" name="op" value="cancel">
117                                     [% IF recall.first_recall.in_transit %]
118                                         <button type="submit" class="btn btn-default cancelreturn"><i class="fa fa-times"></i> Cancel recall and return to: [% Branches.GetName(recall.first_recall.item.homebranch) | html %]</button>
119                                     [% ELSE %]
120                                         <button type="submit" class="btn btn-default cancel"><i class="fa fa-times"></i> Cancel recall</button>
121                                     [% END %]
122                                 </form>
123                             </td>
124                         </tr>
125                         [% END %]
126                     </tbody>
127                 </table>
128                 [% ELSE %]
129                     <div class="dialog message">There are no recalls to pull.</div>
130                 [% END %]
131             </div>
132         [% ELSE %]
133             <div class="dialog message">Recalls have not been enabled. Enable the <a href="/cgi-bin/koha/admin/preferences.pl?tab=circulation">UseRecalls</a> system preference to use recalls.</div>
134         [% END %]
135
136         </main>
137         </div> <!-- /.col-etc -->
138
139         [% IF Koha.Preference('CircSidebar') %]
140             <div class="col-sm-2 col-sm-pull-10">
141                 <aside>
142                     [% INCLUDE 'circ-nav.inc' %]
143                 </aside>
144             </div> <!-- /.col-sm-2.col-sm-pull-10 -->
145         [% END %]
146
147     </div> <!-- /.row -->
148 </div>
149
150 [% MACRO jsinclude BLOCK %]
151     [% INCLUDE 'datatables.inc' %]
152     [% INCLUDE 'columns_settings.inc' %]
153     <script>
154         $(document).ready(function(){
155             $("#recalls-table").dataTable($.extend(true, {}, dataTablesDefaults, {
156                 "aoColumnDefs": [
157                     { 'bSortable': false, 'aTargets': [ 'nosort' ] },
158                     { "sType": "title-string", "aTargets" : [ "title-string" ] },
159                     { "sType": "anti-the", "aTargets": [ "anti-the" ] }
160                 ],
161                 "sPaginationType": "full_numbers"
162             }));
163
164             $(".cancelreturn").click(function(){
165                 return confirmDelete(_("Are you sure you want to remove this recall and return the item to it's home library?"));
166             });
167
168             $(".cancel").click(function(){
169                 return confirmDelete(_("Are you sure you want to remove this recall?"));
170             });
171         });
172     </script>
173 [% END %]
174
175 [% INCLUDE 'intranet-bottom.inc' %]