From ab954f8554651a9656b2854671204ecf6aa50402 Mon Sep 17 00:00:00 2001 From: cajus Date: Mon, 31 Oct 2005 07:22:02 +0000 Subject: [PATCH] Fixed printer layout git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1761 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_printerPPDDialog.inc | 16 +++++++++++++--- plugins/admin/systems/printerPPDDialog.tpl | 14 +++++++------- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/plugins/admin/systems/class_printerPPDDialog.inc b/plugins/admin/systems/class_printerPPDDialog.inc index 6c0f3bd4e..ed31bb262 100644 --- a/plugins/admin/systems/class_printerPPDDialog.inc +++ b/plugins/admin/systems/class_printerPPDDialog.inc @@ -178,7 +178,13 @@ class printerPPDDialog extends plugin /* Give smarty the information it needs */ $smarty->assign("ppdString" ,$this->getPPDInformation()); - $smarty->assign("properties",$this->generateProperties()); + $tmp= $this->generateProperties(); + if ($tmp == ""){ + $smarty->assign("showOptions", 0); + } else { + $smarty->assign("showOptions", 1); + $smarty->assign("properties",$this->generateProperties()); + } /* Print out template */ $display.= $smarty->fetch(get_template_path('printerPPDDialog.tpl', TRUE,dirname(__FILE__))); @@ -240,6 +246,7 @@ class printerPPDDialog extends plugin /* Set Headline */ $str = ""; + $feed= ""; /* If ppd exists and is readable */ if((!empty($this->selectedPPD['link']))&&(file_exists($this->selectedPPD['link']))){ @@ -256,8 +263,11 @@ class printerPPDDialog extends plugin foreach($this->ppdConfig as $cat => $obj){ /* Add new category */ - $str .= "
"; - $str .= "".$cat." : 
"; + $str .= "$feed"; + if ($feed == ""){ + $feed= "
"; + } + $str .= ""._("Section")." '".$cat."' 
"; $str .= ""; /* Add attributes of the current category */ diff --git a/plugins/admin/systems/printerPPDDialog.tpl b/plugins/admin/systems/printerPPDDialog.tpl index da21f72a6..34579eeaa 100644 --- a/plugins/admin/systems/printerPPDDialog.tpl +++ b/plugins/admin/systems/printerPPDDialog.tpl @@ -1,22 +1,22 @@ +

 {t}Printer driver{/t}

-
-

 {t}Printer driver information file setup{/t}

- {t}Current used information setup{/t} : - {$ppdString}
+
+ {t}Model{/t}: {$ppdString}  -

 {t}Upload new PPD file{/t} :

+ {t}New driver{/t} 
+{if $showOptions eq 1}

 

-
-

 {t}Options{/t}

+

 {t}Options{/t}

{$properties} +{/if}

-- 2.30.2