-
Type: Improvement
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 6.0
-
Component/s: Layouts & Widgets
Toggleable document layout widget currently accepts a mode for switch. It should actually handle a document mode, since modes for documents are not restricted to "create" or "edit" or "view" and can gather layouts for different rendering use cases (like the drive edit screen), and still need to use "edit" or "view" mode for render.
Also, when layouts for a given document mode do not exist, a fallback on another document mode could be useful:
- retrieve layouts on document for mode "drive_edit" and render them in view/edit mode depending on the toggle state
- if layouts on document for mode "drive_edit" are empty, render the layouts for mode "edit" instead (and still render it in view/edit mode depending on the toggle state)