summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 51bed53)
raw | patch | inline | side by side (parent: 51bed53)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 26 Jul 2010 08:13:20 +0000 (08:13 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 26 Jul 2010 08:13:20 +0000 (08:13 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19098 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 d6518ad9aef543c6ac83f54534b0643f4c81eba2..d49555a2a2d0790ebf5efd6d9ae8e7fea9c4f2a4 100644 (file)
$headpage = new listing(get_template_path("system-list.xml", true));
$headpage->registerElementFilter("systemRelease", "systemManagement::systemRelease");
$headpage->registerElementFilter("filterSystemDescription", "systemManagement::filterSystemDescription");
+ $headpage->registerElementFilter("filterLink", "systemManagement::filterLink");
$headpage->setFilter($filter);
$filter->setConverter('systemManagement::incomingFilterConverter');
static function filterSystemDescription($row,$dn,$pid,$state,$description=array())
{
$dn= LDAP::fix(func_get_arg(1));
- $desc = isset($description[0])?$description[0]:"";
+ $desc = isset($description[0])?set_post($description[0]):"";
+
$rc = "";
switch($state){
case 'locked' : $rc = "<rowClass:entry-locked/><rowLabel:locked/>"; break;
case 'busy' : $rc = "<rowClass:entry-busy/><rowLabel:busy/>"; break;
case 'warning' : $rc = "<rowClass:entry-warning/><rowLabel:warning/>"; break;
}
- return("<a href='?plug=".$_GET['plug']."&PID={$pid}&act=listing_edit_{$row}' title='{$dn}'>".set_post($desc)."</a>{$rc}");
+ return("<a href='?plug=".$_GET['plug']."&PID={$pid}&act=listing_edit_{$row}' title='{$dn}'>".$desc."</a>{$rc}");
}
+
+ static function filterLink()
+ {
+ $result= " ";
+ $row= func_get_arg(0);
+ $pid= func_get_arg(4);
+ $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 e719021e7280769617f9ff7f7553f388493a3f12..146537b70858a09b27016f7f537546a9d4784776 100644 (file)
<label>Name</label>
<sortAttribute>cn</sortAttribute>
<sortType>string</sortType>
- <value>%{filter:link(row,dn,"%s",cn)}</value>
+ <value>%{filter:filterLink(row,dn,"%s",cn,pid)}</value>
<export>true</export>
</column>