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