From 0e6528b941cd5ea0fa5f2a467398ca640125d2d9 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 15 Mar 2024 14:01:16 -0400 Subject: [PATCH] Add admin section --- Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm | 12 ++++++++++++ .../Com/ByWaterSolutions/KitchenSink/admin.tt | 16 ++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 Koha/Plugin/Com/ByWaterSolutions/KitchenSink/admin.tt diff --git a/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm b/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm index 74be412..ccd1a1b 100644 --- a/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm +++ b/Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm @@ -99,6 +99,18 @@ sub tool { } } +## The existance of a 'admin' subroutine means the plugin is capable +## of running an admin section for things that should not be accessible +## for non-admin users +sub admin { + my ( $self, $args ) = @_; + + my $cgi = $self->{'cgi'}; + + my $template = $self->get_template({ file => 'admin.tt' }); + $self->output_html( $template->output() ); +} + ## The existiance of a 'to_marc' subroutine means the plugin is capable ## of converting some type of file to MARC for use from the stage records ## for import tool diff --git a/Koha/Plugin/Com/ByWaterSolutions/KitchenSink/admin.tt b/Koha/Plugin/Com/ByWaterSolutions/KitchenSink/admin.tt new file mode 100644 index 0000000..22919ea --- /dev/null +++ b/Koha/Plugin/Com/ByWaterSolutions/KitchenSink/admin.tt @@ -0,0 +1,16 @@ +[% USE KohaDates %] +[% INCLUDE 'doc-head-open.inc' %] + Koha: Kitchen Sink Plugin: Admin +[% INCLUDE 'doc-head-close.inc' %] + + +[% INCLUDE 'header.inc' %] +[% INCLUDE 'cat-search.inc' %] + + + +
+

Koha: Kitchen Sink Plugin: Administration

+ +

This is the admin section. You should not be able to acesss this section with the "Use administrative plugins" permission.

+[% INCLUDE 'intranet-bottom.inc' %]