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