Bug 19356: Move staff client cart JavaScript to the footer
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / basket / basket.tt
1 [% SET footerjs = 1 %]
2 [% BLOCK controls %]
3     <p style="padding: 7px 0; border-top : 1px solid #E8E8E8;">
4         <a id="CheckAll" href="#"><i class="fa fa-check"></i> Select all</a> <a id="CheckNone" href="#"><i class="fa fa-remove"></i> Clear all</a>
5         | <b>Selected items :</b>
6         <a href="#" id="remove_from_cart">Remove</a>
7
8         [% IF ( loggedinusername ) %]
9              | <a href="#" id="add_to_list">Add to a list</a>
10         [% END %]
11
12         [% IF ( CAN_user_reserveforothers ) %]
13              | <a href="#" id="place_hold">Place hold</a>
14         [% END %]
15
16         [% IF CAN_user_tools_records_batchmod %]
17             | <a href="#" id="batch_modify">Batch modify</a>
18         [% END %]
19
20         [% IF CAN_user_tools_records_batchdel %]
21             | <a href="#" id="batch_delete">Batch delete</a>
22         [% END %]
23     </p>
24 [% END %]
25 [% INCLUDE 'doc-head-open.inc' %]
26 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] Catalog &rsaquo; Your cart</title>
27     [% IF ( print_basket ) %]
28
29 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
30 <link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon %][% ELSE %][% interface %]/[% theme %]/img/favicon.ico[% END %]" type="image/x-icon" />
31 <style type="text/css">
32     @import url([% interface %]/[% theme %]/css/print.css);
33 </style>
34     [% ELSE %][% INCLUDE 'doc-head-close.inc' %]
35 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
36         [% END %]
37 </head>
38 [% IF ( print_basket ) %]<body id="cart_basket" class="cart" onload="print();history.back();">[% ELSE %]<body id="cart_basket" class="cart">[% END %]
39
40 <div id="doc" class="yui-t7">
41 <div class="container">
42 [% UNLESS ( print_basket ) %]
43 <h1>Your cart</h1>
44
45 <div id="toolbar" class="btn-toolbar">
46     [% IF ( verbose ) %]
47         <a href="basket.pl" class="btn btn-default btn-sm showdetails showless"><i class="fa fa-folder"></i> Brief display</a>
48     [% ELSE %]
49         <a href="basket.pl" class="btn btn-default btn-sm showdetails showmore"><i class="fa fa-folder-open"></i> More details</a>
50     [% END %]
51
52     <a class="btn btn-default btn-sm" href="basket.pl" id="send_cart"><i class="fa fa-envelope"></i> Send</a>
53     <div class="btn-group">
54         <a class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" href="#" id="downloadcart"><i class="fa fa-download"></i> Download <span class="caret"></span> </a>
55         <ul class="dropdown-menu">
56             <li><a href="/cgi-bin/koha/basket/downloadcart.pl?format=iso2709&amp;bib_list=[% bib_list %]">iso2709</a></li>
57             <li><a href="/cgi-bin/koha/basket/downloadcart.pl?format=ris&amp;bib_list=[% bib_list %]">RIS</a></li>
58             <li><a href="/cgi-bin/koha/basket/downloadcart.pl?format=bibtex&amp;bib_list=[% bib_list %]">BibTex</a></li>
59         [% FOREACH csv_profile IN csv_profiles %]
60             <li><a href="/cgi-bin/koha/basket/downloadcart.pl?format=[% csv_profile.export_format_id %]&amp;bib_list=[% bib_list %]">CSV - [% csv_profile.profile %]</a></li>
61         [% END %]
62         </ul>
63     </div>
64     <a class="btn btn-default btn-sm" href="basket.pl" id="print_cart"><i class="fa fa-print"></i> Print</a>
65     <a class="btn btn-default btn-sm" href="basket.pl" id="empty_cart"><i class="fa fa-trash"></i> Empty and close</a>
66     <a class="btn btn-default btn-sm close" href="basket.pl"><i class="fa fa-times-circle"></i> Hide window</a>
67 </div>
68         [% END %]
69
70 [% IF ( verbose ) %]
71     [% UNLESS ( print_basket ) %]
72         [% PROCESS controls %]
73     [% END %]
74             <form action="basket.pl" method="get" name="bookbag_form" id="bookbag_form">
75     [% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %]
76     <h3>
77         [% IF ( print_basket ) %]
78             [% BIBLIO_RESULT.title |html %]
79                 [% FOREACH subtitl IN BIBLIO_RESULT.subtitle %] [% subtitl.subfield | html %][% END %]
80                 [% IF ( BIBLIO_RESULT.author ) %] [% BIBLIO_RESULT.author %][% END %]
81         [% ELSE %]
82                 <input type="checkbox" class="select_record" value="[% BIBLIO_RESULT.biblionumber %]" name="bib[% BIBLIO_RESULT.biblionumber %]" id="bib[% BIBLIO_RESULT.biblionumber %]" />
83                 [% BIBLIO_RESULT.title |html %]
84                 [% FOREACH subtitl IN BIBLIO_RESULT.subtitle %] [% subtitl.subfield | html %][% END %]
85                 [% IF ( BIBLIO_RESULT.author ) %] [% BIBLIO_RESULT.author %][% END %]
86         [% END %]
87     </h3>
88             <!-- COinS / Openurl -->
89     <span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.au=[% BIBLIO_RESULT.author %]&amp;rft.btitle=[% BIBLIO_RESULT.title |url %]&amp;rft.date=[% BIBLIO_RESULT.publicationyear %]&amp;rft.tpages=[% BIBLIO_RESULT.item('size') %]&amp;rft.isbn=[% BIBLIO_RESULT.isbn |url %]&amp;rft.aucorp=&amp;rft.place=[% BIBLIO_RESULT.place %]&amp;rft.pub=[% BIBLIO_RESULT.publisher |url %]&amp;rft.edition=[% BIBLIO_RESULT.edition %]&amp;rft.series=[% BIBLIO_RESULT.series %]&amp;rft.genre="></span>
90     <table>
91         [% IF ( BIBLIO_RESULT.isbn ) %]
92         <tr>
93             <th scope="row">ISBN</th>
94             <td>[% BIBLIO_RESULT.isbn %]</td>
95         </tr>
96         [% END %]
97
98         [% IF ( BIBLIO_RESULT.HASAUTHORS ) %]
99         <tr>
100             <th scope="row">Author(s)</th>
101             <td>
102                    [% IF ( BIBLIO_RESULT.author ) %]
103                        <p>[% BIBLIO_RESULT.author %]</p>
104                    [% END %]
105                    [% IF ( BIBLIO_RESULT.MARCAUTHORS ) %]
106                        [% FOREACH MARCAUTHOR IN BIBLIO_RESULT.MARCAUTHORS %]
107                        <p> [% FOREACH MARCAUTHOR_SUBFIELDS_LOO IN MARCAUTHOR.MARCAUTHOR_SUBFIELDS_LOOP %]
108                               [% MARCAUTHOR_SUBFIELDS_LOO.separator %]
109                                   [% MARCAUTHOR_SUBFIELDS_LOO.value %]
110                            [% END %]
111                        </p>
112                        [% END %]
113                    [% END %]
114             </td>
115         </tr>
116         [% END %]
117
118         [% IF ( BIBLIO_RESULT.publishercode ) %]
119             <tr>
120                 <th scope="row">Publisher</th>
121                 <td>[% BIBLIO_RESULT.place %] [% BIBLIO_RESULT.publishercode %] [% BIBLIO_RESULT.publicationyear %]
122                 </td>
123             </tr>
124         [% END %]
125         [% IF ( BIBLIO_RESULT.pages ) %]
126             <tr>
127                 <th scope="row">Details</th>
128                 <td>[% BIBLIO_RESULT.pages %] [% BIBLIO_RESULT.illus %] [% BIBLIO_RESULT.item('size') %]</td>
129             </tr>
130         [% END %]
131         [% IF ( BIBLIO_RESULT.seriestitle ) %]
132         <tr>
133             <th scope="row">Collection</th>
134             <td> [% BIBLIO_RESULT.seriestitle %]</td>
135         </tr>
136         [% END %]
137
138         [% IF ( BIBLIO_RESULT.MARCSUBJCTS ) %]
139         <tr>
140             <th scope="row">Subject(s)</th>
141             <td>[% FOREACH MARCSUBJCT IN BIBLIO_RESULT.MARCSUBJCTS %]
142                    <p> [% FOREACH MARCSUBJECT_SUBFIELDS_LOO IN MARCSUBJCT.MARCSUBJECT_SUBFIELDS_LOOP %]
143                         [% MARCSUBJECT_SUBFIELDS_LOO.separator %][% MARCSUBJECT_SUBFIELDS_LOO.value %][% END %]
144                    </p>
145                 [% END %]</td>
146         </tr>
147         [% END %]
148
149         [% IF ( BIBLIO_RESULT.copyrightdate ) %]
150             <tr><th scope="row">Copyright</th>
151                 <td> [% BIBLIO_RESULT.copyrightdate %]</td>
152             </tr>
153         [% END %]
154
155         [% IF ( BIBLIO_RESULT.MARCNOTES ) %]
156         <tr>
157             <th scope="row">Notes</th>
158             <td>
159             [% FOREACH MARCNOTE IN BIBLIO_RESULT.MARCNOTES %]
160                 <p>
161                 [% IF MARCNOTE.marcnote.match('^https?://\S+$') %]
162                     - <a href="[% MARCNOTE.marcnote %]">[% MARCNOTE.marcnote %]</a>
163                 [% ELSE %]
164                     - [% MARCNOTE.marcnote %]
165                 [% END %]
166             [% END %]
167             </td>
168         </tr>
169         [% END %]
170
171         [% IF ( BIBLIO_RESULT.unititle ) %]
172         <tr>
173             <th scope="row">Unified title</th>
174             <td> [% BIBLIO_RESULT.unititle %]</td>
175         </tr>
176         [% END %]
177         [% IF ( BIBLIO_RESULT.serial ) %]
178         <tr>
179             <th scope="row">Serial</th>
180             <td>[% BIBLIO_RESULT.serial %]</td>
181         </tr>
182         [% END %]
183         [% IF ( BIBLIO_RESULT.dewey ) %]
184         <tr>
185             <th scope="row">Dewey</th>
186             <td>[% BIBLIO_RESULT.dewey %]</td>
187         </tr>
188         [% END %]
189         [% IF ( BIBLIO_RESULT.classification ) %]
190         <tr>
191             <th scope="row">Classification</th>
192             <td> [% BIBLIO_RESULT.classification %]</td>
193         </tr>
194         [% END %]
195         [% IF ( BIBLIO_RESULT.lccn ) %]
196         <tr>
197             <th scope="row">LCCN</th>
198             <td> [% BIBLIO_RESULT.lccn %]</td>
199         </tr>
200         [% END %]
201
202
203         [% IF BIBLIO_RESULT.MARCURLS.size %]
204             <tr>
205                 <th scope="row">URL(s)</th>
206                 <td>
207                    [% FOREACH MARCurl IN BIBLIO_RESULT.MARCURLS %]
208                         [% IF MARCurl.part %]<p>[% MARCurl.part %]</p>[% END %]
209
210                         <a href="[% MARCurl.MARCURL %]" title="[% MARCurl.MARCURL %]">[% MARCurl.linktext %]</a>
211
212                         [% IF MARCurl.notes %][% FOREACH note IN MARCurl.notes %]<p>[% note.note %]</p>[% END %][% END %]
213                     [% END %]
214                 </td>
215             </tr>
216         [% END %]
217
218         <tr>
219             <th scope="row">Location(s)</th>
220             <td>[% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %][% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
221                 <p>
222                     [% ITEM_RESULT.branchname %] [% ITEM_RESULT.location_description %]
223                     [% IF ( ITEM_RESULT.itemcallnumber ) %]
224                         ([% ITEM_RESULT.itemcallnumber %])
225                     [% END %]
226                 </p>
227                 [% END %][% ELSE %]This record has no items.[% END %]</td>
228         </tr>
229     </table>
230     [% END %]
231             </form>
232
233 [% ELSE %]
234 [% UNLESS ( print_basket ) %]
235     <form action="/cgi-bin/koha/basket/basket.pl" method="get" name="bookbag_form" id="bookbag_form">
236     [% PROCESS controls %]
237 [% END %]
238
239     <table id="itemst">
240         <thead><tr>
241         [% UNLESS ( print_basket ) %]<th class="NoSort">&nbsp;</th>[% END %]
242         <th class="anti-the">Title</th>
243         <th>Item type</th>
244         <th><a id="items-popover" href="#" data-trigger="hover" data-toggle="popover" data-placement="top" title="Item sorting" data-content="Items are sorted by the highest or lowest callnumber in a group of items respectively.">Items</a></th>
245         </tr></thead>
246
247         [% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %]
248                 <tr>
249             [% UNLESS ( print_basket ) %]<td>
250                         <input type="checkbox" class="select_record" value="[% BIBLIO_RESULT.biblionumber %]" name="bib[% BIBLIO_RESULT.biblionumber %]" id="bib[% BIBLIO_RESULT.biblionumber %]" />
251
252                 </td> [% END %]
253             <td><a href="[% BIBLIO_RESULT.dest %]?biblionumber=[% BIBLIO_RESULT.biblionumber %]" class="open_title">
254                         [% BIBLIO_RESULT.title |html %] [% FOREACH subtitl IN BIBLIO_RESULT.subtitle %] [% subtitl.subfield | html %][% END %]
255                     </a>
256                         [% BIBLIO_RESULT.author %]
257                         <p>[% IF ( BIBLIO_RESULT.publishercode ) %]- [% BIBLIO_RESULT.publishercode %]
258                         [% IF ( BIBLIO_RESULT.place ) %] [% BIBLIO_RESULT.place %][% END %][% END %]
259                         [% IF ( BIBLIO_RESULT.pages ) %] - [% BIBLIO_RESULT.pages %][% IF ( BIBLIO_RESULT.item('size') ) %] [% BIBLIO_RESULT.item('size') %]
260                         [% END %]
261                         [% END %]</p>
262                         [% IF ( BIBLIO_RESULT.notes ) %]
263                         <p>[% BIBLIO_RESULT.notes %]</p>
264                         [% END %]
265                                                     <!-- COinS / Openurl -->
266     <span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&amp;rft.au=[% BIBLIO_RESULT.author %]&amp;rft.btitle=[% BIBLIO_RESULT.title |url %]&amp;rft.date=[% BIBLIO_RESULT.publicationyear %]&amp;rft.tpages=[% BIBLIO_RESULT.item('size') %]&amp;rft.isbn=[% BIBLIO_RESULT.isbn |url %]&amp;rft.aucorp=&amp;rft.place=[% BIBLIO_RESULT.place %]&amp;rft.pub=[% BIBLIO_RESULT.publisher |url %]&amp;rft.edition=[% BIBLIO_RESULT.edition %]&amp;rft.series=[% BIBLIO_RESULT.series %]&amp;rft.genre="></span>
267
268                                                 </td>
269             <td>[% BIBLIO_RESULT.description %]</td>
270             <td class="callnumbers">
271                 [% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %]
272                     [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
273                         <div><span class="nowrap"><strong><span class="callnumber">[% ITEM_RESULT.itemcallnumber %]</span></strong> [% ITEM_RESULT.branchname %] <span class="shelvingloc inline">[% ITEM_RESULT.location_description %]</span></span></div>
274                     [% END %]
275                 [% ELSE %]
276                     This record has no items.
277                 [% END %]
278             </td>
279             </tr>
280         [% END %]
281     </table></form>
282 [% END %]
283
284 <form name="myform" action="basket/basket.pl" method="get">
285     <input type="hidden" name="records" id="records" />
286 </form>
287
288 </div>
289 </div>
290             [% INCLUDE js_includes.inc %]
291             [% UNLESS ( print_basket ) %]
292                 [% INCLUDE 'datatables.inc' %]
293                 <script type="text/javascript" src="[% interface %]/[% theme %]/js/cart.js"></script>
294                 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
295             [% END %]
296     </body>
297 </html>