2007-08-18 13:38:11 +02:00
|
|
|
<?php
|
2008-11-24 04:22:01 +01:00
|
|
|
/**
|
|
|
|
* Admin interface to manage and create {@link Subsite} instances.
|
|
|
|
*
|
|
|
|
* @package subsites
|
|
|
|
*/
|
2010-03-01 03:53:00 +01:00
|
|
|
class SubsiteAdmin extends ModelAdmin {
|
2007-08-18 13:38:11 +02:00
|
|
|
|
2012-03-25 18:35:01 +02:00
|
|
|
static $managed_models = array('Subsite', 'Subsite_Template');
|
2008-11-02 23:23:01 +01:00
|
|
|
static $url_segment = 'subsites';
|
|
|
|
|
2010-03-01 22:40:55 +01:00
|
|
|
static $menu_title = "Subsites";
|
2012-07-10 15:43:53 +02:00
|
|
|
|
|
|
|
public $showImportForm=false;
|
2010-03-01 22:40:55 +01:00
|
|
|
|
2012-04-25 14:29:32 +02:00
|
|
|
public function getEditForm($id = null, $fields = null) {
|
|
|
|
$form = parent::getEditForm($id, $fields);
|
2009-11-02 04:00:18 +01:00
|
|
|
|
2012-07-10 15:43:53 +02:00
|
|
|
if($this->modelClass=='Subsite') {
|
|
|
|
$grid=$form->Fields()->dataFieldByName('Subsite');
|
|
|
|
if($grid) {
|
2012-07-18 02:21:35 +02:00
|
|
|
$grid->getConfig()->removeComponentsByType('GridFieldDetailForm');
|
|
|
|
$grid->getConfig()->addComponent(new GridFieldSubsiteDetailForm());
|
2012-07-10 15:43:53 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-03-01 03:53:00 +01:00
|
|
|
return $form;
|
2007-08-18 13:38:11 +02:00
|
|
|
}
|
|
|
|
}
|