Bug 35877 - Use template wrapper to build Bootstrap accordion components
Summary: Use template wrapper to build Bootstrap accordion components
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Julian Maurice
URL:
Keywords:
Depends on:
Blocks: 35880 35882 35883
  Show dependency treegraph
 
Reported: 2024-01-23 18:53 UTC by Owen Leonard
Modified: 2024-03-26 10:21 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00


Attachments
Bug 35877: Use template wrapper to build Bootstrap accordion components (3.29 KB, patch)
2024-01-24 12:50 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 35877: Use template wrapper to build Bootstrap accordion components (3.34 KB, patch)
2024-02-04 22:41 UTC, David Nind
Details | Diff | Splinter Review
Bug 35877: Use template wrapper to build Bootstrap accordion components (3.34 KB, patch)
2024-03-22 16:44 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 35877: (follow-up) Correct accordion wrapper parameter name (2.93 KB, patch)
2024-03-22 16:45 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 35877: Use template wrapper to build Bootstrap accordion components (3.40 KB, patch)
2024-03-26 08:32 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 35877: (follow-up) Correct accordion wrapper parameter name (2.99 KB, patch)
2024-03-26 08:32 UTC, Julian Maurice
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2024-01-23 18:53:05 UTC
Like the conversion of Bootstrap tabs to WRAPPER-generated markup, I would like to create a set of WRAPPERs for Bootstrap accordion components, found on these pages:

- Table settings
- Notice editor
- Patrons requesting modification
Comment 1 Owen Leonard 2024-01-24 12:50:03 UTC Comment hidden (obsolete)
Comment 2 David Nind 2024-02-04 22:41:28 UTC
Created attachment 161739 [details] [review]
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>
Comment 3 Julian Maurice 2024-02-16 09:42:58 UTC
The documentation says:

[ WRAPPER accordion id="accordion container id" ]

but `id` is not used inside accordion block. `panelgroup_id` is used instead.

Bug 35880 and bug 35883 use `panelgroup_id` but bug 35882 uses `id`.

Either the doc should be fixed or the block should be fixed to match the doc.
Comment 4 Owen Leonard 2024-03-22 16:44:58 UTC
Created attachment 163719 [details] [review]
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>
Comment 5 Owen Leonard 2024-03-22 16:45:00 UTC
Created attachment 163720 [details] [review]
Bug 35877: (follow-up) Correct accordion wrapper parameter name
Comment 6 Julian Maurice 2024-03-26 08:32:51 UTC
Created attachment 163886 [details] [review]
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>
Comment 7 Julian Maurice 2024-03-26 08:32:54 UTC
Created attachment 163887 [details] [review]
Bug 35877: (follow-up) Correct accordion wrapper parameter name

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 8 Katrin Fischer 2024-03-26 10:21:59 UTC
Pushed for 24.05!

Well done everyone, thank you!