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

(-)a/C4/VirtualShelves/Page.pm (-6 / +10 lines)
Lines 83-94 sub shelfpage { Link Here
83
        @cart_list = split(/\//, $cart_list);
83
        @cart_list = split(/\//, $cart_list);
84
    }
84
    }
85
85
86
    $shelflimit = ( $type eq 'opac' ? C4::Context->preference('OPACnumSearchResults') : C4::Context->preference('numSearchResults') );
86
    # getting the Shelves list
87
    $shelflimit = $shelflimit || ShelvesMax('MGRPAGE');
87
    unless ( $query->param('print') ) {
88
    $shelfoffset   = ( $itemoff - 1 ) * $shelflimit;     # Sets the offset to begin retrieving items at
88
        $shelflimit = ( $type eq 'opac' ? C4::Context->preference('OPACnumSearchResults') : C4::Context->preference('numSearchResults') );
89
    $shelveslimit  = $shelflimit;                        # Limits number of shelves returned for a given query (row_count)
89
        $shelflimit = $shelflimit || ShelvesMax('MGRPAGE');
90
    $shelvesoffset = ( $shelfoff - 1 ) * $shelflimit;    # Sets the offset to begin retrieving shelves at (offset)
90
        $shelfoffset   = ( $itemoff - 1 ) * $shelflimit;     # Sets the offset to begin retrieving items at
91
                                                # getting the Shelves list
91
        $shelveslimit  = $shelflimit;                        # Limits number of shelves returned for a given query (row_count)
92
        $shelvesoffset = ( $shelfoff - 1 ) * $shelflimit;    # Sets the offset to begin retrieving shelves at (offset)
93
    }
94
92
    my $category = ( ( $displaymode eq 'privateshelves' ) ? 1 : 2 );
95
    my $category = ( ( $displaymode eq 'privateshelves' ) ? 1 : 2 );
93
    my ( $shelflist, $totshelves ) = GetShelves( $category, $shelveslimit, $shelvesoffset, $loggedinuser );
96
    my ( $shelflist, $totshelves ) = GetShelves( $category, $shelveslimit, $shelvesoffset, $loggedinuser );
94
97
Lines 464-469 sub shelfpage { Link Here
464
        $template->param(
467
        $template->param(
465
             pagination_bar => pagination_bar( $url, ( int( $totshelves / $shelveslimit ) ) + ( ( $totshelves % $shelveslimit ) > 0 ? 1 : 0 ), $shelfoff, "shelfoff" )  );
468
             pagination_bar => pagination_bar( $url, ( int( $totshelves / $shelveslimit ) ) + ( ( $totshelves % $shelveslimit ) > 0 ? 1 : 0 ), $shelfoff, "shelfoff" )  );
466
    }
469
    }
470
467
    $template->param(
471
    $template->param(
468
        shelveslooppriv                                                    => \@shelveslooppriv,
472
        shelveslooppriv                                                    => \@shelveslooppriv,
469
        shelvesloop                                                        => \@shelvesloop,
473
        shelvesloop                                                        => \@shelvesloop,
(-)a/koha-tmpl/intranet-tmpl/prog/en/css/print.css (-1 / +1 lines)
Lines 322-325 fieldset { Link Here
322
}
322
}
323
#cataloguing_additem_itemlist {
323
#cataloguing_additem_itemlist {
324
	overflow : visible !important;
324
	overflow : visible !important;
325
}
325
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc (-5 / +1 lines)
Lines 12-21 Link Here
12
            sendList();
12
            sendList();
13
            return false;
13
            return false;
14
        });
14
        });
15
        $("#printlist").click(function(){
16
            print();
17
            return false;
18
        });
