Bugzilla – Attachment 154673 Details for
Bug 34307
Update plugin wrapper to use template wrapper for breadcrumbs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34307: Update plugin template to match master conventions
Bug-34307-Update-plugin-template-to-match-master-c.patch (text/plain), 3.74 KB, created by
Victor Grousset/tuxayo
on 2023-08-20 02:30:02 UTC
(
hide
)
Description:
Bug 34307: Update plugin template to match master conventions
Filename:
MIME Type:
Creator:
Victor Grousset/tuxayo
Created:
2023-08-20 02:30:02 UTC
Size:
3.74 KB
patch
obsolete
>From 7076392759a8a3a6f0d4fa2d630e671c8ef52b29 Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Wed, 19 Jul 2023 05:35:35 +0000 >Subject: [PATCH] Bug 34307: Update plugin template to match master conventions > >This change uses WRAPPER to build the breadcrumbs and >updates the plugin template to follow some other master conventions >like differentiating between Administration and Tools for plugins. > >Test plan: >0. Apply patch >1. Upload koha-plugin-test-wrapper >2. Enable the plugin >3. Click "Actions" and click "Run tool" >4. Note how the plugin page looks like a perfect Koha Tools page >5. Note that the plugin only contains 6 lines of template code >to achieve this effect > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> >--- > .../en/includes/wrapper-staff-tool-plugin.inc | 60 ++++++++++++------- > 1 file changed, 38 insertions(+), 22 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/wrapper-staff-tool-plugin.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/wrapper-staff-tool-plugin.inc >index 0543393ccb..f6aab0b3ef 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/wrapper-staff-tool-plugin.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/wrapper-staff-tool-plugin.inc >@@ -1,32 +1,44 @@ > [% USE raw %] > [% SET footerjs = 1 %] > [% INCLUDE 'doc-head-open.inc' %] >-<title>[% IF ( plugin_title ) %][% plugin_title | html %] › [% END %]Plugins › Tools › Koha </title> >+[% IF ( ! method ) %] >+[% method = 'tool'; %] >+[% END %] >+<title> >+ [% IF ( plugin_title ) %][% plugin_title | html %] › [% END %] >+ Plugins › >+ [% IF ( method == 'tool' ) %] >+ Tools >+ [% ELSE %] >+ Administration >+ [% END %] >+ › Koha >+ </title> > [% INCLUDE 'doc-head-close.inc' %] > </head> >-<body id="plugins_run_tool" class="plugins"> > >-[% INCLUDE 'header.inc' %] >-[% INCLUDE 'prefs-admin-search.inc' %] >+<body id="plugins_run_tool" class="plugins"> >+[% WRAPPER 'header.inc' %] >+ [% INCLUDE 'prefs-admin-search.inc' %] >+[% END %] > >-<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb"> >- <ol> >- <li> >- <a href="/cgi-bin/koha/mainpage.pl">Home</a> >- </li> >- <li> >- <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> >- </li> >- <li> >+[% WRAPPER 'sub-header.inc' %] >+ [% WRAPPER breadcrumbs %] >+ [% WRAPPER breadcrumb_item %] >+ [% IF ( method == 'tool' ) %] >+ <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> >+ [% ELSE %] >+ <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> >+ [% END %] >+ [% END %] >+ [% WRAPPER breadcrumb_item %] > <a href="/cgi-bin/koha/plugins/plugins-home.pl">Plugins</a> >- </li> >- <li> >- <a href="#" aria-current="page"> >- [% IF ( plugin_title ) %][% plugin_title | html %][% ELSE %]Plugin[% END %] >- </a> >- </li> >- </ol> >-</nav> >+ [% END %] >+ [% WRAPPER breadcrumb_item bc_active= 1 %] >+ <span>[% IF ( plugin_title ) %][% plugin_title | html %][% ELSE %]Plugin[% END %]</span> >+ [% END %] >+ [% END #/ WRAPPER breadcrumbs %] >+[% END #/ WRAPPER sub-header.inc %] > > <div class="main container-fluid"> > <div class="row"> >@@ -38,7 +50,11 @@ > > <div class="col-sm-2 col-sm-pull-10"> > <aside> >- [% INCLUDE 'tools-menu.inc' %] >+ [% IF ( method == 'tool' ) %] >+ [% INCLUDE 'tools-menu.inc' %] >+ [% ELSE %] >+ [% INCLUDE 'admin-menu.inc' %] >+ [% END %] > </aside> > </div> <!-- /.col-sm-2.col-sm-pull-10 --> > </div> <!-- /.row --> >-- >2.41.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 34307
:
153623
|
153624
|
154324
| 154673 |
154674
|
154678
|
154679
|
154683