Open ebruchez opened 6 years ago
Clarifying that the folders would take their name from the top-level sections of the library form.
As a nice-to-have, it would be good to be able to collapse/expand the folders in the toolbox.
So how would this work?
We need to make a distinction between library forms for which top-level sections are section templates, and for which top-level sections are "folders". So some kind of metadata is needed in the form definition to indicate that, unless all libraries have folders. But even so, something must indicate the type, as libraries can be published in the database using an older version of Orbeon Forms. So let's assume that there is something in the library (form) metadata indicating folder support.
When you enable that:
Right now, we use the XBL format to create the two levels, and split into "Global Library" (or whatever title is in orbeon/library
) and "Section Templates" (or whatever title is in $app/library
). Now we would either add another level, or just skip the title level. That might be the easier as a first step.
When editing a library form, the following option will be present:
When enabled, the option will change the way Form Builder imports the library form. Instead of top-level sections being considered section templates, they are considered folders, and nested sections are considered section templates.
A library form might look like this:
In the toolbox of the form using the library, top-level folders will appear with collapsible arrows and with grouping corresponding to the top-level section names in the library form.
With lots of section templates, it is hard to find a specific section template. The idea would be to provide a feature to group them.
The obvious way to do this would be to use top-level sections as "folders", and nested sections as section templates. But right now, top-level sections each create a section template. We could imagine an option in the form definition to explicitly change that. Then
form-to-xbl.xsl
would pick subsections. They would be grouped in differentxbl:xbl
elements based on the top-level "section" they belong to.+1 from customer