MINOR add 'print button' to Member list and data list of ModelAdmin

This commit is contained in:
Normann Lou 2012-04-04 10:35:41 +12:00
parent 63b23a2155
commit 2f3949ac6e
2 changed files with 2 additions and 0 deletions

View File

@ -124,6 +124,7 @@ abstract class ModelAdmin extends LeftAndMain {
$fieldConfig = GridFieldConfig_RecordEditor::create($this->stat('page_length'))
->addComponent($exportButton)
->removeComponentsByType('GridFieldFilterHeader')
->addComponents(new GridFieldPrintButton())
);
// Validation

View File

@ -97,6 +97,7 @@ class Group extends DataObject {
if($this->ID) {
$config = new GridFieldConfig_RelationEditor();
$config->addComponents(new GridFieldExportButton());
$config->addComponents(new GridFieldPrintButton());
$config->getComponentByType('GridFieldAddExistingAutocompleter')
->setResultsFormat('$Title ($Email)')->setSearchFields(array('FirstName', 'Surname', 'Email'));
$config->getComponentByType('GridFieldDetailForm')->setValidator(new Member_Validator());