From 2a8b3c942e09b2a3ea7a43912014a89ed5ff2c44 Mon Sep 17 00:00:00 2001 From: cajus Date: Tue, 27 Oct 2009 14:14:56 +0000 Subject: [PATCH] Re-added action filter git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14655 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/users/class_userManagement.inc | 52 +++++++++++++++++++ gosa-core/plugins/admin/users/user-filter.tpl | 8 +++ gosa-core/plugins/admin/users/user-filter.xml | 40 ++++++++++++++ gosa-core/plugins/admin/users/user-list.xml | 7 ++- 4 files changed, 106 insertions(+), 1 deletion(-) diff --git a/gosa-core/plugins/admin/users/class_userManagement.inc b/gosa-core/plugins/admin/users/class_userManagement.inc index 173b75460..c46da475b 100644 --- a/gosa-core/plugins/admin/users/class_userManagement.inc +++ b/gosa-core/plugins/admin/users/class_userManagement.inc @@ -57,6 +57,7 @@ class userManagement extends management $headpage = new listing(get_template_path("user-list.xml", true)); $headpage->registerElementFilter("lockLabel", "userManagement::filterLockLabel"); $headpage->registerElementFilter("lockImage", "userManagement::filterLockImage"); + $headpage->registerElementFilter("filterProperties", "userManagement::filterProperties"); $headpage->setFilter($filter); // Add copy&paste and snapshot handler. @@ -676,6 +677,57 @@ class userManagement extends management } return $label; } + + + static function filterProperties($row, $classes) + { + $result= ""; + $map= array( "gosaAccount" => array( "image" => "plugins/users/images/select_user.png", + "plugin" => "user", + "alt" => _("Generic"), + "title" => _("Edit generic properties")), + "posixAccount" => array("image" => "images/penguin.png", + "plugin" => "posixAccount", + "alt" => _("POSIX"), + "title" => _("Edit POSIX properties")), + "gosaMailAccount" => array("image" => "images/mailto.png", + "alt" => _("Mail"), + "plugin" => "mailAccount", + "title" => _("Edit mail properties")), + "sambaSamAccount" => array("image" => "plugins/systems/images/select_winstation.png", + "plugin" => "sambaAccount", + "alt" => _("Samba"), + "title" => _("Edit samba properties")), + "apple-user" => array("image" => "plugins/netatalk/images/select_netatalk.png", + "plugin" => "sambaAccount", + "alt" => _("Netatalk"), + "title" => _("Edit netatalk properties")), + "gotoEnvironment" => array("image" => "plugins/users/images/small_environment.png", + "plugin" => "gotoEnvironment", + "alt" => _("Environment"), + "title" => _("Edit environment properties")), + "goFaxAccount" => array("image" => "plugins/users/images/fax_small.png", + "plugin" => "goFaxAccount", + "alt" => _("FAX"), + "title" => _("Edit FAX properties")), + "goFonAccount" => array("image" => "plugins/gofon/images/select_phone.png", + "plugin" => "goFonAccount", + "alt" => _("Phone"), + "title" => _("Edit phone 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/users/user-filter.tpl b/gosa-core/plugins/admin/users/user-filter.tpl index 417b7bf2e..948b8e6f0 100644 --- a/gosa-core/plugins/admin/users/user-filter.tpl +++ b/gosa-core/plugins/admin/users/user-filter.tpl @@ -5,6 +5,14 @@
+
+ +{$TEMPLATES} 
+{$FUNCTIONAL} 
+{$POSIX} 
+{$MAIL} 
+{$SAMBA} 
+
{$SCOPE} diff --git a/gosa-core/plugins/admin/users/user-filter.xml b/gosa-core/plugins/admin/users/user-filter.xml index 0fb3fe8d9..5b009f672 100644 --- a/gosa-core/plugins/admin/users/user-filter.xml +++ b/gosa-core/plugins/admin/users/user-filter.xml @@ -38,4 +38,44 @@ + + checkbox + TEMPLATES + false + (!(objectClass=gosaUserTemplate)) + + + + + checkbox + FUNCTIONAL + true + + (objectClass=gosaAccount) + + + + checkbox + POSIX + true + + (objectClass=posixAccount) + + + + checkbox + MAIL + true + + (objectClass=gosaMailAccount) + + + + checkbox + SAMBA + true + + (objectClass=sambaSamAccount) + + diff --git a/gosa-core/plugins/admin/users/user-list.xml b/gosa-core/plugins/admin/users/user-list.xml index d0b8efc33..39be2da31 100644 --- a/gosa-core/plugins/admin/users/user-list.xml +++ b/gosa-core/plugins/admin/users/user-list.xml @@ -30,7 +30,7 @@ - |20px||200px|150px|180px;r| + |20px||120px|120px|150px|170px;r| %{filter:objectType(dn,objectClass)} @@ -69,6 +69,11 @@ true + + + %{filter:filterProperties(row,objectClass)} + + %{filter:actions(dn,row,objectClass)} -- 2.30.2