FIX: ensure page type filter includes all by default. Fixes #27

This commit is contained in:
Tim Klein 2012-08-05 17:49:16 +12:00 committed by Will Rossiter
parent 432ff1a1ea
commit 9e5af18b5c
1 changed files with 22 additions and 17 deletions

View File

@ -214,23 +214,28 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
}
return $filter_options;
}
public function SiteTreeFilterDateField() {
$dateField = new DateField('SiteTreeFilterDate');
// 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
// of the interface).
// $dateField->setConfig('showcalendar', true);
return $dateField->Field();
}
public function SiteTreeFilterPageTypeField() {
$types = SiteTree::page_type_classes(); array_unshift($types, 'All');
$source = array_combine($types, $types);
asort($source);
$optionsetField = new DropdownField('ClassName', 'ClassName', $source, 'Any');
return $optionsetField->Field();
}
public function SiteTreeFilterDateField() {
$dateField = new DateField('SiteTreeFilterDate');
// 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
// of the interface).
// $dateField->setConfig('showcalendar', true);
return $dateField->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() {
$classes = ClassInfo::subclassesFor( $this->stat('tree_class') );