developers:plugin_listswitch

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
developers:plugin_listswitch [2021/04/10 21:52]
pdsci-admin
developers:plugin_listswitch [2021/04/10 22:02] (current)
pdsci-admin [List Switch: How to manage Backend Lists a little more convenient]
Line 21: Line 21:
 **Standard switch (before)** **Standard switch (before)**
 <sxh> <sxh>
 +columns: 
 +    id: 
 +        label: ID 
 +        type: number 
 +        sortable: true 
 +    title: 
 +        label: Title 
 +        type: text 
 +        searchable: true 
 +        sortable: true 
 +    visible: 
 +        label: Visible 
 +        type: switch
 </sxh> </sxh>
  
 **List Switch Plugin (after)** **List Switch Plugin (after)**
 <sxh> <sxh>
 +columns:
 +    id:
 +        label: ID
 +        type: number
 +        sortable: true
 +    title:
 +        label: Title
 +        type: text
 +        searchable: true
 +        sortable: true
 +    visible:
 +        label: Visible
 +        type: inetis-list-switch
 +        icon: true
 +</sxh>
  
 +The //icon: true// setting shows a hooklet for //on// and a 'x' for //off//. With //icon: false// the text //yes// or //no// is displayed by default.\\
 +
 +If neither a hooklet/x or yes/no fits the requirements, an alternative text can be displayed using:\\
 +<sxh>
 +columns:
 +    id:
 +        label: ID
 +        type: number
 +        sortable: true
 +    title:
 +        label: Title
 +        type: text
 +        searchable: true
 +        sortable: true
 +    visible:
 +        label: Visible
 +        type: inetis-list-switch
 +        icon: false
 +        textTrue: 'visible'     # instead of 'yes'
 +        textFalse: 'invisible'  # instead of 'no'
 </sxh> </sxh>