summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 90ddde1)
raw | patch | inline | side by side (parent: 90ddde1)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 26 Jan 2010 06:55:18 +0000 (06:55 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 26 Jan 2010 06:55:18 +0000 (06:55 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15293 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 fb2155a9ce81e7caa6661f05b8dfb6402d337325..eea87f104980d3f720ba8eb8a3efc842dc52bc66 100644 (file)
$entry['objectClass'] = array('FAKE_OC_FaiRepository');
$item = array('count' => count($entry));
$item['dn'] = $key;
+
+ if(!count($entry['Sections'])){
+ $entry['Sections'][] = '';
+ }
+
foreach($entry as $name => $value){
$item[] = $name;
if(!is_array($value)) $value=array($value);
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 21392ba52023b469b464a656698e619fc779b57f..37baa4de4d96e514d0bd10c25e6b677571df388d 100644 (file)
// Build headpage
$headpage = new listing(get_template_path("services/repository/repository-list.xml", true));
+ $headpage->registerElementFilter("filterSections", "repositoryManagement::filterSections");
$headpage->setFilter($filter);
parent::__construct($config, $this->ui, "repositories", $headpage);
$this->parent->$tmp($action,$target,$all);
}
}
+
+ static function filterSections($a,$b)
+ {
+ if(!$b) return('');
+ return(implode($b,', '));
+ }
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
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 3664f499865c34d013d45e2f90133f5aad97341e..6797e103e86eb677ae4c8724f39c787e0b148521 100644 (file)
$delete = "<img src='images/empty.png' alt=' '>";
}
+ session::set('RepositoryList', $this->repositories);
$str = $this->divlist->execute();
$display.= $smarty->fetch(get_template_path('servRepository.tpl', TRUE,dirname(__FILE__)));
return($str.$display);
diff --git a/gosa-plugins/fai/admin/systems/services/repository/repository-list.xml b/gosa-plugins/fai/admin/systems/services/repository/repository-list.xml
index d1d950b0a6c9230835620252e015d7fc3cd185df..2ada7abff5fee31eccd41a2f9127b2c8959f9968 100644 (file)
<label>Service</label>
<objectClass>FAKE_OC_FaiRepository</objectClass>
<category>server</category>
- <class>Repository</class>
+ <class>servrepository</class>
<image>images/lits/new.png</image>
</objectType>
<label>Sections</label>
<sortAttribute>Sections</sortAttribute>
<sortType>string</sortType>
- <value>%{filter:link(row,dn,"%s",Sections)}</value>
+ <value>%{filter:filterSections(row,Sections)}</value>
<export>true</export>
</column>