rotatingCollections.pl 1.33 KB
Newer Older
1
#!/usr/bin/perl
2 3 4

# This file is part of Koha.
#
5 6 7 8
# Koha is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
9
#
10 11 12 13
# Koha is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
14
#
15 16
# You should have received a copy of the GNU General Public License
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17 18
#

19
use Modern::Perl;
20

21
use CGI qw ( -utf8 );
22 23 24 25 26 27 28

use C4::Output;
use C4::Auth;
use C4::Context;
use C4::RotatingCollections;

my $query = new CGI;
29 30 31

my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
    {
32
        template_name   => "rotating_collections/rotatingCollections.tt",
33 34 35 36 37 38 39
        query           => $query,
        type            => "intranet",
        authnotrequired => 0,
        flagsrequired   => { tools => 'rotating_collections' },
        debug           => 1,
    }
);
40 41 42 43 44 45

my $branchcode = $query->cookie('branch');

my $collections = GetCollections();

$template->param(
46 47 48
    collectionsLoop => $collections,
);

49
output_html_with_http_headers $query, $cookie, $template->output;