From 76eb73ba45a07f67cd7f0975555b7f56688906d6 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 28 Jan 2010 08:19:17 +0000 Subject: [PATCH] Added dialog to select ogroup memebers git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15395 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../objectSelect/class_objectSelect.inc | 71 ++++++++++++ .../objectSelect/selectObject-filter.tpl | 45 ++++++++ .../objectSelect/selectObject-filter.xml | 107 ++++++++++++++++++ .../objectSelect/selectObject-list.tpl | 39 +++++++ .../objectSelect/selectObject-list.xml | 78 +++++++++++++ 5 files changed, 340 insertions(+) create mode 100644 gosa-core/plugins/admin/ogroups/objectSelect/class_objectSelect.inc create mode 100644 gosa-core/plugins/admin/ogroups/objectSelect/selectObject-filter.tpl create mode 100644 gosa-core/plugins/admin/ogroups/objectSelect/selectObject-filter.xml create mode 100644 gosa-core/plugins/admin/ogroups/objectSelect/selectObject-list.tpl create mode 100644 gosa-core/plugins/admin/ogroups/objectSelect/selectObject-list.xml diff --git a/gosa-core/plugins/admin/ogroups/objectSelect/class_objectSelect.inc b/gosa-core/plugins/admin/ogroups/objectSelect/class_objectSelect.inc new file mode 100644 index 000000000..e8e6130c2 --- /dev/null +++ b/gosa-core/plugins/admin/ogroups/objectSelect/class_objectSelect.inc @@ -0,0 +1,71 @@ +config = $config; + $this->ui = $ui; + $this->storagePoints = array( + "", + get_ou("userRDN"), + get_ou("groupRDN"), + get_ou("terminalRDN"), + get_ou("workstationRDN"), + get_ou("serverRDN"), + get_ou("printerRDN"), + get_ou("phoneRDN")); + +# // 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("selectObject-filter.xml", true, dirname(__FILE__))); + $filter->setObjectStorage($this->storagePoints); + #} + $this->setFilter($filter); + + // Build headpage + $headpage = new listing(get_template_path("selectObject-list.xml", true, dirname(__FILE__))); + $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/ogroups/objectSelect/selectObject-filter.tpl b/gosa-core/plugins/admin/ogroups/objectSelect/selectObject-filter.tpl new file mode 100644 index 000000000..860be5573 --- /dev/null +++ b/gosa-core/plugins/admin/ogroups/objectSelect/selectObject-filter.tpl @@ -0,0 +1,45 @@ +
+

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

+
+ +
+ +
+ +{$DEPARTMENT} 
+{$USER} 
+{$GROUP} 
+ +{$SERVER} 
+{$WORKSTATION} 
+{$TERMINAL} 
+ +{$PRINTER} 
+{$PHONE} 
+ +
+ {$SCOPE} + + + + + + +
+ + + {$NAME} +
+ + + + + +
+ {$APPLY} +
+
diff --git a/gosa-core/plugins/admin/ogroups/objectSelect/selectObject-filter.xml b/gosa-core/plugins/admin/ogroups/objectSelect/selectObject-filter.xml new file mode 100644 index 000000000..7e5ecf959 --- /dev/null +++ b/gosa-core/plugins/admin/ogroups/objectSelect/selectObject-filter.xml @@ -0,0 +1,107 @@ + + + + + users + + true + + + + + LDAPBlacklist + (&(| $DEPARTMENT $USER $GROUP $SERVER $WORKSTATION $TERMINAL $PRINTER $PHONE ) $NAME) + dn + objectClass + cn + sn + uid + givenName + description + + auto + + + + textfield + NAME + 20 + 60 + + + (|(cn=*$*)(sn=*$*)(givenName=*$*)) + true + + LDAPBlacklist + (&(|(objectClass=gosaDepartment)(objectClass=gosaAccount)(objectClass=posixGroup)(objectClass=goServer)(objectClass=gotoWorkstation)(objectClass=gotoTerminal)(objectClass=gotoPrinter)(objectClass=goFonHardware))(|(cn=*$NAME*)(sn=*$NAME*)(givenName=*$NAME*))) + cn + 0.5 + 3 + + + + + checkbox + USER + true + (&(objectClass=gosaAccount)(!(objectClass=gosaUserTemplate))) + + + + + checkbox + GROUP + true + + (objectClass=posixGroup) + + + + checkbox + DEPARTMENT + true + + (objectClass=gosaDepartment) + + + + checkbox + SERVER + true + + (objectClass=goServer) + + + + checkbox + WORKSTATION + true + + (objectClass=gotoWorkstation) + + + + checkbox + TERMINAL + true + + (objectClass=gotoTerminal) + + + + checkbox + PRINTER + true + + (objectClass=gotoPrinter) + + + + checkbox + PHONE + true + + (objectClass=goFonHardware) + + + diff --git a/gosa-core/plugins/admin/ogroups/objectSelect/selectObject-list.tpl b/gosa-core/plugins/admin/ogroups/objectSelect/selectObject-list.tpl new file mode 100644 index 000000000..e15cf19b6 --- /dev/null +++ b/gosa-core/plugins/admin/ogroups/objectSelect/selectObject-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/ogroups/objectSelect/selectObject-list.xml b/gosa-core/plugins/admin/ogroups/objectSelect/selectObject-list.xml new file mode 100644 index 000000000..427dc1ee7 --- /dev/null +++ b/gosa-core/plugins/admin/ogroups/objectSelect/selectObject-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 + + + +
-- 2.30.2