Bugzilla – Attachment 163886 Details for
Bug 35877
Use template wrapper to build Bootstrap accordion components
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35877: Use template wrapper to build Bootstrap accordion components
Bug-35877-Use-template-wrapper-to-build-Bootstrap-.patch (text/plain), 3.40 KB, created by
Julian Maurice
on 2024-03-26 08:32:51 UTC
(
hide
)
Description:
Bug 35877: Use template wrapper to build Bootstrap accordion components
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2024-03-26 08:32:51 UTC
Size:
3.40 KB
patch
obsolete
>From b913edf5941d4a8306239ed1b3101f57ad81c026 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 23 Jan 2024 18:54:02 +0000 >Subject: [PATCH] Bug 35877: Use template wrapper to build Bootstrap accordion > components > >This patch adds Template::Toolkit WRAPPER blocks to html_helpers.inc so >that templates can build Bootstrap accordion components while keeping >the Bootstrap structural markup separate. > >Each individual component of a Bootstrap accordion interface is defined: > >- Group container > - Collapsible item > - Item heading > - Item content > >Included is a usage example: > > [ WRAPPER accordion id="accordion container id" ] > [ WRAPPER accordion_item ] > [ WRAPPER accordion_heading panel_id = "panel id" ] > [Clickable panel heading ] > [ END ] > [ WRAPPER accordion_panel panel_id = "panel id" ] > [Expanding content panel] > [ END ] > [ END ] > [ END ] > >To test, apply this patch and one of the dependent patches. > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> >--- > .../prog/en/includes/html_helpers.inc | 41 +++++++++++++++++++ > 1 file changed, 41 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc >index 535cbca2c9..cda7dca981 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc >@@ -473,3 +473,44 @@ > </li> > [% END %] > [% END %] >+ >+[% # [ WRAPPER accordion id="accordion container id" ] %] >+[% # [ WRAPPER accordion_item ] %] >+[% # [ WRAPPER accordion_heading panel_id = "panel id" ] %] >+[% # [Clickable panel heading ] %] >+[% # [ END ] %] >+[% # [ WRAPPER accordion_panel panel_id = "panel id" ] %] >+[% # [Expanding content panel] %] >+[% # [ END ] %] >+[% # [ END ] %] >+[% # [ END ] %] >+ >+[% BLOCK accordion %] >+ <div class="panel-group" id="[% panelgroup_id | $raw %]_group" role="tablist" aria-multiselectable="true"> >+ [% content | $raw %] >+ </div> >+[% END %] >+ >+[% BLOCK accordion_item %] >+ <div class="panel panel-default"> >+ [% content | $raw %] >+ </div> >+[% END %] >+ >+[% BLOCK accordion_heading %] >+ <div class="panel-heading" role="tab" id="[% panel_id | $raw %]_heading"> >+ <h2 class="panel-title"> >+ <a id="[% panel_id | $raw %]Toggle" href="#[% panel_id | $raw %]_panel" class="collapsed" role="button" data-toggle="collapse" data-parent="#[% panelgroup_id | $raw %]_group" href="#" aria-expanded="false" aria-controls="[% panel_id | $raw %]_panel"> >+ [% content | $raw %] >+ </a> >+ </h2> >+ </div> <!-- /.panel-heading --> >+[% END %] >+ >+[% BLOCK accordion_panel %] >+ <div id="[% panel_id | $raw %]_panel" class="panel-collapse collapse" role="tabpanel" aria-labelledby="[% panel_id | $raw %]_heading"> >+ <div class="panel-body"> >+ [% content | $raw %] >+ </div> <!-- /.panel-body --> >+ </div> <!-- /.panel-collapse --> >+[% END %] >-- >2.30.2
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 35877
:
161328
|
161739
|
163719
|
163720
| 163886 |
163887