summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5deb9a5)
raw | patch | inline | side by side (parent: 5deb9a5)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 22 Jun 2007 14:53:34 +0000 (14:53 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 22 Jun 2007 14:53:34 +0000 (14:53 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6668 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/personal/environment/class_selectPrinterDialog.inc | patch | blob | history | |
plugins/personal/environment/selectPrinterDialog.tpl | patch | blob | history |
diff --git a/plugins/personal/environment/class_selectPrinterDialog.inc b/plugins/personal/environment/class_selectPrinterDialog.inc
index 2f2afb95c7b9f3ad06e1ee834c63cf712075f2ca..693e3425b37837cbc4412319d9916b0be8b57435 100644 (file)
var $deplist = array("/");
var $module = array("printer");
var $ui = NULL;
+ var $subtreesearch = FALSE;
function selectPrinterDialog ($config, $dn= NULL,$alreadyused=array() )
{
}
}
+ if(isset($_POST['subtrees'])){
+ $this->subtreesearch= TRUE;
+ } else {
+ $this->subtreesearch= FALSE;
+ }
+
if((isset($_GET['search']))&&(!empty($_GET['search']))){
$this->regex=$_GET['search']."*";
$this->regex=preg_replace("/\*\*/","*",$this->regex);
$smarty->assign("gotoPrinterKeys",array_flip($this->getPrinter()));
$smarty->assign("apply", apply_filter());
$smarty->assign("alphabet", generate_alphabet());
+ $smarty->assign("subtrees", $this->subtreesearch?"checked":"");
$smarty->assign("search_image", get_template_path('images/search.png'));
$smarty->assign("tree_image", get_template_path('images/tree.png'));
$smarty->assign("infoimage", get_template_path('images/info.png'));
$module = $this->module;
$base = $this->depselect;
$attrs = array("cn","description");
- $res = get_list($filter,$module,$base,$attrs);
+ if ($this->subtreesearch){
+ $res = get_list($filter,$module,$base,$attrs, GL_SIZELIMIT, GL_SUBSEARCH);
+ } else {
+ $base= "ou=printers,ou=systems,".$base;
+ $res = get_list($filter,$module,$base,$attrs, GL_SIZELIMIT);
+ }
foreach($res as $printer) {
diff --git a/plugins/personal/environment/selectPrinterDialog.tpl b/plugins/personal/environment/selectPrinterDialog.tpl
index d30845c97f869ac30182d7a067798b071b3fb827..e58f71465fbe0b378e6c48ab165f6451f1b53408 100644 (file)
</td>
</tr>
</table>
+ <table summary="" style="width:100%;border-top:1px solid #B0B0B0;background-color:#F8F8F8">
+ <tr><td>
+ <input type=checkbox name="subtrees" value="1" {$subtrees} onClick="mainform.submit()" title="{t}Select to search within subtrees{/t}">{t}Ignore subtrees{/t}
+ </tr></td>
+ </table>
<table summary="" width="100%" style="border-top:1px solid #B0B0B0;background-color:#F8F8F8">
<tr>
<td>