From: hickert Date: Wed, 27 Jan 2010 09:32:16 +0000 (+0000) Subject: Added dialog to select users and groups at once. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f23dfad131fbe4c2aa063c8dfffc13aaa69649b3;p=gosa.git Added dialog to select users and groups at once. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15352 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/admin/groups/userGroupSelect/class_userGroupSelect.inc b/gosa-core/plugins/admin/groups/userGroupSelect/class_userGroupSelect.inc new file mode 100644 index 000000000..b5761b3b6 --- /dev/null +++ b/gosa-core/plugins/admin/groups/userGroupSelect/class_userGroupSelect.inc @@ -0,0 +1,63 @@ +config = $config; + $this->ui = $ui; + $this->storagePoints = array(get_ou("userRDN"), get_ou("groupRDN")); + + // Build filter + if (session::global_is_set(get_class($this)."_filter")){ + $filter= session::global_get(get_class($this)."_filter"); + } else { + $filter = new filter(get_template_path("selectUserGroup-filter.xml", true)); + $filter->setObjectStorage($this->storagePoints); + } + $this->setFilter($filter); + + // Build headpage + $headpage = new listing(get_template_path("selectUserGroup-list.xml", true)); + $headpage->setFilter($filter); + parent::__construct($config, $ui, "object", $headpage); + } + + function save() + { + $act = $this->detectPostActions(); + $headpage = $this->getHeadpage(); + if(!isset($act['targets'])) return(array()); + $ret = array(); + foreach($act['targets'] as $dn){ + $ret[] = $headpage->getEntry($dn); + } + return($ret); + } +} +// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: +?> diff --git a/gosa-core/plugins/admin/groups/userGroupSelect/selectUserGroup-filter.tpl b/gosa-core/plugins/admin/groups/userGroupSelect/selectUserGroup-filter.tpl new file mode 100644 index 000000000..e1016c059 --- /dev/null +++ b/gosa-core/plugins/admin/groups/userGroupSelect/selectUserGroup-filter.tpl @@ -0,0 +1,37 @@ +
+

+ [F]{t}Filter{/t} +

+
+ +
+ +
+ +{$USER} 
+{$GROUP} 
+ +
+ {$SCOPE} + + + + + + +
+ + + {$NAME} +
+ + + + + +
+ {$APPLY} +
+
diff --git a/gosa-core/plugins/admin/groups/userGroupSelect/selectUserGroup-filter.xml b/gosa-core/plugins/admin/groups/userGroupSelect/selectUserGroup-filter.xml new file mode 100644 index 000000000..83ce3e583 --- /dev/null +++ b/gosa-core/plugins/admin/groups/userGroupSelect/selectUserGroup-filter.xml @@ -0,0 +1,60 @@ + + + + + users + + true + + + + + LDAP + (&(|$USER $GROUP ) $NAME) + dn + objectClass + cn + sn + uid + givenName + description + userPassword + + auto + + + + textfield + NAME + 20 + 60 + + + (|(cn=*$*)(sn=*$*)(givenName=*$*)) + true + + LDAP + (&(objectClass=gosaAccount)(|(cn=*$NAME*)(sn=*$NAME*)(givenName=*$NAME*))) + cn + 0.5 + 3 + + + + + checkbox + USER + true + (&(objectClass=gosaAccount)(!(objectClass=gosaUserTemplate))) + + + + + checkbox + GROUP + true + + (objectClass=posixGroup) + + + diff --git a/gosa-core/plugins/admin/groups/userGroupSelect/selectUserGroup-list.tpl b/gosa-core/plugins/admin/groups/userGroupSelect/selectUserGroup-list.tpl new file mode 100644 index 000000000..8d47ea430 --- /dev/null +++ b/gosa-core/plugins/admin/groups/userGroupSelect/selectUserGroup-list.tpl @@ -0,0 +1,39 @@ + + + + + + + +
+
+

 {$HEADLINE} {$SIZELIMIT}

+
+ +
+
+ + +
{$ROOT} {$BACK} {$HOME} {$RELOAD} {$SEPARATOR} {t}Base{/t} {$BASE}  {$SEPARATOR}  {$ACTIONS}
+
+
+ +
+
+ + + + {$LIST} +
+ {$FILTER} +
+ + +

 

+

+ +   + +

+ + diff --git a/gosa-core/plugins/admin/groups/userGroupSelect/selectUserGroup-list.xml b/gosa-core/plugins/admin/groups/userGroupSelect/selectUserGroup-list.xml new file mode 100644 index 000000000..9d93f813a --- /dev/null +++ b/gosa-core/plugins/admin/groups/userGroupSelect/selectUserGroup-list.xml @@ -0,0 +1,78 @@ + + + + + true + false + true + true + + users + + 1 + + + + gosaAccount + users + user + plugins/users/images/select_user.png + + + + + posixGroup + groups + group + plugins/groups/images/groups.png + + + + + + |20px;c|220px|| + + + %{filter:objectType(dn,objectClass)} + + + + %{filter:departmentLink(row,dn,description)} + 1 + + + + %{filter:objectType(dn,objectClass)} + + + + + cn + string + %{cn} + true + + + + + description + string + %{description} + true + + +
+ + + + + + + edit + entry + gosaAccount + images/lists/edit.png + + + +