From 8c33eac0a8c1d19dee1547c628f608c7d459b9af Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 23 Feb 2022 12:32:09 +0100 Subject: [PATCH] Bug 32030: ERM - Home view Signed-off-by: Jonathan Field Signed-off-by: Martin Renvoize Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- erm/erm-home.pl | 38 ++++++++++++++++++ .../prog/en/includes/erm-search.inc | 19 +++++++++ .../prog/en/modules/erm/erm-home.tt | 40 +++++++++++++++++++ .../prog/en/modules/intranet-main.tt | 7 ++++ 4 files changed, 104 insertions(+) create mode 100755 erm/erm-home.pl create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/erm-search.inc create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/erm/erm-home.tt diff --git a/erm/erm-home.pl b/erm/erm-home.pl new file mode 100755 index 0000000000..e657e7df93 --- /dev/null +++ b/erm/erm-home.pl @@ -0,0 +1,38 @@ +#! /usr/bin/perl + +# Copyright 2022 Koha Development Team +# +# 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::Context; +use C4::Auth qw( get_template_and_user ); +use C4::Output qw( output_html_with_http_headers ); + +use Koha::Cities; + +my $input = CGI->new; + +my ( $template, $loggedinuser, $cookie ) = get_template_and_user( + { template_name => "erm/erm-home.tt", + query => $input, + type => "intranet", + flagsrequired => { erm => '*' }, + } +); + +output_html_with_http_headers $input, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/erm-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/erm-search.inc new file mode 100644 index 0000000000..27c7f36dc3 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/erm-search.inc @@ -0,0 +1,19 @@ +[% USE Koha %] +
+

[% LibraryName | html %]

+ +
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/erm/erm-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/erm/erm-home.tt new file mode 100644 index 0000000000..0417b04c84 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/erm/erm-home.tt @@ -0,0 +1,40 @@ +[% USE raw %] +[% USE Koha %] +[% USE Branches %] +[% INCLUDE 'doc-head-open.inc' %] +Electronic resources management › Koha +[% INCLUDE 'doc-head-close.inc' %] + + +[% INCLUDE 'header.inc' %] +[% INCLUDE 'erm-search.inc' %] + + + +
+
+
+

Electronic resources management

+ + +
+
+
+ +[% INCLUDE 'intranet-bottom.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt index 09d2fddb48..3b9dbd00dd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt @@ -111,6 +111,13 @@ ILL requests [% END %] + + [% IF Koha.Preference('ERMModule') && CAN_user_erm %] +
  • + Electronic resources management +
  • + [% END %] +
    -- 2.39.5