Bug 28242: added captions to tables and legends to forms
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-readingrecord.tt
1 [% USE raw %]
2 [% USE Koha %]
3 [% USE KohaDates %]
4 [% USE TablesSettings %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Your checkout history &rsaquo; [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 [% BLOCK cssinclude %]
9     <style>ul.ui-tabs-nav li a, ul.ui-tabs-nav li span.a  { padding:0.6em 1em; }</style>
10 [% END %]
11 </head>
12 [% INCLUDE 'bodytag.inc' bodyid='opac-readingrecord' %]
13 [% INCLUDE 'masthead.inc' %]
14 [% SET AdlibrisEnabled = Koha.Preference('AdlibrisCoversEnabled') %]
15 [% SET AdlibrisURL = Koha.Preference('AdlibrisCoversURL') %]
16
17 [% IF Koha.Preference('AmazonAssocTag') %]
18     [% AmazonAssocTag = '?tag=' _ Koha.Preference('AmazonAssocTag') %]
19 [% ELSE %]
20     [% AmazonAssocTag = '' %]
21 [% END %]
22
23 <div class="main">
24     <nav aria-label="breadcrumb">
25         <ul class="breadcrumb">
26             <li class="breadcrumb-item">
27                 <a href="/cgi-bin/koha/opac-main.pl">Home</a>
28             </li>
29             <li class="breadcrumb-item">
30                 <a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' patron = logged_in_user %]</a>
31             </li>
32             <li class="breadcrumb-item" aria-current="page">
33                 <a href="#">Your checkout history</a>
34             </li>
35         </ul>
36     </nav>
37
38     <div class="container-fluid">
39         <div class="row">
40             <div class="col col-lg-2 order-2 order-lg-1">
41                 <div id="navigation">
42                     [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
43                 </div>
44             </div>
45             <div class="col-md-12 col-lg-10 order-1">
46
47                 <div id="userreadingrecord" class="maincontent">
48                     <h1>Checkout history</h1>
49
50                     [% IF READING_RECORD.size == 0 %]
51                         You have never borrowed anything from this library.
52                     [% ELSE %]
53                         <div id="opac-user-readingrec">
54
55                             <div class="resultscontrol resort js-hide">
56                                 <form id="sortform" action="/cgi-bin/koha/opac-readingrecord.pl" method="get">
57                                     [% UNLESS ( limit ) %]<input type="hidden" name="limit" value="full" />[% END %]
58                                     <select name="order" id="order">
59                                         [% IF ( orderbydate ) %]<option value="" selected="selected">Order by date</option>[% ELSE %]<option value="">Order by date</option>[% END %]
60                                         [% IF ( orderbytitle ) %]<option value="title" selected="selected">Order by title</option>[% ELSE %]<option value="title">Order by title</option>[% END %]
61                                         [% IF ( orderbyauthor ) %]<option value="author" selected="selected">Order by author</option>[% ELSE %]<option value="author">Order by author</option>[% END %]
62                                     </select>
63                                     <input type="submit" value="Go" id="sortsubmit" class="submit clearfix" />
64                                 </form>
65                             </div>
66
67                             [% IF limit %]
68                                 <p>
69                                     Showing last 50 items. <a href="/cgi-bin/koha/opac-readingrecord.pl?limit=full[% IF ( orderbytitle ) %]&amp;order=title[% END %]">Show all items</a>
70                                 </p>
71                             [% ELSE %]
72                                 <p>
73                                     Showing all items. <a href="/cgi-bin/koha/opac-readingrecord.pl?limit=50[% IF ( orderbytitle ) %]&amp;order=title[% END %]">Show last 50 items</a>
74                                 </p>
75                             [% END %]
76
77                             [% IF Koha.Preference( 'OnSiteCheckouts' ) == 1 %]
78                             <div id="tabs" class="toptabs">
79                                 <ul class="js-show">
80                                     <li id="tab_all"><a href="#tabs-container">All</a></li>
81                                     <li id="tab_checkout"><a href="#tabs-container">Checkouts</a></li>
82                                     <li id="tab_onsite_checkout"><a href="#tabs-container">On-site checkouts</a></li>
83                                 </ul>
84                             [% END %]
85                                 <div id="tabs-container" style="overflow:hidden">
86                                     <table id="readingrec" class="table table-bordered table-striped">
87                                         <caption class="sr-only">Checkout history</caption>
88                                         <thead>
89                                             <tr>
90                                                 <th style="display:none;" class="noExport">Type</th>
91                                                 <th class="NoSort noExport"></th>
92                                                 <th class="anti-the">Title</th>
93                                                 <th>Item type</th>
94                                                 <th>Call number</th>
95                                                 <th>Date</th>
96                                                 [% IF ( OPACMySummaryHTML ) %]
97                                                     <th class="NoSort noExport">Links</th>
98                                                 [% END %]
99                                             </tr>
100                                         </thead>
101                                         <tbody>
102                                             [% FOREACH issue IN READING_RECORD %]
103                                                 <tr>
104                                                     <td style="display:none;">
105                                                       [% IF issue.onsite_checkout %][% issuetype = 'onsite_checkout' %]
106                                                       [% ELSE %][% issuetype = 'standard_checkout' %]
107                                                       [% END %]
108                                                       [% issuetype | html %]
109                                                     </td>
110                                                 <td>
111                                                     [% IF ( AdlibrisEnabled && issue.normalized_isbn ) %]
112                                                         [% IF issue.BiblioDefaultViewmarc %]
113                                                             <a href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% issue.biblionumber |url %]">
114                                                         [% ELSIF issue.BiblioDefaultViewisbd %]
115                                                             <a href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% issue.biblionumber |url %]">
116                                                         [% ELSE %]
117                                                             <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% issue.biblionumber |url %]">
118                                                         [% END %]
119                                                         <img src="[% AdlibrisURL | html %]?isbn=[% issue.normalized_isbn | html %]" class="adlibris-cover" alt="Adlibris cover image" /></a>
120                                                     [% END %]
121                                                     [% IF  OPACAmazonCoverImages %]
122                                                         [% IF  issue.normalized_isbn %]
123                                                             <a href="http://www.amazon.com/gp/reader/[% issue.normalized_isbn | uri %][% AmazonAssocTag | uri %]#reader-link"><img src="https://images-na.ssl-images-amazon.com/images/P/[% issue.normalized_isbn | html %].01.THUMBZZZ.jpg" alt="" class="item-thumbnail" /></a>
124                                                         [% ELSE %]
125                                                              <span class="no-image">No cover image available</span>
126                                                         [% END %]
127                                                     [% END %]
128
129                                                 [% IF GoogleJackets %]
130                                                     [% IF  issue.normalized_isbn %]
131                                                         <div title="[% issue.biblionumber |url %]" class="[% issue.normalized_isbn | html %]" id="gbs-thumbnail[% loop.count | html %]"></div>
132                                                     [% ELSE %]
133                                                        <span class="no-image">No cover image available</span>
134                                                     [% END %]
135                                                 [% END %]
136
137                                                 [% IF BakerTaylorEnabled %]
138                                                     [% bt_id = ( issue.normalized_upc || issue.normalized_isbn ) %]
139                                                     [% IF ( bt_id ) %]
140                                                        <a href="https://[% BakerTaylorBookstoreURL | uri %][% bt_id | uri %]"><img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL | html %][% bt_id | html %]" /></a>
141                                                     [% ELSE %]
142                                                        <span class="no-image">No cover image available</span>
143                                                     [% END %]
144                                                 [% END %]
145
146                                                 [% IF SyndeticsEnabled && SyndeticsCoverImages %]
147                                                     <img src="https://secure.syndetics.com/index.aspx?isbn=[% issue.normalized_isbn | html %]/SC.GIF&amp;client=[% SyndeticsClientCode | html %]&amp;type=xw10&amp;upc=[% issue.normalized_upc | html %]&amp;oclc=[% issue.normalized_oclc | html %]" alt="" class="item-thumbnail" />
148                                                 [% END %]
149                                                 </td>
150                                                 <td>
151                                                 [% IF  issue.BiblioDefaultViewmarc %]
152                                                      <a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% issue.biblionumber |url %]">[% INCLUDE 'biblio-title.inc' biblio=issue %]</a>
153                                                 [% ELSIF issue.BiblioDefaultViewisbd %]
154                                                      <a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% issue.biblionumber |url %]">[% INCLUDE 'biblio-title.inc' biblio=issue %]</a>
155                                                 [% ELSE %]
156                                                      <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% issue.biblionumber |url %]">[% INCLUDE 'biblio-title.inc' biblio=issue %]</a>
157                                                 [% END %]
158                                                 <p class="results-summary item-details">[% issue.author | html %]</p>
159
160                                                     [% IF ( Koha.Preference( 'OpacStarRatings' ) == 'all' ) %]
161                                                         [% INCLUDE 'user-star-ratings.inc' item=issue %]
162                                                     [% END %]
163
164                                                 </td>
165                                                 <td>
166                                                 [% UNLESS ( Koha.Preference('OpacNoItemTypeImages') ) %]
167                                                     [% IF ( issue.imageurl ) %]
168                                                         <img src="[% issue.imageurl | html %]" alt="" />
169                                                     [% END %]
170                                                 [% END %]
171                                                 <span class="tdlabel">Item type:</span>
172                                                 [% issue.translated_description | html %]</td>
173                                                 <td>
174                                                 <span class="tdlabel">Call number:</span>
175                                                 [% issue.itemcallnumber | html %]
176                                                 </td>
177                                                 [% IF issue.returndate %]
178                                                     <td data-order="[% issue.returndate | html %]">
179                                                         <span class="tdlabel">Check-in date:</span>
180                                                         [% issue.returndate | $KohaDates %]
181                                                 [% ELSE %]
182                                                     <td data-order="Checked out">
183                                                         <em>(Checked out)</em>
184                                                 [% END %]
185                                                 </td>
186                                                 [% IF OPACMySummaryHTML %]
187                                                     <td>[% issue.MySummaryHTML | $raw %]</td>
188                                                 [% END %]
189                                                 </tr>
190                                             [% END # / FOREACH issue %]
191                                         </tbody>
192                                     </table>
193                                 </div> <!-- / .tabs-container -->
194                             [% IF ( Koha.Preference( 'OnSiteCheckouts' ) == 1 ) %]
195                                 </div> <!-- /#tabs -->
196                             [% END %]
197                         </div> <!-- / .opac-user-readingrec -->
198                     [% END # / IF READING_RECORD.size %]
199                 </div> <!-- / .userreadingrecord -->
200             </div> <!-- / .col-lg-10 -->
201         </div> <!-- / .row -->
202     </div> <!-- / .container-fluid -->
203 </div> <!-- / .main -->
204
205 [% INCLUDE 'opac-bottom.inc' %]
206 [% BLOCK jsinclude %]
207 [% INCLUDE 'datatables.inc' %]
208 [% INCLUDE 'columns_settings.inc' %]
209 <script>
210     $(document).ready(function(){
211         [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
212         $('#order').change(function() {
213             $('#sortform').submit();
214         });
215
216         var columns_settings = []; // Empty because there are no columns we want to be configurable
217         var table = KohaTable("#readingrec", {
218             "dom": '<"top"<"table_entries"i><"table_controls"fB>>t',
219             "autoWidth": false,
220             "language": {
221                 "search": "_INPUT_",
222                 "searchPlaceholder": _("Search")
223             }
224         }, columns_settings);
225
226         var tabs = $("#tabs").tabs({
227             activate: function(e, ui) {
228                 var id = $(ui.newTab).attr("id");
229                 if ( id == "tab_checkout" ) {
230                     table.fnFilter("standard_checkout", 0);
231                 } else if ( id == "tab_onsite_checkout" ) {
232                     table.fnFilter("onsite_checkout", 0);
233                 } else { // all
234                     table.fnFilter('', 0);
235                 }
236             }
237         });
238     });
239     var borrowernumber = "[% borrowernumber | html %]";
240     var MSG_YOUR_RATING = _("Your rating: %s, ");
241     var MSG_AVERAGE_RATING = _("Average rating: %s (%s votes)");
242 </script>
243     [% IF ( Koha.Preference('OpacStarRatings') == 'all' ) %]
244         [% Asset.js("lib/jquery/plugins/jquery.barrating.min.js") | $raw %]
245         [% Asset.js("js/ratings.js") | $raw %]
246     [% END %]
247 [% END %]