Code

Fixed printer layout
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 31 Oct 2005 07:22:02 +0000 (07:22 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 31 Oct 2005 07:22:02 +0000 (07:22 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1761 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_printerPPDDialog.inc
plugins/admin/systems/printerPPDDialog.tpl

index 6c0f3bd4e6709e5e85be0b6be22f402e18d3e66d..ed31bb2629de315194c8320a2bf2e8f1ba8ac02e 100644 (file)
@@ -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 .= "<tr><td colspan='2'><br>";
-        $str .= "<b>".$cat."&nbsp;:&nbsp;</b><br>";
+        $str .= "<tr><td colspan='2'>$feed";
+        if ($feed == ""){
+          $feed= "<br>";
+        }
+        $str .= "<b>"._("Section")." '".$cat."'&nbsp;</b><br>";
         $str .= "</tr></td>";       
 
         /* Add attributes of the current category */
index da21f72a6552ad577c33dca34b50cee0e5e509a8..34579eeaabc5a31161184e60064c8d910ad2056f 100644 (file)
@@ -1,22 +1,22 @@
+<h2><img src="images/select_printer.png" align="middle">&nbsp;{t}Printer driver{/t}</h2>
 <table summary="" width="100%">
        <tr>
-               <td width="50%">
-                       <h2><img src="images/house.png">&nbsp;{t}Printer driver information file setup{/t}</h2>
-                       {t}Current used information setup{/t} :
-                       {$ppdString}<br>
+               <td width="50%" style="vertical-align:top">
+                       {t}Model{/t}: <i>{$ppdString}</i>&nbsp;
                        <input type="submit" name="SelectPPD" value="{t}Select{/t}">
                </td>
                <td style="border-left: 1px solid rgb(160, 160, 160);padding-left:10px;">
-                       <h2><img src="images/house.png" alt="">&nbsp;{t}Upload new PPD file{/t} :</h2>
+                       {t}New driver{/t}&nbsp;
                        <input type="file" value="" name="NewPPDFile">
                        <input type="submit" name="SubmitNewPPDFile" value="{t}Upload{/t}">
                </td>
        </tr>
 </table>
+{if $showOptions eq 1}
 <p class="seperator">&nbsp;</p>
-<br>
-<h2><img src="images/house.png">&nbsp;{t}Options{/t}</h2>
+<h2><img src="images/lamp.png" align="middle">&nbsp;{t}Options{/t}</h2>
 {$properties}
+{/if}
 <p class="plugbottom">
        <input type="hidden" name="PPDDisSubmitted" value="1">
        <input type="submit" name="SavePPD" value="{t}Apply{/t}">