From 1af8c25b6c5a7af579dca19681341c4d14a7c0da Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 27 Jan 2010 11:06:35 +0000 Subject: [PATCH] Added printer selection dialog git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15364 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../printerSelect/class_printerSelect.inc | 64 +++++++++++++++++++ .../printerSelect/selectPrinter-filter.tpl | 33 ++++++++++ .../printerSelect/selectPrinter-filter.xml | 40 ++++++++++++ .../printerSelect/selectPrinter-list.tpl | 39 +++++++++++ .../printerSelect/selectPrinter-list.xml | 63 ++++++++++++++++++ 5 files changed, 239 insertions(+) create mode 100644 gosa-plugins/goto/personal/environment/printerSelect/class_printerSelect.inc create mode 100644 gosa-plugins/goto/personal/environment/printerSelect/selectPrinter-filter.tpl create mode 100644 gosa-plugins/goto/personal/environment/printerSelect/selectPrinter-filter.xml create mode 100644 gosa-plugins/goto/personal/environment/printerSelect/selectPrinter-list.tpl create mode 100644 gosa-plugins/goto/personal/environment/printerSelect/selectPrinter-list.xml diff --git a/gosa-plugins/goto/personal/environment/printerSelect/class_printerSelect.inc b/gosa-plugins/goto/personal/environment/printerSelect/class_printerSelect.inc new file mode 100644 index 000000000..54d3ab212 --- /dev/null +++ b/gosa-plugins/goto/personal/environment/printerSelect/class_printerSelect.inc @@ -0,0 +1,64 @@ +config = $config; + $this->ui = $ui; + + $this->storagePoints = array(get_ou("printerRDN")); + +# // 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("selectPrinter-filter.xml", true, dirname(__FILE__))); + $filter->setObjectStorage($this->storagePoints); +# } + $this->setFilter($filter); + + // Build headpage + $headpage = new listing(get_template_path("selectPrinter-list.xml", true, dirname(__FILE__))); + $headpage->setFilter($filter); + parent::__construct($config, $ui, "printer", $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/goto/personal/environment/printerSelect/selectPrinter-filter.tpl b/gosa-plugins/goto/personal/environment/printerSelect/selectPrinter-filter.tpl new file mode 100644 index 000000000..ba7af5cde --- /dev/null +++ b/gosa-plugins/goto/personal/environment/printerSelect/selectPrinter-filter.tpl @@ -0,0 +1,33 @@ +
+

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

+
+ +
+ +
+ + {$SCOPE} + + + + + + +
+ + + {$NAME} +
+ + + + + +
+ {$APPLY} +
+
diff --git a/gosa-plugins/goto/personal/environment/printerSelect/selectPrinter-filter.xml b/gosa-plugins/goto/personal/environment/printerSelect/selectPrinter-filter.xml new file mode 100644 index 000000000..d08e9b495 --- /dev/null +++ b/gosa-plugins/goto/personal/environment/printerSelect/selectPrinter-filter.xml @@ -0,0 +1,40 @@ + + + + + printer + + true + + + + + LDAPBlacklist + (&(objectClass=gotoPrinter)$NAME) + dn + objectClass + cn + description + + auto + + + + textfield + NAME + 20 + 60 + + + (|(cn=*$*)(description=*$*)) + true + + LDAPBlacklist + (&(objectClass=gotoPrinter)(|(cn=*$NAME*)(description=*$NAME*))) + cn + 0.5 + 3 + + + + diff --git a/gosa-plugins/goto/personal/environment/printerSelect/selectPrinter-list.tpl b/gosa-plugins/goto/personal/environment/printerSelect/selectPrinter-list.tpl new file mode 100644 index 000000000..d7c0faba5 --- /dev/null +++ b/gosa-plugins/goto/personal/environment/printerSelect/selectPrinter-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-plugins/goto/personal/environment/printerSelect/selectPrinter-list.xml b/gosa-plugins/goto/personal/environment/printerSelect/selectPrinter-list.xml new file mode 100644 index 000000000..d2cfc78bc --- /dev/null +++ b/gosa-plugins/goto/personal/environment/printerSelect/selectPrinter-list.xml @@ -0,0 +1,63 @@ + + + + + true + false + true + true + + + 1 + + + + gotoPrinter + printer + printGeneric + plugins/systems/images/select_printer.png + + + + + + |20px;c||| + + + %{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