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