From 3d21c49481938ae6ff095237fd7b2c87a840ad9a Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 27 Jan 2010 10:01:20 +0000 Subject: [PATCH] Added system selection dialog git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15358 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../systemSelect/class_systemSelect.inc | 63 +++++++++++++++ .../systemSelect/selectSystem-filter.tpl | 38 +++++++++ .../systemSelect/selectSystem-filter.xml | 64 +++++++++++++++ .../systemSelect/selectSystem-list.tpl | 38 +++++++++ .../systemSelect/selectSystem-list.xml | 79 +++++++++++++++++++ 5 files changed, 282 insertions(+) create mode 100644 gosa-plugins/systems/admin/systems/systemSelect/class_systemSelect.inc create mode 100644 gosa-plugins/systems/admin/systems/systemSelect/selectSystem-filter.tpl create mode 100644 gosa-plugins/systems/admin/systems/systemSelect/selectSystem-filter.xml create mode 100644 gosa-plugins/systems/admin/systems/systemSelect/selectSystem-list.tpl create mode 100644 gosa-plugins/systems/admin/systems/systemSelect/selectSystem-list.xml diff --git a/gosa-plugins/systems/admin/systems/systemSelect/class_systemSelect.inc b/gosa-plugins/systems/admin/systems/systemSelect/class_systemSelect.inc new file mode 100644 index 000000000..7295dcb22 --- /dev/null +++ b/gosa-plugins/systems/admin/systems/systemSelect/class_systemSelect.inc @@ -0,0 +1,63 @@ +config = $config; + $this->ui = $ui; + $this->storagePoints = array(get_ou("serverRDN"), get_ou("workstationRDN"), get_ou('terminalRDN')); + +# // 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("selectSystem-filter.xml", true, dirname(__FILE__))); + $filter->setObjectStorage($this->storagePoints); +# } + $this->setFilter($filter); + + // Build headpage + $headpage = new listing(get_template_path("selectSystem-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-plugins/systems/admin/systems/systemSelect/selectSystem-filter.tpl b/gosa-plugins/systems/admin/systems/systemSelect/selectSystem-filter.tpl new file mode 100644 index 000000000..2f09c5868 --- /dev/null +++ b/gosa-plugins/systems/admin/systems/systemSelect/selectSystem-filter.tpl @@ -0,0 +1,38 @@ +
+

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

+
+ +
+ +
+ + {$SERVER} 
+ {$WORKSTATION} 
+ {$TERMINAL} 
+ +
+ {$SCOPE} + + + + + + +
+ + + {$NAME} +
+ + + + + +
+ {$APPLY} +
+
diff --git a/gosa-plugins/systems/admin/systems/systemSelect/selectSystem-filter.xml b/gosa-plugins/systems/admin/systems/systemSelect/selectSystem-filter.xml new file mode 100644 index 000000000..96c1340d4 --- /dev/null +++ b/gosa-plugins/systems/admin/systems/systemSelect/selectSystem-filter.xml @@ -0,0 +1,64 @@ + + + + + server + + true + + + + + LDAPBlacklist + (&(|$SERVER $WORKSTATION $TERMINAL ) $NAME) + dn + objectClass + cn + description + + auto + + + + textfield + NAME + 20 + 60 + + + (cn=*$*) + true + + LDAPBlacklist + (cn=*$NAME*) + cn + 0.5 + 3 + + + + + checkbox + SERVER + true + (objectClass=goServer) + + + + + checkbox + WORKSTATION + true + + (objectClass=gotoWorkstation) + + + + checkbox + TERMINAL + true + + (objectClass=gotoTerminal) + + + diff --git a/gosa-plugins/systems/admin/systems/systemSelect/selectSystem-list.tpl b/gosa-plugins/systems/admin/systems/systemSelect/selectSystem-list.tpl new file mode 100644 index 000000000..6f246af7c --- /dev/null +++ b/gosa-plugins/systems/admin/systems/systemSelect/selectSystem-list.tpl @@ -0,0 +1,38 @@ + + + + + + + +
+
+

 {$HEADLINE} {$SIZELIMIT}

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

 

+

+ +   + +

diff --git a/gosa-plugins/systems/admin/systems/systemSelect/selectSystem-list.xml b/gosa-plugins/systems/admin/systems/systemSelect/selectSystem-list.xml new file mode 100644 index 000000000..6a2fccabd --- /dev/null +++ b/gosa-plugins/systems/admin/systems/systemSelect/selectSystem-list.xml @@ -0,0 +1,79 @@ + + + + + true + false + true + true + + server + + 1 + + + + goServer + server + servgeneric + plugins/systems/images/select_server.png + + + + + gotoWorkstation + workstation + workgeneric + plugins/systems/images/select_workstation.png + + + + + gotoTerminal + terminal + termgeneric + plugins/systems/images/select_terminal.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 + + +
+ + + + + + +
-- 2.30.2