summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 228c213)
raw | patch | inline | side by side (parent: 228c213)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 29 Apr 2010 14:54:57 +0000 (14:54 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 29 Apr 2010 14:54:57 +0000 (14:54 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17973 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/systems/admin/systems/class_systemManagement.inc | patch | blob | history | |
gosa-plugins/systems/admin/systems/system-list.xml | patch | blob | history |
diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc
index 5130a1c28e65868b7629aa53d0bf5ef71e1bbf29..94f8a7bc48479dd711d60a945beee6e430d9bc1a 100644 (file)
// Build headpage
$headpage = new listing(get_template_path("system-list.xml", true));
$headpage->registerElementFilter("systemRelease", "systemManagement::systemRelease");
+ $headpage->registerElementFilter("filterSystemDescription", "systemManagement::filterSystemDescription");
$headpage->setFilter($filter);
$filter->setConverter('systemManagement::incomingFilterConverter');
}
+ static function filterSystemDescription($row,$dn,$pid,$description=array())
+ {
+ $result= " ";
+
+ $row= func_get_arg(0);
+ $dn= LDAP::fix(func_get_arg(1));
+ $params= array(func_get_arg(2));
+
+ // Collect sprintf params
+ for ($i = 3;$i < func_num_args();$i++) {
+ $val= func_get_arg($i);
+ if (is_array($val)){
+ $params[]= $val[0];
+ continue;
+ }
+ $params[]= $val;
+ }
+
+ $result= " ";
+ $trans= call_user_func_array("sprintf", $params);
+ if ($trans != "") {
+ return("<a href='?plug=".$_GET['plug']."&PID=$pid&act=listing_edit_$row' title='$dn'>$trans</a>");
+ }
+
+ return $result;
+ }
+
static function systemRelease($a,$b,$c,$objectclasses= null,$class= null)
{
global $config;
diff --git a/gosa-plugins/systems/admin/systems/system-list.xml b/gosa-plugins/systems/admin/systems/system-list.xml
index b9c68c856c5d7c0446057ef852a6ddad6a27b330..754f5a1f2240d1d160d5cd0b7bfd60375eaa3e58 100644 (file)
<label>Description</label>
<sortAttribute>description</sortAttribute>
<sortType>string</sortType>
- <value>%{filter:link(row,dn,"%s",description)}</value>
+ <value>%{filter:filterSystemDescription(row,dn,pid,description)}</value>
<export>true</export>
</column>