Bug 30291: Changes to staff client files
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / recalls / recalls_waiting.tt
1 [% USE raw %]
2 [% USE Koha %]
3 [% USE KohaDates %]
4 [% USE Asset %]
5 [% SET footerjs = 1 %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Recalls awaiting pickup &rsaquo; Circulation &rsaquo; Koha</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 </head>
10 <body id="circ_recalls_awaiting_pickup" class="circ">
11 [% INCLUDE 'header.inc' %]
12 [% INCLUDE 'cat-search.inc' %]
13
14 <div id="breadcrumbs">
15     <a href="/cgi-bin/koha/mainpage.pl">Home</a>
16     &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
17     &rsaquo; <a href="/cgi-bin/koha/recalls/recalls_waiting.pl">Recalls awaiting pickup</a>
18 </div>
19
20 <div class="main container-fluid">
21     <div class="row">
22         [% IF Koha.Preference('CircSidebar') %]
23             <div class="col-sm-10 col-sm-push-2">
24         [% ELSE %]
25             <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
26         [% END %]
27         <main>
28                 <h1>Recalls awaiting pickup</h1>
29
30                 [% IF Koha.Preference('UseRecalls') %]
31
32                 <div id="results" class="toptabs">
33
34                     <ul>
35                         <li><a href="#recallswaiting">Recalls waiting: [% recalls.count | html %]</a></li>
36                         <li><a href="#recallsover">Recalls waiting over [% Koha.Preference('RecallsMaxPickUpDelay') | html %] days: [% over.count | html %]</a></li>
37                     </ul>
38
39                     <div id="recallswaiting">
40                         [% IF ( recalls ) %]
41                             <table id="recallswaiting-table">
42                                 <thead><tr>
43                                     <th class="recall-waitingdate title-string">Available since</th>
44                                     <th class="recall-title anti-the">Title</th>
45                                     <th class="recall-patron">Requested by</th>
46                                     <th class="recall-library">Pickup location</th>
47                                     <th class="recall-action nosort">&nbsp;</th>
48                                 </tr></thead>
49                                 <tbody>
50                                     [% FOREACH recall IN recalls %]<tr>
51                                         <td class="recall-waitingdate">[% recall.waiting_date | $KohaDates %]</td>
52                                         <td class="recall-title">
53                                             <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% recall.biblio_id | uri %]">
54                                                 [% recall.biblio.title | html %]
55                                                 [% FOREACH s IN recall.biblio.subtitle %]
56                                                     [% s | html %]
57                                                 [% END %]
58                                             </a>
59                                             [% recall.biblio.author | html %]
60                                             <br><i>Barcode: [% recall.item.barcode | html %]</i>
61                                         </td>
62                                         <td class="recall-patron">
63                                              <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% recall.patron_id | uri %]">[% recall.patron.firstname | html %] [% recall.patron.surname | html %]</a>
64                                              [% IF ( recall.patron.phone ) %]<br />[% recall.patron.phone | html %][% END %]
65                                              [% IF ( recall.patron.email ) %]<br /><a href="mailto:[% recall.patron.email | uri %]?subject=Recall waiting: [% recall.biblio.title | uri %]">[% recall.patron.email | html %]</a>[% END %]
66                                         </td>
67                                         <td class="recall-library">[% recall.library.branchname | html %]</td>
68                                         <td class="recall-action actions">
69                                             <form action="/cgi-bin/koha/recalls/recalls_waiting.pl" method="post">
70                                                 <input type="hidden" name="recall_id" value="[% recall.id | html %]">
71                                                 <input type="hidden" name="op" value="modify">
72                                                 <fieldset class="action">
73                                                     <input type="submit" name="revert" class="revert_recall" value="Revert waiting status">
74                                                     <input type="submit" name="expire" class="expire_recall" value="Expire recall">
75                                                 </fieldset>
76                                             </form>
77                                         </td>
78                                     </tr>[% END %]
79                                 </tbody>
80                             </table>
81                         [% ELSE %]
82                             <div class="dialog message">There are no recalls to show.</div>
83                         [% END %]
84                     </div> <!-- recallswaiting -->
85
86                     <div id="recallsover">
87                         [% IF ( over.size ) %]
88                             [% IF ( Koha.Preference('RecallsMaxPickUpDelay') ) %]<p>Recalls listed here have been awaiting pickup for more than [% Koha.Preference('RecallsMaxPickUpDelay') | html %] days.</p>[% END %]
89                             <table id="recallsover-table">
90                                 <thead><tr>
91                                     <th class="recall-waitingdate title-string">Available since</th>
92                                     <th class="recall-title anti-the">Title</th>
93                                     <th class="recall-patron">Requested by</th>
94                                     <th class="recall-library">Pickup location</th>
95                                     <th class="recall-action nosort">&nbsp;</th>
96                                 </tr></thead>
97                                 <tbody>
98                                     [% FOREACH recall IN over %]<tr>
99                                         <td class="recall-waitingdate">[% recall.waiting_date | $KohaDates %]</td>
100                                         <td class="recall-title">
101                                             <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% recall.biblio_id | uri %]">
102                                                 [% recall.biblio.title | html %]
103                                                 [% FOREACH s IN recall.biblio.subtitles %]
104                                                     [% s | html %]
105                                                 [% END %]
106                                                 [% recall.item.enumchron | html %]
107                                             </a>
108                                             [% recall.biblio.author | html %]
109                                             <br><i>Barcode: [% recall.item.barcode | html %]</i>
110                                         </td>
111                                         <td class="recall-patron">
112                                             <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% recall.patron_id | uri %]">[% recall.patron.firstname | html %] [% recall.patron.surname | html %]</a>
113                                             [% IF ( recall.patron.phone ) %]<br />[% recall.patron.phone | html %][% END %]
114                                             [% IF ( recall.patron.email ) %]<br /><a href="mailto:[% recall.patron.email | uri %]?subject=Recall waiting: [% recall.biblio.title | uri %]">[% recall.patron.email | html %]</a>[% END %]
115                                         </td>
116                                         <td class="recall-library">[% recall.library.branchname | html %]</td>
117                                         <td class="recall-action actions">
118                                             <form action="/cgi-bin/koha/recalls/recalls_waiting.pl" method="post">
119                                                 <input type="hidden" name="recall_id" value="[% recall.id | html %]">
120                                                 <input type="hidden" name="op" value="modify">
121                                                 <fieldset class="action">
122                                                     <input type="submit" name="revert" class="revert_recall" value="Revert waiting status">
123                                                     <input type="submit" name="expire" class="expire_recall" value="Expire recall">
124                                                 </fieldset>
125                                             </form>
126                                         </td>
127                                     </tr>[% END %]
128                                 </tbody>
129                             </table>
130                         [% ELSE %]
131                             <div class="dialog message">There are no recalls to show.</div>
132                         [% END %]
133                     </div> <!-- recallsover -->
134
135                 </div> <!-- results-->
136
137                 [% ELSE %]
138                     <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>
139                 [% END %] <!-- Koha.Preference('UseRecalls') -->
140
141         </main>
142         </div> <!-- /.col-etc -->
143
144         [% IF Koha.Preference('CircSidebar') %]
145             <div class="col-sm-2 col-sm-pull-10">
146                 <aside>
147                     [% INCLUDE 'circ-nav.inc' %]
148                 </aside>
149             </div> <!-- /.col-sm-2.col-sm-pull-10 -->
150         [% END %]
151
152     </div> <!-- /.row -->
153 </div>
154
155 [% MACRO jsinclude BLOCK %]
156     [% INCLUDE 'datatables.inc' %]
157     [% INCLUDE 'columns_settings.inc' %]
158     <script>
159         $(document).ready(function() {
160             $('#results').tabs();
161
162             $("#recallswaiting-table, #recallsover-table").dataTable($.extend(true, {}, dataTablesDefaults, {
163                 "autoWidth": false,
164                 "aoColumnDefs": [
165                     { 'bSortable': false, 'aTargets': [ 'nosort' ] },
166                 ],
167                 "sPaginationType": "full_numbers"
168             }));
169
170             $(".revert_recall").click(function(e) {
171                 return confirmDelete(_("Are you sure you want to revert this recall's status from Waiting?"));
172             });
173
174             $(".expire_recall").click(function(e) {
175                 return confirmDelete(_("Are you sure you want to remove this recall?"));
176             });
177         });
178     </script>
179 [% END %]
180
181 [% INCLUDE 'intranet-bottom.inc' %]