mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
ENHANCEMENT SSF-53 reordering the components that added to group GridField in CMS so that it appears same as the landing view of SecurityAdmin
This commit is contained in:
parent
de75798559
commit
5548c66a49
@ -134,9 +134,9 @@ class GridFieldConfig_ManyManyEditor extends GridFieldConfig {
|
|||||||
* @param int $itemsPerPage - How many items per page should show up
|
* @param int $itemsPerPage - How many items per page should show up
|
||||||
*/
|
*/
|
||||||
public function __construct($fieldToSearch, $itemsPerPage=15) {
|
public function __construct($fieldToSearch, $itemsPerPage=15) {
|
||||||
$this->addComponent(new GridFieldFilter());
|
|
||||||
$this->addComponent(new GridFieldRelationAdd($fieldToSearch));
|
$this->addComponent(new GridFieldRelationAdd($fieldToSearch));
|
||||||
$this->addComponent(new GridFieldSortableHeader());
|
$this->addComponent(new GridFieldSortableHeader());
|
||||||
|
$this->addComponent(new GridFieldFilter());
|
||||||
$this->addComponent(new GridFieldDefaultColumns());
|
$this->addComponent(new GridFieldDefaultColumns());
|
||||||
$this->addComponent(new GridFieldAction_Edit());
|
$this->addComponent(new GridFieldAction_Edit());
|
||||||
$this->addComponent(new GridFieldRelationDelete());
|
$this->addComponent(new GridFieldRelationDelete());
|
||||||
|
@ -61,8 +61,13 @@ class Group extends DataObject {
|
|||||||
public function getCMSFields() {
|
public function getCMSFields() {
|
||||||
Requirements::javascript(SAPPHIRE_DIR . '/javascript/PermissionCheckboxSetField.js');
|
Requirements::javascript(SAPPHIRE_DIR . '/javascript/PermissionCheckboxSetField.js');
|
||||||
|
|
||||||
$config = new GridFieldConfig_ManyManyEditor('FirstName', 20);
|
$config = new GridFieldConfig();
|
||||||
$config->addComponents(new GridFieldExporter(), new GridFieldTitle());
|
$config->addComponent(new GridFieldTitle());
|
||||||
|
$configs = new GridFieldConfig_ManyManyEditor('FirstName', 20);
|
||||||
|
$components = $configs->getComponents();
|
||||||
|
foreach($components as $component) $config->addComponent($component);
|
||||||
|
$config->addComponents(new GridFieldExporter());
|
||||||
|
|
||||||
$config->getComponentByType('GridFieldRelationAdd')
|
$config->getComponentByType('GridFieldRelationAdd')
|
||||||
->setResultsFormat('$Title ($Email)')->setSearchFields(array('FirstName', 'Surname', 'Email'));
|
->setResultsFormat('$Title ($Email)')->setSearchFields(array('FirstName', 'Surname', 'Email'));
|
||||||
$memberList = new GridField('Members','Members', $this->Members(), $config);
|
$memberList = new GridField('Members','Members', $this->Members(), $config);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user