mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 06:05:56 +00:00
FIX: ensure page type filter includes all by default. Fixes #27
This commit is contained in:
parent
432ff1a1ea
commit
9e5af18b5c
@ -214,23 +214,28 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
|||||||
}
|
}
|
||||||
return $filter_options;
|
return $filter_options;
|
||||||
}
|
}
|
||||||
public function SiteTreeFilterDateField() {
|
|
||||||
$dateField = new DateField('SiteTreeFilterDate');
|
|
||||||
|
|
||||||
// TODO Enabling this means we load jQuery UI by default in the CMS,
|
public function SiteTreeFilterDateField() {
|
||||||
// which is a pretty big performance hit in 2.4 (where the library isn't used for other parts
|
$dateField = new DateField('SiteTreeFilterDate');
|
||||||
// of the interface).
|
|
||||||
// $dateField->setConfig('showcalendar', true);
|
|
||||||
|
|
||||||
return $dateField->Field();
|
// TODO Enabling this means we load jQuery UI by default in the CMS,
|
||||||
}
|
// which is a pretty big performance hit in 2.4 (where the library isn't used for other parts
|
||||||
public function SiteTreeFilterPageTypeField() {
|
// of the interface).
|
||||||
$types = SiteTree::page_type_classes(); array_unshift($types, 'All');
|
// $dateField->setConfig('showcalendar', true);
|
||||||
$source = array_combine($types, $types);
|
|
||||||
asort($source);
|
return $dateField->Field();
|
||||||
$optionsetField = new DropdownField('ClassName', 'ClassName', $source, 'Any');
|
}
|
||||||
return $optionsetField->Field();
|
|
||||||
}
|
public function SiteTreeFilterPageTypeField() {
|
||||||
|
$types = SiteTree::page_type_classes();
|
||||||
|
array_unshift($types, 'Any');
|
||||||
|
|
||||||
|
$source = array_combine($types, $types);
|
||||||
|
asort($source);
|
||||||
|
$optionsetField = new DropdownField('ClassName', 'ClassName', $source, 'Any');
|
||||||
|
|
||||||
|
return $optionsetField->Field();
|
||||||
|
}
|
||||||
|
|
||||||
public function generateDataTreeHints() {
|
public function generateDataTreeHints() {
|
||||||
$classes = ClassInfo::subclassesFor( $this->stat('tree_class') );
|
$classes = ClassInfo::subclassesFor( $this->stat('tree_class') );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user