19
        $("#deleteshelf").click(function(e){
15
        $("#deleteshelf").click(function(e){
20
            if(confirmDelete(_("Are you sure you want to delete this list?"))){
16
            if(confirmDelete(_("Are you sure you want to delete this list?"))){
21
                return true;
17
                return true;
Lines 60-65 Link Here
60
                </ul>
56
                </ul>
61
        </div>
57
        </div>
62
        <div class="btn-group"><a class="btn btn-small" href="#" id="sendlist"><i class="icon-envelope"></i> Send list</a></div>
58
        <div class="btn-group"><a class="btn btn-small" href="#" id="sendlist"><i class="icon-envelope"></i> Send list</a></div>
63
        <div class="btn-group"><a class="btn btn-small" id="printlist" href="#"><i class="icon-print"></i> Print list</a></div>
59
        <div class="btn-group"><a class="btn btn-small" id="printlist" target="_blank" href="/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=[% shelfnumber %]&amp;print=1"><i class="icon-print"></i> Print list</a></div>
64
    [% END %]
60
    [% END %]
65
</div>
61
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt (-2 / +12 lines)
Lines 1-6 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
<title>Koha &rsaquo; [% IF ( viewshelf ) %]Lists &rsaquo; Contents of [% shelfname | html %][% ELSE %]Lists[% END %][% IF ( shelves ) %] &rsaquo; Create new list[% END %][% IF ( edit ) %] &rsaquo; Edit list [% shelfname | html %][% END %]</title>
2
<title>Koha &rsaquo; [% IF ( viewshelf ) %]Lists &rsaquo; Contents of [% shelfname | html %][% ELSE %]Lists[% END %][% IF ( shelves ) %] &rsaquo; Create new list[% END %][% IF ( edit ) %] &rsaquo; Edit list [% shelfname | html %][% END %]</title>
3
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'doc-head-close.inc' %]
4
5
[% IF print %]
6
<script type="text/javascript">
7
    $( document ).ready(function() {
8
        window.print();
9
        setTimeout('window.close()', 1);
10
    });
11
</script>
12
[% END %]
13
4
[% IF ( viewshelf ) %]
14
[% IF ( viewshelf ) %]
5
    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
15
    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
6
    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
16
    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
Lines 282-288 function placeHold () { Link Here
282
    [% SET new_direction = 'asc' %]
292
    [% SET new_direction = 'asc' %]
283
[% END %]
293
[% END %]
284
294
285
<div id="searchheader">
295
<div id="searchheader" class="noprint">
286
    [% IF ( itemsloop ) %]
296
    [% IF ( itemsloop ) %]
287
        <div id="selection_ops"><span class="checkall"></span> |
297
        <div id="selection_ops"><span class="checkall"></span> |
288
        <span class="clearall"></span>
298
        <span class="clearall"></span>
Lines 402-408 function placeHold () { Link Here
402
[% IF ( allowaddingitem ) %]
412
[% IF ( allowaddingitem ) %]
403
<div class="yui-g">
413
<div class="yui-g">
404
<form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="post">
414
<form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="post">
405
 <fieldset class="brief">
415
 <fieldset class="brief noprint">
406
    <legend>Add an item to <i>[% shelfname | html %]</i></legend>
416
    <legend>Add an item to <i>[% shelfname | html %]</i></legend>
407
        <ol>
417
        <ol>
408
            <li>
418
            <li>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt (-4 / +9 lines)
Lines 43-49 Link Here
43
43
44
[% INCLUDE 'masthead.inc' %]
44
[% INCLUDE 'masthead.inc' %]
45
<div class="main">
45
<div class="main">
46
    <ul class="breadcrumb">
46
    <ul class="breadcrumb noprint">
47
        <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
47
        <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
48
        [% IF ( loggedinusername ) %]
48
        [% IF ( loggedinusername ) %]
49
            <li><a href="/cgi-bin/koha/opac-user.pl">[% FOREACH USER_INF IN USER_INFO %][% USER_INF.title %] [% USER_INF.firstname %] [% USER_INF.surname %][% END %]</a> <span class="divider">&rsaquo;</span></li>
49
            <li><a href="/cgi-bin/koha/opac-user.pl">[% FOREACH USER_INF IN USER_INFO %][% USER_INF.title %] [% USER_INF.firstname %] [% USER_INF.surname %][% END %]</a> <span class="divider">&rsaquo;</span></li>
Lines 91-97 Link Here
91
91
92
    <div class="container-fluid">
92
    <div class="container-fluid">
93
        <div class="row-fluid">
93
        <div class="row-fluid">
94
            [% IF ( OpacNav||loggedinusername ) %]
94
            [% IF ( OpacNav||loggedinusername ) && !print %]
95
                <div class="span2">
95
                <div class="span2">
96
                    <div id="navigation">
96
                    <div id="navigation">
97
                        [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
97
                        [% INCLUDE 'navigation.inc' IsPatronPage=1 %]
Lines 162-168 Link Here
162
                                        <span class="sendlist"><a href="/cgi-bin/koha/opac-sendshelf.pl?shelfid=[% shelfnumber | html %]" class="send" onclick="open('/cgi-bin/koha/opac-sendshelf.pl?shelfid=[% shelfnumber | html %]','win_form','scrollbars=no,resizable=no,height=300,width=450,top=50,left=100'); return false; ">Send list</a></span>
162
                                        <span class="sendlist"><a href="/cgi-bin/koha/opac-sendshelf.pl?shelfid=[% shelfnumber | html %]" class="send" onclick="open('/cgi-bin/koha/opac-sendshelf.pl?shelfid=[% shelfnumber | html %]','win_form','scrollbars=no,resizable=no,height=300,width=450,top=50,left=100'); return false; ">Send list</a></span>
163
                                    [% END %]
163
                                    [% END %]
164
164
165
                                    <a class="print-small" href="/cgi-bin/koha/opac-shelves.pl" onclick="print(); return false;">Print list</a>
165
                                    <a class="print-small" target="_blank" href="/cgi-bin/koha/opac-shelves.pl?viewshelf=[% shelfnumber %]&sort=[% sort %]&direction=[% direction %]&print=1">Print list</a>
166
166
167
                                    [% IF ( manageshelf ) %]
167
                                    [% IF ( manageshelf ) %]
168
                                        <span class="sep">|</span>
168
                                        <span class="sep">|</span>
Lines 242-248 Link Here
242
242
243
                            </div> <!-- / #toolbar -->
243
                            </div> <!-- / #toolbar -->
244
244
245
                            <div id="selections-toolbar" class="toolbar">
245
                            <div id="selections-toolbar" class="toolbar noprint">
246
                                <span class="checkall"></span> <span class="clearall"></span> <span class="sep">|</span>
246
                                <span class="checkall"></span> <span class="clearall"></span> <span class="sep">|</span>
247
                                <span class="links">
247
                                <span class="links">
248
                                    <span id="selections">Select titles to: </span>
248
                                    <span id="selections">Select titles to: </span>
Lines 1017-1022 $(function() { Link Here
1017
    [% IF OPACLocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %]
1017
    [% IF OPACLocalCoverImages %]KOHA.LocalCover.GetCoverFromBibnumber(false);[% END %]
1018
    [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
1018
    [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
1019
    $('#sort-submit').hide();
1019
    $('#sort-submit').hide();
1020
1021
    [% IF print %]
1022
        window.print();
1023
        setTimeout('window.close()', 1);
1024
    [% END %]
1020
}); // document.ready
1025
}); // document.ready
1021
1026
1022
function Check(f) {
1027
function Check(f) {
(-)a/opac/opac-shelves.pl (-1 / +5 lines)
Lines 31-36 my ( $template, $loggedinuser, $cookie ) = get_template_and_user({ Link Here
31
        type            => "opac",
31
        type            => "opac",
32
        authnotrequired => ( C4::Context->preference("OpacPublic") ? 1 : 0 ),
32
        authnotrequired => ( C4::Context->preference("OpacPublic") ? 1 : 0 ),
33
    });
33
    });
34
$template->param(listsview => 1);
34
35
$template->param(
36
    listsview => 1,
37
    print     => $query->param('print')
38
);
35
39
36
shelfpage('opac', $query, $template, $loggedinuser, $cookie);
40
shelfpage('opac', $query, $template, $loggedinuser, $cookie);
(-)a/virtualshelves/shelves.pl (-1 / +1 lines)
Lines 35-38 my ( $template, $loggedinuser, $cookie ) = get_template_and_user( Link Here
35
        flagsrequired   => { catalogue => 1 },
35
        flagsrequired   => { catalogue => 1 },
36
    }
36
    }
37
);
37
);
38
$template->param( print => $query->param('print') );
38
shelfpage('intranet', $query, $template, $loggedinuser, $cookie);
39
shelfpage('intranet', $query, $template, $loggedinuser, $cookie);
39
- 

Return to bug 13986