]> git.koha-community.org Git - koha.git/commit
Bug 35877: Use template wrapper to build Bootstrap accordion components
authorOwen Leonard <oleonard@myacpl.org>
Tue, 23 Jan 2024 18:54:02 +0000 (18:54 +0000)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Tue, 26 Mar 2024 10:21:12 +0000 (11:21 +0100)
commita11ba52f2e057ab3b10da6c90612586805ab3dba
treed71254fee272f62a25e87053f66a2fc7403ae85d
parent5783d01af00a5bf21527c81a05252d99a2a14e9a
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>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers.inc