Skip to content

Commit

Permalink
Add admin section
Browse files Browse the repository at this point in the history
  • Loading branch information
kylemhall committed Mar 15, 2024
1 parent 108b43e commit 0e6528b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Koha/Plugin/Com/ByWaterSolutions/KitchenSink.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 16 additions & 0 deletions Koha/Plugin/Com/ByWaterSolutions/KitchenSink/admin.tt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[% USE KohaDates %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha: Kitchen Sink Plugin: Admin</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body>
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]

<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/plugins/plugins-home.pl">Plugins</a> &rsaquo; Kitchen Sink &rsaquo; Admin</div>

<div id="doc3">
<h3>Koha: Kitchen Sink Plugin: Administration</h3>

<p>This is the admin section. You should not be able to acesss this section with the "Use administrative plugins" permission.</p>
[% INCLUDE 'intranet-bottom.inc' %]

0 comments on commit 0e6528b

Please sign in to comment.