View | Details | Raw Unified | Return to bug 19708
Collapse All | Expand All

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt (-33 / +4 lines)
Lines 5-11 Link Here
5
[% INCLUDE 'doc-head-open.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
6
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Your cart</title>
6
<title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Your cart</title>
7
[% INCLUDE 'doc-head-close.inc' %]
7
[% INCLUDE 'doc-head-close.inc' %]
8
[% BLOCK cssinclude %]<style type="text/css">.item-status { display: inline; }</style>[% END %]
8
[% BLOCK cssinclude %]<style type="text/css">.item-status { display: inline; } @media print { body { height: 99%; } }</style>[% END %]
9
</head>
9
</head>
10
[% INCLUDE 'bodytag.inc' bodyid='basket' %]
10
[% INCLUDE 'bodytag.inc' bodyid='basket' %]
11
    <div class="main">
11
    <div class="main">
Lines 14-21 Link Here
14
                <div class="span12">
14
                <div class="span12">
15
                    <div id="userbasket">
15
                    <div id="userbasket">
16
                        <h2>Your cart</h2>
16
                        <h2>Your cart</h2>
17
18
                        [% UNLESS ( print_basket ) %]
19
                            <div id="toolbar" class="toolbar">
17
                            <div id="toolbar" class="toolbar">
20
                                [% IF ( verbose ) %]
18
                                [% IF ( verbose ) %]
21
                                    <a href="opac-basket.pl" class="brief">Brief display</a>
19
                                    <a href="opac-basket.pl" class="brief">Brief display</a>
Lines 26-32 Link Here
26
                                    <a class="send" href="opac-basket.pl">Send</a>
24
                                    <a class="send" href="opac-basket.pl">Send</a>
27
                                [% END %]
25
                                [% END %]
28
                                <a class="download" href="opac-basket.pl">Download</a>
26
                                <a class="download" href="opac-basket.pl">Download</a>
29
                                <a class="print-large" href="opac-basket.pl">Print</a>
27
                                <a class="print-large" href="#">Print</a>
30
                                <a class="empty" href="opac-basket.pl">Empty and close</a>
28
                                <a class="empty" href="opac-basket.pl">Empty and close</a>
31
                                <a class="hide close" href="opac-basket.pl">Hide window</a>
29
                                <a class="hide close" href="opac-basket.pl">Hide window</a>
32
                            </div>
30
                            </div>
Lines 59-80 Link Here
59
                                </span>
57
                                </span>
60
                                [% END %]
58
                                [% END %]
61
                            </div>
59
                            </div>
62
                        [% END # / UNLESS print_basket %]
63
60
64
                        [% IF ( verbose ) %]
61
                        [% IF ( verbose ) %]
65
                            <form action="opac-basket.pl" method="get" name="bookbag_form" id="bookbag_form" class="checkboxed">
62
                            <form action="opac-basket.pl" method="get" name="bookbag_form" id="bookbag_form" class="checkboxed">
66
                                [% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %]
63
                                [% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %]
67
                                    <h3>
64
                                    <h3>
68
                                        [% IF ( print_basket ) %]
69
                                            [% BIBLIO_RESULT.title |html %]
70
                                                [% IF ( BIBLIO_RESULT.subtitle ) %] [% FOREACH subtitl IN BIBLIO_RESULT.subtitle %] [% subtitl.subfield |html %] [% END %][% END %]
71
                                                [% IF ( BIBLIO_RESULT.author ) %] [% BIBLIO_RESULT.author |html %][% END %]
72
                                        [% ELSE %]
73
                                                <input type="checkbox" class="cb" value="[% BIBLIO_RESULT.biblionumber %]" name="bib[% BIBLIO_RESULT.biblionumber %]" id="bib[% BIBLIO_RESULT.biblionumber %]">
65
                                                <input type="checkbox" class="cb" value="[% BIBLIO_RESULT.biblionumber %]" name="bib[% BIBLIO_RESULT.biblionumber %]" id="bib[% BIBLIO_RESULT.biblionumber %]">
74
                                                [% BIBLIO_RESULT.title |html %]
66
                                                [% BIBLIO_RESULT.title |html %]
75
                                                [% IF ( BIBLIO_RESULT.subtitle ) %] [% FOREACH subtitl IN BIBLIO_RESULT.subtitle %] [% subtitl.subfield |html %] [% END %][% END %]
67
                                                [% IF ( BIBLIO_RESULT.subtitle ) %] [% FOREACH subtitl IN BIBLIO_RESULT.subtitle %] [% subtitl.subfield |html %] [% END %][% END %]
76
                                                [% IF ( BIBLIO_RESULT.author ) %] [% BIBLIO_RESULT.author |html %][% END %]
68
                                                [% IF ( BIBLIO_RESULT.author ) %] [% BIBLIO_RESULT.author |html %][% END %]
77
                                        [% END # / IF print_basket %]
78
                                    </h3>
69
                                    </h3>
79
                                    <!-- COinS / Openurl -->
70
                                    <!-- COinS / Openurl -->
80
                                    <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>
71
                                    <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>
Lines 247-253 Link Here
247
                                <table id="itemst" class="table table-bordered table-striped">
238
                                <table id="itemst" class="table table-bordered table-striped">
248
                                    <thead>
239
                                    <thead>
249
                                        <tr>
240
                                        <tr>
250
                                            [% UNLESS ( print_basket ) %]<th>&nbsp;</th>[% END %]
241
                                            <th class="noprint">&nbsp;</th>
251
                                            <th>Title</th>
242
                                            <th>Title</th>
252
                                            <th>Author</th>
243
                                            <th>Author</th>
253
                                            <th>Year</th>
244
                                            <th>Year</th>
Lines 257-267 Link Here
257
                                    <tbody>
248
                                    <tbody>
258
                                    [% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %]
249
                                    [% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %]
259
                                        <tr>
250
                                        <tr>
260
                                            [% UNLESS ( print_basket ) %]
251
                                                <td class="noprint">
261
                                                <td>
262
                                                <input type="checkbox" class="cb" value="[% BIBLIO_RESULT.biblionumber %]" name="bib[% BIBLIO_RESULT.biblionumber %]" id="bib[% BIBLIO_RESULT.biblionumber %]">
252
                                                <input type="checkbox" class="cb" value="[% BIBLIO_RESULT.biblionumber %]" name="bib[% BIBLIO_RESULT.biblionumber %]" id="bib[% BIBLIO_RESULT.biblionumber %]">
263
                                                </td>
253
                                                </td>
264
                                            [% END %]
265
                                            <td>
254
                                            <td>
266
                                                <a href="#" onclick="openBiblio('[% BIBLIO_RESULT.dest %]',[% BIBLIO_RESULT.biblionumber %])">[% BIBLIO_RESULT.title |html %][% IF ( BIBLIO_RESULT.subtitle ) %] [% FOREACH subtitl IN BIBLIO_RESULT.subtitle %][% subtitl.subfield |html %][% END %][% END %]</a>
255
                                                <a href="#" onclick="openBiblio('[% BIBLIO_RESULT.dest %]',[% BIBLIO_RESULT.biblionumber %])">[% BIBLIO_RESULT.title |html %][% IF ( BIBLIO_RESULT.subtitle ) %] [% FOREACH subtitl IN BIBLIO_RESULT.subtitle %][% subtitl.subfield |html %][% END %][% END %]</a>
267
                                                <!-- COinS / Openurl -->
256
                                                <!-- COinS / Openurl -->
Lines 295-305 Link Here
295
                            </form>
284
                            </form>
296
                        [% END # / verbose %]
285
                        [% END # / verbose %]
297
286
298
                        [% UNLESS ( print_basket ) %]
299
                            <form name="myform" action="opac-basket.pl" method="get">
287
                            <form name="myform" action="opac-basket.pl" method="get">
300
                                <input type="hidden" name="records" id="records" />
288
                                <input type="hidden" name="records" id="records" />
301
                            </form>
289
                            </form>
302
                        [% END %]
303
290
304
                </div> <!-- / #userbasket -->
291
                </div> <!-- / #userbasket -->
305
            </div> <!-- / .span10 -->
292
            </div> <!-- / .span10 -->
Lines 310-325 Link Here
310
[% INCLUDE 'opac-bottom.inc' %]
297
[% INCLUDE 'opac-bottom.inc' %]
311
298
312
[% BLOCK jsinclude %]
299
[% BLOCK jsinclude %]
313
    [% IF ( print_basket ) %]
314
        <script type="text/javascript">
315
            //<![CDATA[
316
                $(document).ready(function(){
317
                    print();
318
                    location.href="/cgi-bin/koha/opac-basket.pl?bib_list=[% bib_list %][% IF ( verbose ) %]&verbose=1[% END %]";
319
                });
320
            //]]>
321
        </script>
322
    [% ELSE %]
323
        <script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
300
        <script type="text/javascript" src="[% interface %]/[% theme %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
324
        [% INCLUDE 'datatables.inc' %]
301
        [% INCLUDE 'datatables.inc' %]
325
        <script type="text/javascript">
302
        <script type="text/javascript">
Lines 390-400 Link Here
390
                    downloadBasket();
367
                    downloadBasket();
391
                });
368
                });
392
369
393
                $(".print-large").click(function(e){
394
                    e.preventDefault();
395
                    printBasket();
396
                });
397
398
                $(".empty").click(function(e){
370
                $(".empty").click(function(e){
399
                    e.preventDefault();
371
                    e.preventDefault();
400
                    delBasket();
372
                    delBasket();
Lines 487-491 Link Here
487
            }
459
            }
488
            //]]>
460
            //]]>
489
        </script>
461
        </script>
490
    [% END # / IF print_basket %]
491
[% END # / BLOCK jsinclude %]
462
[% END # / BLOCK jsinclude %]
(-)a/koha-tmpl/opac-tmpl/bootstrap/js/basket.js (-5 lines)
Lines 366-376 function downloadBasket() { Link Here
366
    open(loc,"win_form",'scrollbars=no,resizable=no,height=300,width=450,top=50,left=100');
366
    open(loc,"win_form",'scrollbars=no,resizable=no,height=300,width=450,top=50,left=100');
367
}
367
}
368
368
369
function printBasket() {
370
    var loc = document.location + "&print=1";
371
    document.location = loc;
372
}
373
374
function showMore() {
369
function showMore() {
375
    var strCookie = "";
370
    var strCookie = "";
376
371
(-)a/opac/opac-basket.pl (-3 lines)
Lines 40-50 my ( $template, $borrowernumber, $cookie ) = get_template_and_user ( Link Here
40
);
40
);
41
41
42
my $bib_list     = $query->param('bib_list');
42
my $bib_list     = $query->param('bib_list');
43
my $print_basket = $query->param('print');
44
my $verbose      = $query->param('verbose');
43
my $verbose      = $query->param('verbose');
45
44
46
if ($verbose)      { $template->param( verbose      => 1 ); }
45
if ($verbose)      { $template->param( verbose      => 1 ); }
47
if ($print_basket) { $template->param( print_basket => 1 ); }
48
46
49
my @bibs = split( /\//, $bib_list );
47
my @bibs = split( /\//, $bib_list );
50
my @results;
48
my @results;
51
- 

Return to bug 19708