summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d96048d)
raw | patch | inline | side by side (parent: d96048d)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 26 Jan 2010 07:45:36 +0000 (07:45 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 26 Jan 2010 07:45:36 +0000 (07:45 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15294 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/fai/admin/systems/services/repository/class_filterServRepository.inc b/gosa-plugins/fai/admin/systems/services/repository/class_filterServRepository.inc
index eea87f104980d3f720ba8eb8a3efc842dc52bc66..b68f398397e17f94f6b5ffa2f1e7997fbf370c0e 100644 (file)
{
$list = servrepository::getRepositoryList();
+ // Convert plugin data into useable format for list.
$data = array();
foreach($list as $key => $entry){
$entry['objectClass'] = array('FAKE_OC_FaiRepository');
if(!count($entry['Sections'])){
$entry['Sections'][] = '';
}
-
foreach($entry as $name => $value){
$item[] = $name;
if(!is_array($value)) $value=array($value);
$value= array_values($value);
$value['count'] = count($value);
$item[$name] = $value;
-
-
}
$data[] = $item;
}
diff --git a/gosa-plugins/fai/admin/systems/services/repository/class_repositoryManagement.inc b/gosa-plugins/fai/admin/systems/services/repository/class_repositoryManagement.inc
index 37baa4de4d96e514d0bd10c25e6b677571df388d..762389cde4489d78e74059fdc12b6a8ffb35f7b6 100644 (file)
class repositoryManagement extends management
{
-
+
protected $skipFooter = TRUE;
protected $skipHeader = TRUE;
protected $parent = NULL;
$this->storagePoints = array();
// Build filter
-# if (session::global_is_set(get_class($this)."_filter")){
-# $filter= session::global_get(get_class($this)."_filter");
-# } else {
+ if (session::global_is_set(get_class($this)."_filter")){
+ $filter= session::global_get(get_class($this)."_filter");
+ } else {
$filter = new filter(get_template_path("services/repository/repository-filter.xml", true));
$filter->setObjectStorage($this->storagePoints);
- # }
+ }
$this->setFilter($filter);
// Build headpage
$this->registerAction('new', 'forwardToParent');
}
+
+ /*! \brief Forwards list action to the parent management class
+ */
function forwardToParent($action, $target, $all)
{
if(!empty($action)){
}
}
+
+ /*! \brief Makes section array printable for the overview list.
+ */
static function filterSections($a,$b)
{
- if(!$b) return('');
+ if(!$b) return(' ');
return(implode($b,', '));
}
}
diff --git a/gosa-plugins/fai/admin/systems/services/repository/class_servRepository.inc b/gosa-plugins/fai/admin/systems/services/repository/class_servRepository.inc
index 6797e103e86eb677ae4c8724f39c787e0b148521..f06598c46ba714536da52fafe94a77938933039e 100644 (file)
var $view_logged = FALSE;
var $fai_activated = FALSE;
- var $divlist = NULL;
+ var $repositoryMangement = NULL;
function servrepository (&$config, $dn= NULL, $parent= NULL)
{
$this->DisplayName = _("Repository service");
+ /* Create repositoryMangement */
+ $this->repositoryMangement = new repositoryManagement($this->config,$this);
+
/* Skip this if fai is deactivated */
$tmp= $this->config->search("faiManagement", "CLASS",array('menu','tabs'));
- if(!empty($tmp)){
+ if(0 && !empty($tmp)){
$this->fai_activated = TRUE;
}else{
return;
}
}
session::set('RepositoryList', $this->repositories);
-
- /* Create divlist */
- $this->divlist = new repositoryManagement($this->config,$this);
}
+ /*! \brief Act on events frowarded by the repositoryManagement
+ */
function newEntry()
{
if(!$this->dialog){
}
+ /*! \brief Act on events frowarded by the repositoryManagement
+ */
function removeEntry($action,$target,$all)
{
foreach($target as $value){
}
+ /*! \brief Act on events frowarded by the repositoryManagement
+ */
function editEntry($action,$target,$all)
{
if(count($target) == 1 && !$this->dialog){
/* Call parent execute */
plugin::execute();
- $this->divlist->handleActions($this->divlist->detectPostActions());
+ $smarty= get_smarty();
+ $this->repositoryMangement->handleActions($this->repositoryMangement->detectPostActions());
if($this->is_account && !$this->view_logged){
$this->view_logged = TRUE;
if(!$this->fai_activated){
$str = "<h2>"._("You can't use this plugin until FAI is activated.")."</h2>";
- return $str;
+ $display = $smarty->fetch(get_template_path('servRepository.tpl', TRUE,dirname(__FILE__)));
+ return($str.$display);
}
/* Fill templating stuff */
- $smarty= get_smarty();
$smarty->assign("is_createable",$this->acl_is_createable());
$display= "";
}
session::set('RepositoryList', $this->repositories);
- $str = $this->divlist->execute();
+ $str = $this->repositoryMangement->execute();
$display.= $smarty->fetch(get_template_path('servRepository.tpl', TRUE,dirname(__FILE__)));
return($str.$display);
}