https://github.com/silverstripe-droptables/silverstripe-cms/tree/side-by-side
https://github.com/silverstripe-droptables/sapphire/tree/side-by-side
SiteTree::getCMSActions() used to include a flat list of FormActions. Now it has two fields:
* A CompositeField for popular actions - this keeps the buttons visually joined together, it looks something like: [ Save | Publish ]
* A TabSet MoreOptionsTabSet, with a Tab, MoreOptions. Each tab creates a new drop-up menu.
Modules that push buttons onto the end of getCMSActions() will show them to the right of the "More options" list.
Users
---
Mateusz, I have a few thoughts:
* The use-case for adding more than 1 drop-up menu seems a little contrived, but I suppose it might be useful. If we are going to keep it in there, I'd suggest that we make it look a little nicer than it does right now, and I think that the field name MoreOptionsTabSet.MoreOptions should be changed. Perhaps ActionMenus.MoreOptions?
* It would be nicer if the MoreOptions menu was always on the end of the list of fields. You could do this by having MoreOptions added outside of getCMSActions() - for example by combining the results of getCMSActions() and getCMSMenuActions() in the form generation. That, however, would lock down the API. We'd need to decide if locking down the API at that level was appropriate.
--To view this discussion on the web visit https://groups.google.com/d/msg/silverstripe-dev/-/8-e2tcMJPA4J.
You received this message because you are subscribed to the Google Groups "SilverStripe Core Development" group.
To post to this group, send email to silverst...@googlegroups.com.
To unsubscribe from this group, send email to silverstripe-d...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/silverstripe-dev?hl=en.
--
You received this message because you are subscribed to the Google Groups "SilverStripe Core Development" group.
To view this discussion on the web visit https://groups.google.com/d/msg/silverstripe-dev/-/4KAc1awcgaAJ.
$className = $this->owner->stat('tree_class');
// Plumbing to get the ID of the currently edited record.
$SQL_id = Convert::raw2sql($data['ID']);
if(substr($SQL_id,0,3) != 'new') {
$record = DataObject::get_by_id($className, $SQL_id);
if($record && !$record->canEdit()) return Security::permissionFailure($this);
if(!$record || !$record->ID) throw new SS_HTTPResponse_Exception("Bad record ID #$SQL_id", 404);
} else {
throw new SS_HTTPResponse_Exception("Cannot cleanup a new record.", 404);
}
--
You received this message because you are subscribed to the Google Groups "SilverStripe Core Development" group.
To view this discussion on the web visit https://groups.google.com/d/msg/silverstripe-dev/-/n31P-YEWnn0J.
Great ideaWhat sort of a variable is the callbackt? Might be good to make that really clear to make it easier to use it.
--
You received this message because you are subscribed to the Google Groups "SilverStripe Core Development" group.
I guess you could allow both types (either a PHP callable type or a class of FormActionHandler)? We don't really have a philosophical position re: python's "only one way to do anything" versus ruby's "heaps of ways, pick the one that's most fluent".
I guess you could allow both types (either a PHP callable type or a class of FormActionHandler)? We don't really have a philosophical position re: python's "only one way to do anything" versus ruby's "heaps of ways, pick the one that's most fluent".Callable is an interface that FormActionHandler should implement. is_callable() returns true on the object, then.
I think in the other thread you mentioned the issue of setting callbacks from the model layer, but my take on things is that there's form controls being produced by model layer code which is why that's an issue.
On Thu, Nov 22, 2012 at 12:02 PM, Sam Minnée <s...@silverstripe.com> wrote:
I guess you could allow both types (either a PHP callable type or a class of FormActionHandler)? We don't really have a philosophical position re: python's "only one way to do anything" versus ruby's "heaps of ways, pick the one that's most fluent".Callable is an interface that FormActionHandler should implement. is_callable() returns true on the object, then.
I don't mind setting callbacks in the model, I just don't like the handling the callback in the model - that's clearly controller code.