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

(-)a/C4/VirtualShelves/Page.pm (-6 / +9 lines)
Lines 76-87 sub shelfpage { Link Here
76
    my ( $shelflimit, $shelfoffset, $shelveslimit, $shelvesoffset );
76
    my ( $shelflimit, $shelfoffset, $shelveslimit, $shelvesoffset );
77
    my $marcflavour = C4::Context->preference("marcflavour");
77
    my $marcflavour = C4::Context->preference("marcflavour");
78
78
79
    $shelflimit = ( $type eq 'opac' ? C4::Context->preference('OPACnumSearchResults') : C4::Context->preference('numSearchResults') );
79
    unless ( $query->param('print') ) {
80
    $shelflimit = $shelflimit || ShelvesMax('MGRPAGE');
80
        $shelflimit = ( $type eq 'opac' ? C4::Context->preference('OPACnumSearchResults') : C4::Context->preference('numSearchResults') );
81
    $shelflimit = undef if $query->param('rss');
81
        $shelflimit = $shelflimit || ShelvesMax('MGRPAGE');
82
    $shelfoffset   = ( $itemoff - 1 ) * $shelflimit;     # Sets the offset to begin retrieving items at
82
        $shelflimit = undef if $query->param('rss');
83
    $shelveslimit  = $shelflimit;                        # Limits number of shelves returned for a given query (row_count)
83
        $shelfoffset   = ( $itemoff - 1 ) * $shelflimit;     # Sets the offset to begin retrieving items at
84
    $shelvesoffset = ( $shelfoff - 1 ) * $shelflimit;    # Sets the offset to begin retrieving shelves at (offset)
84
        $shelveslimit  = $shelflimit;                        # Limits number of shelves returned for a given query (row_count)
85
        $shelvesoffset = ( $shelfoff - 1 ) * $shelflimit;    # Sets the offset to begin retrieving shelves at (offset)
86
    }
85
87
86
    # getting the Shelves list
88
    # getting the Shelves list
87
    my $category = ( ( $displaymode eq 'privateshelves' ) ? 1 : 2 );
89
    my $category = ( ( $displaymode eq 'privateshelves' ) ? 1 : 2 );
Lines 469-474 sub shelfpage { Link Here
469
                 pagination_bar => pagination_bar( $url, ( int( $totshelves / $shelveslimit ) ) + ( ( $totshelves % $shelveslimit ) > 0 ? 1 : 0 ), $shelfoff, "shelfoff" )  );
471
                 pagination_bar => pagination_bar( $url, ( int( $totshelves / $shelveslimit ) ) + ( ( $totshelves % $shelveslimit ) > 0 ? 1 : 0 ), $shelfoff, "shelfoff" )  );
470
        }
472
        }
471
    }
473
    }
474
472
    $template->param(
475
    $template->param(
473
        shelveslooppriv                                                    => \@shelveslooppriv,
476
        shelveslooppriv                                                    => \@shelveslooppriv,
474
        shelvesloop                                                        => \@shelvesloop,
477
        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 4-9 Link Here
4
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
4
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
5
[% INCLUDE 'datatables.inc' %]
5
[% INCLUDE 'datatables.inc' %]
6
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.columnFilter.js"></script>
6
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.dataTables.columnFilter.js"></script>
7
8
[% IF print %]
9
<script type="text/javascript">
10
    $( document ).ready(function() {
11
        window.print();
12
        setTimeout('window.close()', 1);
13
    });
14
</script>
15
[% END %]
16
7
[% IF ( viewshelf ) %]
17
[% IF ( viewshelf ) %]
8
    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
18
    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
9
    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
19
    <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.fixFloat.js"></script>
Lines 354-360 function placeHold () { Link Here
354
    [% SET new_direction = 'asc' %]
364
    [% SET new_direction = 'asc' %]
355
[% END %]
365
[% END %]
356
366
357
<div id="searchheader">
367
<div id="searchheader" class="noprint">
358
    [% IF ( itemsloop ) %]
368
    [% IF ( itemsloop ) %]
359
        <div id="selection_ops"><span class="checkall"></span> |
369
        <div id="selection_ops"><span class="checkall"></span> |
360
        <span class="clearall"></span>
370
        <span class="clearall"></span>
Lines 474-480 function placeHold () { Link Here
474
[% IF ( allowaddingitem ) %]
484
[% IF ( allowaddingitem ) %]
475
<div class="yui-g">
485
<div class="yui-g">
476
<form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="post">
486
<form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="post">
477
 <fieldset class="brief">
487
 <fieldset class="brief noprint">
478
    <legend>Add an item to <i>[% shelfname | html %]</i></legend>
488
    <legend>Add an item to <i>[% shelfname | html %]</i></legend>
479
        <ol>
489
        <ol>
480
            <li>
490
            <li>
(-)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