milkyway-multimedia / ss-gridfield-utils
A collection of GridField components that you can use with any GridField, including Editable Rows and amy more
Installs: 7 190
Dependents: 4
Suggesters: 1
Security: 0
Stars: 20
Watchers: 5
Forks: 8
Open Issues: 1
Type:silverstripe-module
Requires
- php: >=5.4
- milkyway-multimedia/ss-mwm-env: ~0.3
- silverstripe/framework: ~3.1
Suggests
- milkyway-multimedia/ss-mwm-formfields: You can only use the RangeSlider with this module installed.
- silverstripe-australia/gridfieldextensions: This module is compatible and extends the components of the gridfieldextensions module.
This package is not auto-updated.
Last update: 2024-12-21 17:43:23 UTC
README
GridField Utilities are a collection of GridField components that you can use with any GridField.
Includes the following (note they all live in the namespace Milkyway\SS\GridFieldUtils):
- AddNewInlineExtended: A more complex version of GridFieldAddNewInlineButton, allowing you to set custom fields, rather than copying GridFieldEditableColumns (defaults to this behaviour)
- EditableRow: adds an expandable form to each row in the GridField, allowing you to edit records directly from the GridField.
- HasOneSelector: Allow you to select a has one relation from the current GridField
- AddExistingPicker: Works exactly like the one in gridfieldextensions, except it allows you to add more before closing the window - allowing for a faster workflow (requires silverstripe-australia/gridfieldextensions)
- MinorActionsHolder: Defines a new fragment that will holds SS UI buttons as a dropdown (not touch friendly)
- AddNewModal: Opens up the detail form in a modal window
- FormatSwitcher: Allows you to switch between different GridField formats
- RangeSlider: Filter your GridField using a slider, for a more user-friendly option for viewing lots of records
- HelpButton: Add a help button to your GridField that you can supply content for (will open a modal dialog)
- SaveAllButton: Will execute all components on the GridField that implement the GridField_SaveHandler (for use in ModelAdmin where there is no save button)
- DisplayAsTimeline: Will change the display of your GridField to a timeline (probably not be compatible with custom GridField Components, but compatible with framework GridField Components)
- GridFieldDetailForm: Works exactly the same as the standard GridFieldDetailForm, with ability to change the url segment (hence having multiple GridFieldDetailForms on the one GridField)
- GridFieldAddNewButton: An add button for the above GridFieldDetailForm
Caveats
- The DisplayAsTimeline component is very hacky at this stage, due to the lack of support for templates in GridField. It has only been tested in Google Chrome
- The SaveAllButton will be VERY slow when your objects are versioned and there are many of them
- A deep nested EditableRow will be very slow, since it has many request handlers to access, but not much I can do about this behaviour...
Additional notes
You will need to install the milkyway-multimedia/ss-mwm-formfields module to use the RangeSlider component.
Requirements
Install
Add the following to your composer.json file
"require" : {
"milkyway-multimedia/ss-gridfield-utils": "0.4"
}
Suggested Packages
Credits
- ajshort: He did most of the coding of GridFieldExtensions, which I borrowed for the more complex versions in this module
- silverstripe-australia: They now look after the GridFieldExtensions module, and have done some updates which I have probably borrowed
TODO
- Screenshots!!
- Make MinorActionsHolder touch friendly
- Get DisplayAsTimeline to work with sorting (just in case)
- Make RangeSlider work with Date Range Fields / Any Range Fields
- Test RangeSlider more
License
- MIT
Version
- Version 0.4 (Alpha)
Contact
Milkyway Multimedia
- Homepage: http://milkywaymultimedia.com.au
- E-mail: mell@milkywaymultimedia.com.au
- Twitter: @mwmdesign