From: hickert Date: Wed, 4 Nov 2009 11:03:24 +0000 (+0000) Subject: Added shortcuts X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b048a74ec3046ecf8e16388d968a7fe09e300d18;p=gosa.git Added shortcuts - git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14741 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/admin/groups/class_groupManagement.inc b/gosa-core/plugins/admin/groups/class_groupManagement.inc index 5dd9cd39a..0c3107aa2 100644 --- a/gosa-core/plugins/admin/groups/class_groupManagement.inc +++ b/gosa-core/plugins/admin/groups/class_groupManagement.inc @@ -51,6 +51,7 @@ class groupManagement extends management // Build headpage $headpage = new listing(get_template_path("group-list.xml", true)); + $headpage->registerElementFilter("filterProperties", "groupManagement::filterProperties"); $headpage->setFilter($filter); // Add copy&paste and snapshot handler. @@ -61,6 +62,85 @@ class groupManagement extends management $this->snapHandler = new SnapshotHandler($this->config); } parent::__construct($config, $ui, "groups", $headpage); + + $this->registerAction("edit_group","editEntry"); + $this->registerAction("edit_environment","editEntry"); + $this->registerAction("edit_appgroup","editEntry"); + $this->registerAction("edit_mailgroup","editEntry"); + } + + function editEntry($action="",$target=array(),$all=array(), $altTabClass ="", $altTabType = "", $altAclCategory="") + { + management::editEntry($action,$target); + + if(preg_match("/^edit_/",$action)){ + $tab = preg_replace("/^edit_/","",$action); + if(isset($this->tabObject->by_object[$tab])){ + $this->tabObject->current = $tab; + }else{ + trigger_error("Unknown tab: ".$tab); + } + } + } + + static function filterProperties($row, $classes) + { + $result= ""; + + $map = array( + "posixGroup" => + array( + "image" => "plugins/groups/images/groups.png", + "plugin" => "group", + "alt" => _("Posix"), + "title" => _("Edit posix properties") + ), + + "gosaMailAccount" => + array( + "image" => "plugins/groups/images/mail.png", + "plugin" => "mailgroup", + "alt" => _("Mail"), + "title" => _("Edit mail properties") + ), + + "sambaGroupMapping" => + array( + "image" => "plugins/groups/images/samba.png", + "plugin" => "group", + "alt" => _("Samba"), + "title" => _("Edit samba properties") + ), + + "goFonPickupGroup" => + array( + "image" => "plugins/groups/images/asterisk.png", + "plugin" => "group", + "alt" => _("Phone"), + "title" => _("Edit phone properties") + ), + + "gotoEnvironment" => + array( + "image" => "plugins/groups/images/environment.png", + "plugin" => "environment", + "alt" => _("Environment"), + "title" => _("Edit environment properties") + ) + ); + + + // Walk thru map + foreach ($map as $oc => $properties) { + if (in_array_ics($oc, $classes)) { + $result.=""; + } else { + $result.=" "; + } + } + return $result; } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: diff --git a/gosa-core/plugins/admin/groups/group-list.xml b/gosa-core/plugins/admin/groups/group-list.xml index 6591cd841..07d481a2e 100644 --- a/gosa-core/plugins/admin/groups/group-list.xml +++ b/gosa-core/plugins/admin/groups/group-list.xml @@ -22,7 +22,7 @@ - |16px||250px|170px;r| + |16px||250px|100px|170px;r| %{filter:objectType(dn,objectClass)} @@ -53,6 +53,11 @@ true + + + %{filter:filterProperties(row,objectClass)} + + %{filter:actions(dn,row,objectClass)}