inetis.listswitch
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.5 KiB

12 months ago
  1. # About
  2. OctoberCMS plugin to add a toggleable switch as a column type to the backend.
  3. ## Usage
  4. To add a switch column to a list; set the `type` of the column to `inetis-list-switch`.
  5. Example:
  6. ```yaml
  7. your_column:
  8. label: 'Your Label'
  9. # Define the type as "inetis-list-switch" to enable this functionality
  10. type: inetis-list-switch
  11. # Whether to use ✓/✗ icons to replace the Yes/No text (default: true)
  12. icon: true
  13. # Overrides the title displayed on hover over the column
  14. titleTrue: 'Unpublish item' # (default: 'inetis.listswitch::lang.inetis.listswitch.title_true')
  15. titleFalse: 'Publish item' # (default: 'inetis.listswitch::lang.inetis.listswitch.title_false')
  16. # Overrides the text displayed on the button
  17. textTrue: 'Published' # (default: 'inetis.listswitch::lang.inetis.listswitch.text_true')
  18. textFalse: 'Unpublished' #(default: 'inetis.listswitch::lang.inetis.listswitch.text_false')
  19. ```
  20. ## Demo
  21. *Default behavior*
  22. ![switch-icon](https://cloud.githubusercontent.com/assets/12028540/23846134/2e0245c8-07cc-11e7-82a6-c5c0c940b453.gif)
  23. *Behavior with ` icon: false`*
  24. ![switch-text](https://cloud.githubusercontent.com/assets/12028540/23846200/a88ac8c4-07cc-11e7-89fd-ccb61a701b82.gif)
  25. *With custom titles*
  26. ![switch-icon-custom-titles](https://cloud.githubusercontent.com/assets/12028540/23846367/69e1f89e-07cd-11e7-9f8b-943aa9301464.gif)
  27. ## Author
  28. inetis is a webdesign agency in Vufflens-la-Ville, Switzerland. We love coding and creating powerful apps and sites [see our website](https://inetis.ch).