Bug 27610: Changed pages of OPAC to have a <h1>
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-holdshistory.tt
1 [% USE raw %]
2 [% USE Koha %]
3 [% USE Branches %]
4 [% USE KohaDates %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Your holds history &rsaquo; [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 [% BLOCK cssinclude %]
9     <style>
10
11         .controls .paginate_button {
12             font-family: 'FontAwesome';
13             text-decoration: none;
14         }
15
16         .controls .paginate_button:not(.disabled) {
17             cursor: pointer;
18         }
19
20         .controls .paginate_button.disabled {
21             color: grey;
22         }
23
24         .controls .previous:before {
25             content: "\f104";
26             padding-right: .5em;
27         }
28
29         .controls .next:after {
30             content: "\f105";
31             padding-left: .5em;
32         }
33     </style>
34 [% END %]
35 </head>
36 [% INCLUDE 'bodytag.inc' bodyid='opac-holdshistory' %]
37 [% INCLUDE 'masthead.inc' %]
38
39 <div class="main">
40     <ul class="breadcrumb">
41         <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
42         <li><a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a> <span class="divider">&rsaquo;</span></li>
43         <li><a href="#">Your holds history</a></li>
44     </ul>
45
46     <div class="container-fluid">
47         <div class="row">
48             <div class="col col-lg-2 order-2 order-lg-1">
49                 <div id="navigation">
50                     [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
51                 </div>
52             </div>
53             <div class="col-md-12 col-lg-10 order-1">
54                 <div id="userholdshistory">
55                     <h1>Holds history</h1>
56
57                     [% IF !holds %]
58                         You have never placed a hold from this library.
59                     [% ELSE %]
60                         <div id="opac-user-holdsrec">
61                             <div id="tabs-container" style="overflow:auto">
62                                 <div class="controls">
63                                     <div class="resultscontrol resort">
64                                         <form id="sortform" action="/cgi-bin/koha/opac-holdshistory.pl" method="get">
65                                             [% IF ( unlimit ) %]<input type="hidden" name="unlimit" value="1" />[% END %]
66                                             <select name="sort" id="sort">
67                                                 [% IF ( sort == 'reservedate' ) %]<option value="reservedate" selected="selected">Order by date</option>[% ELSE %]<option value="reservedate">Order by date</option>[% END %]
68                                                 [% IF ( sort == 'biblio.title' ) %]<option value="biblio.title" selected="selected">Order by title</option>[% ELSE %]<option value="biblio.title">Order by title</option>[% END %]
69                                                 [% IF ( sort == 'biblio.author' ) %]<option value="biblio.author" selected="selected">Order by author</option>[% ELSE %]<option value="biblio.author">Order by author</option>[% END %]
70                                             </select>
71                                             <input type="submit" value="Go" id="sortsubmit" class="submit clearfix" />
72                                         </form>
73                                     </div>
74
75                                     [% UNLESS unlimit %]
76                                         <p>
77                                             Showing 50 items. <a href="/cgi-bin/koha/opac-holdshistory.pl?unlimit=1[% IF ( sort ) %]&amp;sort=[% sort | url %][% END %]">Show all items</a>
78                                         </p>
79                                     [% ELSE %]
80                                         <p>
81                                             Showing all items. <a href="/cgi-bin/koha/opac-holdshistory.pl[% IF ( sort ) %]?sort=[% sort | url %][% END %]">Show 50 items</a>
82                                         </p>
83                                     [% END %]
84                                 </div>
85                                 <table id="table_holdshistory" class="table table-bordered table-striped">
86                                     <thead>
87                                         <tr>
88                                         <th class="anti-the">Title</th>
89                                         <th>Author</th>
90                                         <th>Barcode</th>
91                                         <th>Library</th>
92                                         <th class="title-string">Hold date</th>
93                                         <th class="title-string">Expiration date</th>
94                                         <th class="title-string">Waiting date</th>
95                                         <th class="title-string">Cancellation date</th>
96                                         [% IF show_itemtype_column %]
97                                         <th>Requested item type</th>
98                                         [% END %]
99                                         <th>Status</th>
100                                         </tr>
101                                     </thead>
102                                     <tbody>
103                                     [% FOREACH hold IN holds %]
104                                         <tr>
105                                         <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% hold.biblio.biblionumber | uri %]">[% INCLUDE 'biblio-title.inc' biblio=hold.biblio %]</a></td>
106                                         <td>[% hold.biblio.author | html %]</td>
107                                         <td>[% hold.item.barcode | html %]</td>
108                                         <td>[% Branches.GetName( hold.branchcode ) | html %]</td>
109                                         <td><span title="[% hold.reservedate | html %]">[% hold.reservedate | $KohaDates %]</span></td>
110                                         <td>
111                                             [% IF hold.expirationdate %]
112                                                 <span title="[% hold.expirationdate | html %]">[% hold.expirationdate | $KohaDates %]</span>
113                                             [% ELSE %]
114                                                 <span title="0000-00-00"></span>
115                                             [% END %]
116                                         </td>
117                                         <td>
118                                             [% IF hold.waitingdate %]
119                                                 <span title="[% hold.waitingdate | html %]">[% hold.waitingdate | $KohaDates %]</span>
120                                             [% ELSE %]
121                                                 <span title="0000-00-00"></span>
122                                             [% END %]
123                                         </td>
124                                         <td>
125                                             [% IF hold.cancellationdate %]
126                                                 <span title="[% hold.cancellationdate | html %]">[% hold.cancellationdate | $KohaDates %]</span>
127                                             [% ELSE %]
128                                                 <span title="0000-00-00"></span>
129                                             [% END %]
130                                         </td>
131                                         [% IF show_itemtype_column %]
132                                             <td>
133                                             [% IF hold.itemtype %]
134                                                 [% ItemTypes.GetDescription( hold.itemtype ) | html %]
135                                             [% ELSE %]
136                                                 <span>Any item type</span>
137                                             [% END %]
138                                             </td>
139                                         [% END %]
140                                         <td>
141                                         [% IF hold.found == 'F' %]
142                                             Fulfilled
143                                         [% ELSIF hold.cancellationdate %]
144                                             Cancelled
145                                         [% ELSIF hold.found == 'W' %]
146                                             Waiting
147                                         [% ELSIF hold.found == 'T' %]
148                                             In transit
149                                         [% ELSE %]
150                                             Pending
151                                         [% END %]
152                                         </td>
153                                         </tr>
154                                     [% END %]
155                                     </tbody>
156                                 </table>
157                             </div> <!-- / .tabs-container -->
158                         </div> <!-- / .opac-user-holdsrec -->
159                     [% END # / IF old_holds_count %]
160                 </div> <!-- / .userholdshistory -->
161             </div> <!-- / .span10 -->
162         </div> <!-- / .row-fluid -->
163     </div> <!-- / .container-fluid -->
164 </div> <!-- / .main -->
165
166 [% INCLUDE 'opac-bottom.inc' %]
167 [% BLOCK jsinclude %]
168 [% INCLUDE 'datatables.inc' %]
169 <script>
170     $(document).ready(function() {
171         $('#sort').change(function() {
172             $('#sortform').submit();
173         });
174         var table = $("table_holdshistory").dataTable($.extend(true, {}, dataTablesDefaults, {
175             "sPaginationType": "four_button",
176             "aaSorting": [[4, 'desc']],
177             "sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
178             "aoColumnDefs": [
179                 { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
180                 { "sType": "title-string", "aTargets" : [ "title-string" ] }
181             ]
182         }));
183     });
184 </script>
185 [% END %]