Bugzilla – Attachment 115699 Details for
Bug 27527
Plugin hooks to create additional contents
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27527: Add new page to integrate the content to Koha correctly
Bug-27527-Add-new-page-to-integrate-the-content-to.patch (text/plain), 3.17 KB, created by
Jonathan Druart
on 2021-01-22 15:22:48 UTC
(
hide
)
Description:
Bug 27527: Add new page to integrate the content to Koha correctly
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-01-22 15:22:48 UTC
Size:
3.17 KB
patch
obsolete
>From ea6b3ac66b26b59856557180e897717a0b012931 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 20 Jan 2021 21:01:14 +0100 >Subject: [PATCH] Bug 27527: Add new page to integrate the content to Koha > correctly > >Sponsored-by: Orex Digital >--- > .../tools/additional_plugin_content.tt | 19 +++++++ > tools/additional_plugin_content.pl | 53 +++++++++++++++++++ > 2 files changed, 72 insertions(+) > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional_plugin_content.tt > create mode 100755 tools/additional_plugin_content.pl > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional_plugin_content.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional_plugin_content.tt >new file mode 100644 >index 0000000000..48eac2f731 >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional_plugin_content.tt >@@ -0,0 +1,19 @@ >+[% USE raw %] >+ >+[% INCLUDE 'doc-head-open.inc' %] >+<title>Koha › Tools › [% content.name | html %]</title> >+[% INCLUDE 'doc-head-close.inc' %] >+</head> >+<body id="tools_tools-home" class="tools"> >+[% INCLUDE 'header.inc' %] >+[% INCLUDE 'cat-search.inc' %] >+ >+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › Tools</div> >+ >+<div class="container-fluid"> >+ <div class="row"> >+ [% content.content | $raw %] >+ <div class="row"> >+</div> >+ >+[% INCLUDE 'intranet-bottom.inc' %] >diff --git a/tools/additional_plugin_content.pl b/tools/additional_plugin_content.pl >new file mode 100755 >index 0000000000..ecb770f684 >--- /dev/null >+++ b/tools/additional_plugin_content.pl >@@ -0,0 +1,53 @@ >+#!/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 <http://www.gnu.org/licenses>. >+ >+use Modern::Perl; >+ >+use CGI qw ( -utf8 ); >+use C4::Auth; >+use C4::Output; >+use Koha::Plugins::Handler; >+ >+my $query = CGI->new; >+my ( $template, $loggedinuser, $cookie ) = get_template_and_user( >+ { >+ template_name => "tools/additional_plugin_content.tt", >+ query => $query, >+ type => "intranet", >+ flagsrequired => { catalogue => '*' }, >+ } >+); >+ >+unless ( C4::Context->config('enable_plugins') ) { >+ print $query->redirect("/cgi-bin/koha/errors/404.pl"); >+ exit; >+} >+ >+my $class_plugin = $query->param('class'); >+my $id = $query->param('id'); >+ >+my $content = Koha::Plugins::Handler->run( >+ { >+ class => $class_plugin, >+ method => 'content', >+ params => { id => $id }, >+ } >+); >+ >+$template->param( content => $content ); >+ >+output_html_with_http_headers $query, $cookie, $template->output; >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27527
:
115698
| 115699