From c019476f6660896aa49a88798d6fa678b22775f7 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Tue, 17 Nov 2020 09:49:19 +0100 Subject: [PATCH] Bug 27033: Add plugin hook to add a big link in staff home page In staff home page we have some big links : Circulation, Patrons ... Add plugin hook to add such a link. Defined by a CSS class, an URL, a Font Awesome icon and a content. In order to porpose a space where those links will show, I propose to create 3 columns of links. The new one will have "About" link (in order to not be empty when no plugins) and links from plugins. Test plan : Use example plugin and see the big link in home page like in screenshot --- .../prog/en/modules/intranet-main.tt | 23 +++++++++++++++---- mainpage.pl | 7 ++++++ 2 files changed, 25 insertions(+), 5 deletions(-) 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 373c312dd5..4fa3afe289 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt @@ -2,6 +2,7 @@ [% USE Asset %] [% USE Koha %] [% USE Branches %] +[% KohaPlugins %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha staff interface @@ -46,7 +47,7 @@
-
+
-
-
+
+
+
+
+ -
- +
diff --git a/mainpage.pl b/mainpage.pl index 183b5e0fcd..4e08fc2e30 100755 --- a/mainpage.pl +++ b/mainpage.pl @@ -103,4 +103,11 @@ $template->param( pending_problem_reports => $pending_problem_reports ); +if ( C4::Context->config('enable_plugins') ) { + my @big_link_plugins = Koha::Plugins->new()->GetPlugins({ + method => 'intranet_big_link', + }); + $template->param( big_link_plugins => \@big_link_plugins ); +} + output_html_with_http_headers $query, $cookie, $template->output; -- 2.29.2