Bugzilla – Attachment 113758 Details for
Bug 27033
Add plugin hook to add a big link in staff home page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27033: Add plugin hook to add a big link in staff home page
Bug-27033-Add-plugin-hook-to-add-a-big-link-in-sta.patch (text/plain), 4.38 KB, created by
David Nind
on 2020-11-17 19:22:51 UTC
(
hide
)
Description:
Bug 27033: Add plugin hook to add a big link in staff home page
Filename:
MIME Type:
Creator:
David Nind
Created:
2020-11-17 19:22:51 UTC
Size:
4.38 KB
patch
obsolete
>From 75b3a2d192ec17989b8f72a9624330c193f5d932 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >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 > >Signed-off-by: David Nind <david@davidnind.com> >--- > .../intranet-tmpl/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' %] > <title>Koha staff interface</title> >@@ -46,7 +47,7 @@ > </div> <!-- /.col-sm-2 --> > <div class="col-sm-9"> > <div class="row"> >- <div class="col-xs-6"> >+ <div class="col-xs-4"> > <ul class="biglinks-list"> > [% IF ( CAN_user_circulate_circulate_remaining_permissions ) %] > <li> >@@ -85,8 +86,8 @@ > </li> > [% END %] > </ul> >- </div> <!-- /.col-xs-6 --> >- <div class="col-xs-6"> >+ </div> <!-- /.col-xs-4 --> >+ <div class="col-xs-4"> > <ul class="biglinks-list"> > > [% IF ( Koha.Preference('EnablePointOfSale') && Koha.Preference('UseCashRegisters') && CAN_user_cash_management_takepayment ) %] >@@ -133,12 +134,24 @@ > <a class="icon_general icon_administration" href="/cgi-bin/koha/admin/admin-home.pl"><i class="fa fa-cogs"></i>Koha administration</a> > </li> > [% END %] >+ </ul> >+ </div> <!-- /.col-sm-4 --> >+ <div class="col-xs-4"> >+ <ul class="biglinks-list"> > <li> > <a class="icon_general icon_koha" href="/cgi-bin/koha/about.pl">About Koha<img src="[% interface | html %]/[% theme | html %]/img/koha-egg.svg" alt="Koha Logo SVG"/></a> > </li> >+ [% FOREACH big_link_plugin IN big_link_plugins %] >+ [% SET big_link = big_link_plugin.intranet_big_link %] >+ <li> >+ <a class="icon_general [% big_link.link_class | html %]" href="[% big_link.url | html %]"> >+ [% IF ( big_link.fa_class ) %]<i class="fa [% big_link.fa_class | html %]"></i>[% END %] >+ [% big_link.html_content | $raw %] >+ </a> >+ </li> >+ [% END %] > </ul> >- </div> <!-- /.col-sm-6 --> >- >+ </div> <!-- /.col-sm-4 --> > </div> <!-- /.row --> > <div class="row"> > <div class="col-sm-12"> >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.11.0
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 27033
:
113689
|
113690
|
113693
| 113758