summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9bb4006)
raw | patch | inline | side by side (parent: 9bb4006)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 28 Sep 2010 12:49:20 +0000 (12:49 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 28 Sep 2010 12:49:20 +0000 (12:49 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19833 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/goto/admin/systems/goto/Config/class_DeviceConfig.inc b/gosa-plugins/goto/admin/systems/goto/Config/class_DeviceConfig.inc
index 2f14d4e8bd693cb19090513d056afacb4127d63f..41b38e42de3b7e84e8f9c74d7ad1447ec9ec1d05 100644 (file)
private $base ;
+
/*! \brief Constructs the device configuration plugin
* @param Config The GOsa configuration object.
*/
$this->itemContainerSelector = new releaseSelector(array('cn=root'=>''), 'cn=root', 'cn=root');
$this->base = "cn=root";
- $this->navigationList= new sortableListing();
- $this->navigationList->setDeleteable(true);
- $this->navigationList->setEditable(true);
- $this->navigationList->setColspecs(array('*'));
- $this->navigationList->setWidth("100%");
- $this->navigationList->setHeight("140px");
- $this->navigationList->setAcl("rwcdm");
- $this->navigationList->sortingEnabled(FALSE);
-
// CREATE Dummy entry
$str = file_get_contents('/home/hickert/json.txt');
$items = json_decode($str, TRUE);
$this->setCurrentItem('root');
$this->addItem('PuppetModule','test1',
array(
- 'dependency' => '',
+ 'dependency' => array('stulle','Wurst'),
'version' => '2.4-f',
'name' => 'Thundebird',
'description' => 'Mozilla mail client')
);
$this->addItem('PuppetModule','test2',
array(
- 'dependency' => '',
+ 'dependency' => array('Leipnitz','Dose'),
'version' => 1,
'name' => 'Firefox',
'description' => 'Test Module')
$this->rebuildListing();
}
+
+ function editEntry($action="",$target=array(),$all=array(), $altTabClass ="", $altTabType = "", $altAclCategory="")
+ {
+ $this->setCurrentItem($target[0]);
+ }
+
/*! \brief Overridden render method of class mangement.
* this allows us to add a release selection box.
*/
function renderList()
{
+ $tpl = $this->TemplateEngine->render();
session::set('DEVICE_ITEMS', $this->currentItemValues);
$this->rebuildListing();
$filter = $this->getFilter();
$smarty = get_smarty();
$smarty->assign("RELEASE", $this->itemContainerSelector->render());
$display = $headpage->render();
- return($this->getHeader().$display);
+ return($tpl.$this->getHeader().$display);
}
// Generate item list
$list = $this->getItemList();
- $this->navigationList->setListData($list['data'],$list['lData']);
- $this->navigationList->update();
- $smarty->assign('navigationList',$this->navigationList->render());
// Assign current item info
$smarty->assign('containerName', $this->currentItemDescriptor['name']);
}
}
- // Another item selected?
- $this->navigationList->save_object();
- $action = $this->navigationList->getAction();
- if($action['action'] == 'edit'){
- $item = $this->navigationList->getData($action['targets'][0]);
- $this->setCurrentItem($item['name']);
- }
-
+ // Get selected Items
$this->itemContainerSelector->update();
$this->base = $this->itemContainerSelector->getBase();
+ $list = preg_split("/[,]*cn=/", $this->base,0,PREG_SPLIT_NO_EMPTY);
+ $this->setCurrentItem($list[0]);
}
/*! \brief Forward plugin acls
diff --git a/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateEngine.inc b/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateEngine.inc
index fac61cbdec24b1ab0f424fcace04cc2b29f01eb9..8ae4650a2d49999de66d77f50ee0b903d66cd611 100644 (file)
}
}
+
+ function execute(){
+ return($this->render());
+ }
+
/*! \brief Creates the HTML content for the given list of widgets
* @return String The HTML content.
diff --git a/gosa-plugins/goto/admin/systems/goto/Config/class_filterDeviceItems.inc b/gosa-plugins/goto/admin/systems/goto/Config/class_filterDeviceItems.inc
index 44aded3a360ef520220cc054f4e7ebd264d65bcc..a27342365b540c909a73e8a3fcee5abccabab31e 100644 (file)
$entry[] = 'description';
$entry['objectClass'] = array('FAKE_OC_DeviceItem','count' => 1);
$entry[] = 'objectClass';
- $entry['count'] = 4;
+ $entry['count'] = 3;
$ret[] = $entry;
}