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
Created attachment 161328 [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.
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>
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.
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>
Created attachment 163720 [details] [review] Bug 35877: (follow-up) Correct accordion wrapper parameter name
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>
Created attachment 163887 [details] [review] Bug 35877: (follow-up) Correct accordion wrapper parameter name Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Pushed for 24.05! Well done everyone, thank you!
Enhancement not backported