Code

All Lists are now scrollable.
[gosa.git] / plugins / gofon / macro / class_gofonMacroManagement.inc
index 5c64bb4bde0e5ac12fa68ca53dd0ba4a21523502..b0a3713fbb06281b2c659433873b41859df1fe57 100755 (executable)
@@ -47,6 +47,9 @@ class gofonMacro extends plugin
 
   function execute()
   {
+       /* Call parent execute */
+       plugin::execute();
+
     /* Save data */
     $macrofilter= get_global("macrofilter");
     foreach( array("depselect", "regex") as $type){
@@ -334,18 +337,18 @@ class gofonMacro extends plugin
 
     /* Options */
     $action= "<input type='image' src='images/edit.png' alt='"._("edit")."'     name='user_edit_%KEY%' title='"._("Edit user")."'>";
-    $action.= "<input type='image' src='images/editdelete.png' alt='"._("delete")."'   name='user_del_%KEY%' title='"._("Delete user")."'>";
+    $action.= "<input type='image' src='images/edittrash.png' alt='"._("delete")."'   name='user_del_%KEY%' title='"._("Delete user")."'>";
 
     $divlist = new divlist("macrotabs");
     $divlist->SetHeader(array(
-                              array("string" => "&nbsp;"),
-                              array("string" => _("Username")." / "._("Department")),
-                              array("string" => _("Visible"), "attach" => "style='width:30px;'"),
-                              array("string" => _("Actions"), "attach" => "style='border:none'" )));
+                              array("string" => "&nbsp;", "attach" => "style='text-align:center;width:20px;'"),
+                              array("string" => _("Username")." / "._("Department"), "attach" => "style=''"),
+                              array("string" => _("Visible"), "attach" => "style='width:50px;'"),
+                              array("string" => _("Actions"), "attach" => "style='width:52px;border-right:0px;text-align:right;'" )));
 
 
     $divlist->SetSummary(_("This table displays all phone macros, in the selected tree."));
-    $divlist->SetEntriesPerPage(20);
+    $divlist->SetEntriesPerPage(0);
 
     // Defining Links
     $linkopen = "<a href='?plug=".$_GET['plug']."&amp;act=dep_open&amp;dep_id=%s'>%s</a>";
@@ -364,10 +367,10 @@ class gofonMacro extends plugin
         }
       }
 
-      $field1 = array("string" => "<img src='images/".$non_empty."folder.png' alt='department'>");
-      $field2 = array("string" => sprintf($linkopen,base64_encode($key),$val));
-      $field3 = array("string" => "&nbsp;");
-      $field4 = array("string" => "&nbsp;", "attach" => "style='border:none'");
+      $field1 = array("string" => "<img src='images/".$non_empty."folder.png' alt='department'>", "attach" => "style='text-align:center;width:20px;'");
+      $field2 = array("string" => sprintf($linkopen,base64_encode($key),$val), "attach" => "style=''");
+      $field3 = array("string" => "&nbsp;", "attach" => "style='width:50px;'");
+      $field4 = array("string" => "&nbsp;", "attach" => "style='width:52px;border-right:0px;text-align:right;'");
       $divlist->AddEntry(array($field1,$field2,$field3,$field4));
     }
 
@@ -394,10 +397,10 @@ class gofonMacro extends plugin
         $pic1 = $invisible;
       }
 
-      $field1 = array("string" => sprintf($macroimg,$val['dn']),"attach"=>"style='width:20px;align:middle;'");
-      $field2 = array("string" => sprintf($editlink,$key,$display),"attach"=>"title='".$val['dn']."'");
-      $field3 = array("string" => $pic1, "attach" => "style='width:20px;text-align:right;'");
-      $field4 = array("string" => preg_replace("/%KEY%/", "$key", $action),"attach" => "style='border:none;text-align:right;width:48px'");
+      $field1 = array("string" => sprintf($macroimg,$val['dn']), "attach" => "style='text-align:center;width:20px;'");
+      $field2 = array("string" => sprintf($editlink,$key,$display), "attach" => "style='' title='".$val['dn']."'");
+      $field3 = array("string" => $pic1, "attach" => "style='width:50px;'");
+      $field4 = array("string" => preg_replace("/%KEY%/", "$key", $action), "attach" => "style='width:52px;border-right:0px;text-align:right;'");
 
       $divlist->AddEntry(array($field1,$field2,$field3,$field4));
     }
@@ -439,7 +442,7 @@ class gofonMacro extends plugin
     }
 
     /* Generate macro list */
-    $res= get_list($this->ui->subtreeACL, "(&(cn=$regex)(objectClass=goFonMacro))", TRUE, $base, array("*"), TRUE);
+    $res= get_list($this->ui->subtreeACL, "(&(cn=$regex)(objectClass=goFonMacro))", FALSE, "ou=macros,ou=asterisk,ou=configs,ou=systems,".$base, array("*"), TRUE);
     $this->macros= $res;
 
     /* NEW LIST MANAGMENT