From 35135f8b8f76af1119abfbd23c4b025c038c2b48 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 15 Jul 2022 12:37:03 +0100 Subject: [PATCH] Bug 31162: Add a cataloging module home page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch adds a new cataloging-home template and controller and replaces most cases of links to addbooks. This servers to provide a new cataloging home page for the cataloging module and keeps it distinct from the current addbooks page it partially replaces as a stating point for cataloging. Signed-off-by: KIT Signed-off-by: Emmanuel Bétemps --- cataloguing/cataloging-home.pl | 52 +++++ .../intranet-tmpl/prog/en/includes/header.inc | 2 +- .../prog/en/modules/cataloguing/addbiblio.tt | 4 +- .../prog/en/modules/cataloguing/addbooks.tt | 2 +- .../prog/en/modules/cataloguing/additem.tt | 2 +- .../en/modules/cataloguing/cataloging-home.tt | 182 ++++++++++++++++++ .../prog/en/modules/cataloguing/editor.tt | 2 +- .../prog/en/modules/cataloguing/linkitem.tt | 2 +- .../prog/en/modules/cataloguing/merge.tt | 2 +- .../prog/en/modules/intranet-main.tt | 2 +- 10 files changed, 243 insertions(+), 9 deletions(-) create mode 100755 cataloguing/cataloging-home.pl create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt diff --git a/cataloguing/cataloging-home.pl b/cataloguing/cataloging-home.pl new file mode 100755 index 0000000000..78327409ec --- /dev/null +++ b/cataloguing/cataloging-home.pl @@ -0,0 +1,52 @@ +#!/usr/bin/perl + +# This file is part of Koha. +# +# 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. +# +# 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. +# +# You should have received a copy of the GNU General Public License +# along with Koha; if not, see . +# + +use Modern::Perl; +use CGI qw ( -utf8 ); +use C4::Auth qw( get_template_and_user ); +use C4::Output qw( output_html_with_http_headers ); +use C4::Context; + +use Koha::BiblioFrameworks; +use Koha::Z3950Servers; + +my $query = CGI->new; +my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( + { + template_name => "cataloguing/cataloging-home.tt", + query => $query, + type => "intranet", + flagsrequired => { editcatalogue => '*' }, + } +); + +my $servers = Koha::Z3950Servers->search( + { + recordtype => 'biblio', + servertype => ['zed','sru'], + } +); + +my $frameworks = Koha::BiblioFrameworks->search({}, { order_by => ['frameworktext'] }); + +$template->param( + servers => $servers, + frameworks => $frameworks +); + +output_html_with_http_headers $query, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc index 754ac0d294..473b5b3d20 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc @@ -34,7 +34,7 @@