Bugzilla – Attachment 145087 Details for
Bug 32571
Use template wrapper to build tabbed components
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32571: Use template wrapper to build tabbed components
Bug-32571-Use-template-wrapper-to-build-tabbed-com.patch (text/plain), 3.18 KB, created by
Kyle M Hall (khall)
on 2023-01-06 16:08:03 UTC
(
hide
)
Description:
Bug 32571: Use template wrapper to build tabbed components
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2023-01-06 16:08:03 UTC
Size:
3.18 KB
patch
obsolete
>From c8d1db3adeacf85052755700a39628e6c0012e15 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 5 Jan 2023 12:54:42 +0000 >Subject: [PATCH] Bug 32571: Use template wrapper to build tabbed components > >This patch adds Template::Toolkit WRAPPER blocks to html_helpers.inc so >that templates can build tabbed components while keeping tab structural >markup separate. > >Each individual component of a Bootstrap tabbed interface is defined: > >- Main tab container >- Tab links container >- Individual tab links >- Tab panel container >- Individual tab panels > >Included is a usage example: > > [ WRAPPER tabs id= "tabs container id" ] > [ WRAPPER tabs_nav ] > [ WRAPPER tab_item tabname= "tab name 1" ] [ content ] [ END ] > [ WRAPPER tab_item tabname= "tab name 2" ] [ content ] [ END ] > ... > [ END ] > [ WRAPPER tab_panels ] > [ WRAPPER tab_panel id="tab name 1"] [ content ] [ END ] > [ WRAPPER tab_panel id="tab name 2"] [ content ] [ END ] > ... > [ END ] > [ END ] > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > .../prog/en/includes/html_helpers.inc | 59 +++++++++++++++++++ > 1 file changed, 59 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 52d645f255..32f67bfe4b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc >@@ -341,3 +341,62 @@ > </table> <!-- /#itemst --> > </div> > [% END %] >+ >+[%# BOOTSTRAP TAB WRAPPER USAGE >+ [ WRAPPER tabs id= "tabs container id" ] >+ [ WRAPPER tabs_nav ] >+ [ WRAPPER tab_item tabname= "tab name 1" ] [ content ] [ END ] >+ [ WRAPPER tab_item tabname= "tab name 2" ] [ content ] [ END ] >+ ... >+ [ END ] >+ [ WRAPPER tab_panels ] >+ [ WRAPPER tab_panel id="tab name 1"] [ content ] [ END ] >+ [ WRAPPER tab_panel id="tab name 2"] [ content ] [ END ] >+ ... >+ [ END ] >+ [ END ] >+ %] >+ >+[% BLOCK tabs %] >+ [% IF ( id ) %] >+ <div id="[% id | html %]" class="toptabs"> >+ [% ELSE %] >+ <div class="toptabs"> >+ [% END %] >+ [% content | $raw %] >+ </div> >+[% END %] >+ >+[% BLOCK tabs_nav %] >+ <ul class="nav nav-tabs" role="tablist"> >+ [% content | $raw %] >+ </ul> >+[% END %] >+ >+[% BLOCK tab_item %] >+ [% IF ( active ) %] >+ <li role="presentation" class="active"> >+ [% ELSE %] >+ <li role="presentation"> >+ [% END %] >+ <a href="#[% tabname | uri %]_panel" aria-controls="[% tabname | uri %]_panel" role="tab" data-toggle="tab"> >+ [% content | $raw %] >+ </a> >+ <li> >+[% END %] >+ >+[% BLOCK tab_panels %] >+ <div class="tab-content"> >+ [% content | $raw %] >+ </div> >+[% END %] >+ >+[% BLOCK tab_panel %] >+ [% IF ( active ) %] >+ <div role="tabpanel" class="tab-pane active" id="[% tabname | html %]_panel"> >+ [% ELSE %] >+ <div role="tabpanel" class="tab-pane" id="[% tabname | html %]_panel"> >+ [% END %] >+ [% content| $raw %] >+ </div> >+[% 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 32571
:
145059
|
145060
|
145075
|
145076
|
145087
|
145529
|
145530
|
145531
|
145533
|
146199
|
146200
|
146201