Bug 14251: Add weasyprint dependency
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-recalls.tt
1 [% USE Koha %]
2 [% USE KohaDates %]
3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Your recalls history &rsaquo; [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
5 [% INCLUDE 'doc-head-close.inc' %]
6 [% BLOCK cssinclude %][% END %]
7 </head>
8 [% INCLUDE 'bodytag.inc' bodyid='opac-recalls' bodyclass='scrollto' %]
9 [% INCLUDE 'masthead.inc' %]
10 <div class="main">
11     <nav aria-label="breadcrumb">
12         <ul class="breadcrumb">
13             <li class="breadcrumb-item">
14                 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
15             </li>
16             <li class="breadcrumb-item">
17                 <a href="#">Your recalls history</a>
18             </li>
19         </ul>
20     </nav>
21     <div class="container-fluid">
22         <div class="row">
23             <div class="col col-lg-2 order-2 order-lg-1">
24                 <div id="navigation">
25                     [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
26                 </div>
27             </div>
28             <div class="col-md-12 col-lg-10 order-1 order-lg-2">
29                 <div id="recalls" class="maincontent">
30                     <h2>Recalls history</h2>
31                     [% IF Koha.Preference('UseRecalls') %]
32                         [% IF RECALLS.count %]
33                             <div id="opac-user-recalls">
34                                 <table id="recalls-table" class="table table-bordered table-striped">
35                                     <thead>
36                                         <tr>
37                                             <th class="anti-the">Title</th>
38                                             <th class="psort">Placed on</th>
39                                             <th>Expires on</th>
40                                             <th>Pickup location</th>
41                                             <th>Status</th>
42                                             <th>Due date</th>
43                                             <th class="nosort">&nbsp;</th>
44                                         </tr>
45                                     </thead>
46                                     <tbody>
47                                         [% FOREACH RECALL IN RECALLS %]
48                                             <tr>
49                                                 <td class="title">
50                                                     <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% RECALL.biblio_id | html %]">
51                                                          [% RECALL.biblio.title | html %]
52                                                          [% FOREACH s IN RECALL.biblio.subtitle %]
53                                                             [% s | html %]
54                                                          [% END %]
55                                                     </a>
56                                                     [% RECALL.biblio.author | html %]
57                                                 </td>
58                                                 <td class="recalldate" data-order="[% RECALL.created_date | html %]">
59                                                     <span title="[% RECALL.created_date | html %]">
60                                                         <span class="tdlabel">Recall date:</span>
61                                                             [% RECALL.created_date | $KohaDates %]
62                                                     </span>
63                                                 </td>
64                                                 <td class="expirationdate" data-order="[% RECALL.expiration_date | html %]">
65                                                         [% IF ( RECALL.expiration_date ) %]
66                                                             <span title="[% RECALL.expiration_date | html %]">
67                                                                 <span class="tdlabel">Expiration:</span>
68                                                                 [% RECALL.expiration_date | $KohaDates %]
69                                                             </span>
70                                                         [% ELSIF ( !RECALL.completed ) %]
71                                                             <span title="0000-00-00">
72                                                                 <span class="tdlabel">Expiration:</span>
73                                                                     Never expires
74                                                                 </span>
75                                                         [% ELSE %]
76                                                             <span title="0000-00-00">-</span>
77                                                         [% END %]
78                                                     </td>
79                                                     <td class="branch">
80                                                         <span class="tdlabel">Pick up location:</span>
81                                                         [% RECALL.library.branchname | html %]
82                                                     </td>
83                                                     <td class="status">
84                                                         <span class="tdlabel">Status:</span>
85                                                         [% IF ( RECALL.in_transit ) %]
86                                                             <span>In transit to [% RECALL.library.branchname | html %]</span>
87                                                         [% ELSIF ( RECALL.waiting ) %]
88                                                             <span>Ready for pickup</span>
89                                                         [% ELSIF ( RECALL.overdue ) %]
90                                                             <span>Overdue to be returned</span>
91                                                         [% ELSIF ( RECALL.expired ) %]
92                                                             <span>Expired on [% RECALL.expiration_date | $KohaDates %]</span>
93                                                         [% ELSIF ( RECALL.cancelled ) %]
94                                                             <span>Cancelled on [% RECALL.completed_date | $KohaDates %]</span>
95                                                         [% ELSIF ( RECALL.fulfilled ) %]
96                                                             <span>Fulfilled</span>
97                                                         [% ELSE %]
98                                                             <span>Requested</span>
99                                                         [% END %]
100                                                     </td>
101                                                     <td class="due_date">
102                                                         <span class="tdlabel">Due date</span>
103                                                         [% IF ( RECALL.requested ) %]
104                                                             <span>Due to be returned by [% RECALL.checkout.date_due | $KohaDates %]</span>
105                                                         [% ELSIF ( RECALL.waiting and RECALL.expiration_date ) %]
106                                                             <span>Pick up by [% RECALL.expiration_date | $KohaDates %]</span>
107                                                         [% ELSE %]
108                                                             -
109                                                         [% END %]
110                                                     </td>
111
112                                                     <td class="cancelrecall">
113                                                         [% IF ( RECALL.requested or RECALL.overdue ) %]
114                                                             <form action="/cgi-bin/koha/opac-recall.pl" method="post">
115                                                                 <input type="hidden" name="op" value="cancel">
116                                                                 <input type="hidden" name="recall_id" value="[% RECALL.id | html %]">
117                                                                 <input type="hidden" name="biblionumber" value="[% RECALL.biblio_id | html %]">
118                                                                 <input type="submit" name="submit" class="btn btn-danger cancel_recall" value="Cancel">
119                                                             </form>
120                                                         [% END %]
121                                                     </td>
122                                                 [% END %]
123                                             </tr>
124                                         </tbody>
125                                     </table>
126                                 </div>
127                             [% ELSE %]
128                                 <span>No recalls have been made.</span>
129                             [% END # / # RECALLS.count %]
130                         [% ELSE %]
131                             <span>Recalls have not been enabled. Please contact your library.</span>
132                         [% END %]
133                         </div> <!-- /#recalls -->
134                     </div> <!-- /.col-md-12 -->
135             </div> <!-- /.row -->
136         </div> <!-- /.container-fluid -->
137 </div> <!-- /#main -->
138
139 [% INCLUDE 'opac-bottom.inc' %]
140 [% BLOCK jsinclude %]
141     [% INCLUDE 'datatables.inc' %]
142     <script type="text/JavaScript">
143         //<![CDATA[
144             $(document).ready(function(){
145                 $(".cancel_recall").click(function(){
146                     return confirmDelete(_("Are you sure you want to remove this recall?"));
147                 });
148                 $("#recalls-table").dataTable($.extend(true, {}, dataTablesDefaults, {
149                     "aoColumnDefs": [
150                         { "aTargets": [ "nosort" ],"bSortable": false,"bSearchable": false },
151                         { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
152                         { "sType": "title-string", "aTargets" : [ "title-string" ] }
153                     ]
154                 }));
155             });
156     </script>
157 [% END %]