X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fadmin%2Ffai%2Fclass_faiManagement.inc;h=55e8499b1ef067f51692e48c21cb6685af0ca6ba;hb=8e89e901eb67f63011a49553de75353330a3871e;hp=1bb4fdc72085494d789db6f63ecf8b9558374ce8;hpb=377eca50fe55f81b3109ab95b7df3332c3e21c4f;p=gosa.git
diff --git a/plugins/admin/fai/class_faiManagement.inc b/plugins/admin/fai/class_faiManagement.inc
index 1bb4fdc72..55e8499b1 100644
--- a/plugins/admin/fai/class_faiManagement.inc
+++ b/plugins/admin/fai/class_faiManagement.inc
@@ -25,7 +25,6 @@ require "tabsScript.inc";
require "tabsProfile.inc";
require "tabsPackage.inc";
-
class faiManagement extends plugin
{
/* Definitions */
@@ -84,6 +83,10 @@ class faiManagement extends plugin
function execute()
{
+
+ /* Call parent execute */
+ plugin::execute();
+
$display = "";
$smarty = get_smarty();
$s_action = "";
@@ -259,6 +262,7 @@ class faiManagement extends plugin
$a_setup = ($this->get_type($entry));
$this->dn = $entry['dn'];
+ add_lock ($this->dn, $this->ui->dn);
$this->dialog= new $a_setup[0]($this->config,
$this->config->data['TABS'][$a_setup[2]],$this->dn);
@@ -332,6 +336,11 @@ class faiManagement extends plugin
$faifilter['regex']=$_GET['search']."*";
}
+ /* Department select */
+ if((isset($_POST['base']))&&($s_action=="")){
+ $faifilter['base']=$_POST['base'];
+ }
+
/* remove double asterisks and save new filter */
$faifilter['regex'] = preg_replace("/\*\*/","*",$faifilter['regex']);
$_SESSION['faifilter']= $faifilter;
@@ -344,6 +353,7 @@ class faiManagement extends plugin
$this->dialog=NULL;
$this->is_dialog = false;
unset($_SESSION['objectinfo']);
+ del_lock ($this->dn);
}
/* This check if the given tab could be saved
@@ -357,6 +367,7 @@ class faiManagement extends plugin
print_red($msg);
}
}else{
+ del_lock ($this->dn);
$this->dialog->save();
unset($this->dialog);
$this->dialog=NULL;
@@ -378,14 +389,14 @@ class faiManagement extends plugin
}elseif(((isset($this->dialog->current))&&(!$this->dialog->by_object[$this->dialog->current]->is_dialog))){
$display.= "
\n";
- $display.= "\n";
+ $display.= "\n";
$display.= " \n";
- $display.= "\n";
+ $display.= "\n";
$display.= "
";
}elseif(!isset($this->dialog->current)){
$display.= "\n";
- $display.= " ";
- $display.= "\n";
+ $display.= " ";
+ $display.= "\n";
$display.= "
";
}
return($display);
@@ -401,7 +412,7 @@ class faiManagement extends plugin
$options= "";
foreach ($this->config->idepartments as $key => $value){
if ($faifilter['base'] == $key){
- $options.= "";
+ $options.= "";
} else {
$options.= "";
}
@@ -413,44 +424,44 @@ class faiManagement extends plugin
$faihead =
"";
@@ -458,20 +469,20 @@ class faiManagement extends plugin
/* Create list with objects */
$divlist = new divlist("faiManagement");
- $divlist->SetEntriesPerPage(20);
+ $divlist->SetEntriesPerPage(0);
$divlist->SetSummary(_("This table displays all systems, in the selected tree."));
$divlist->SetHeader(array(
- array("string" => " "),
- array("string" => _("Name of FAI class")),
- array("string" => _("Class type")),
- array("string" => _("Actions"), "attach"=>"style='border-right:none;width:40px;'")));
+ array("string" => " ", "attach" => "style='text-align:center;width:20px;'"),
+ array("string" => _("Name of FAI class"), "attach" => "style=''"),
+ array("string" => _("Class type"), "attach" => "style='width:200px;'"),
+ array("string" => _("Actions"), "attach" => "style='width:60px;border-right:0px;text-align:right;'")));
- $action = "";
- $action .= "";
+ $action = "";
+ $action .= "";
- $editlink ="%NAME%";
+ $editlink ="%NAME%";
$linkopen = "%s";
foreach($this->departments as $key => $val) {
@@ -489,10 +500,10 @@ class faiManagement extends plugin
$title = $this->config->departments[$key];
- $field0 = array("string" => "", "attach"=>"style='width:20px;'");
- $field1 = array("string" => sprintf($linkopen,base64_encode($key),$val), "attach" => "title='".$title."'");
- $field2 = array("string" => "");
- $field3 = array("string" => "","attach"=>"style='text-align:right;border-right:none;'");
+ $field0 = array("string" => "", "attach" => "style='text-align:center;width:20px;'");
+ $field1 = array("string" => sprintf($linkopen,base64_encode($key),$val), "attach" => "style='' title='".$title."'");
+ $field2 = array("string" => " ", "attach" => "style='width:200px;'");
+ $field3 = array("string" => " ", "attach" => "style='width:60px;border-right:0px;text-align:right;'");
$divlist->AddEntry( array($field0,$field1,$field2,$field3));
@@ -511,53 +522,53 @@ class faiManagement extends plugin
if(!$faifilter['ShowPartitions']){
$abort = true;
}
- $img="";
+ $img="";
$info = _("Partition table");
break;
case "FAIpackageList" :
if(!$faifilter['ShowPackages']){
$abort = true;
}
- $img="";
+ $img="";
$info = _("Package list");
break;
case "FAIscript" :
if(!$faifilter['ShowScripts']){
$abort = true;
}
- $img="";
+ $img="";
$info = _("Scripts");
break;
case "FAIvariable" :
if(!$faifilter['ShowVariables']){
$abort = true;
}
- $img="";
+ $img="";
$info = _("Variables");
break;
case "FAIhook" :
if(!$faifilter['ShowHooks']){
$abort = true;
}
- $img="";
+ $img="";
$info = _("Hooks");
break;
case "FAIprofile" :
if(!$faifilter['ShowProfiles']){
$abort = true;
}
- $img="";
+ $img="";
$info = _("Profile");
break;
case "FAItemplate" :
if(!$faifilter['ShowTemplates']){
$abort = true;
}
- $img="";
+ $img="";
$info = _("Templates");
break;
default :
- $img="";$info = "";break;
+ $img="";$info = "";break;
}
@@ -568,10 +579,10 @@ class faiManagement extends plugin
$desc= "";
}
- $field1 = array("string" => $img , "attach" => "style='height:26px;width=20px;'");
- $field2 = array("string" => preg_replace(array("/%KEY%/","/%NAME%/"),array($key,$value['cn'].$desc),$editlink) , "attach" => "");
- $field3 = array("string" => $info, "attach" => "");
- $field4 = array("string" => preg_replace("/%KEY%/",$key,$action) , "attach"=>"style='text-align:right;border:none'");
+ $field1 = array("string" => $img , "attach" => "style='text-align:center;width:20px;'");
+ $field2 = array("string" => preg_replace(array("/%KEY%/","/%NAME%/"),array($key,$value['cn'].$desc),$editlink) , "attach" => "style=''");
+ $field3 = array("string" => $info, "attach" => "style='width:200px;'");
+ $field4 = array("string" => preg_replace("/%KEY%/",$key,$action) , "attach" => "style='width:60px;border-right:0px;text-align:right;'");
$divlist->AddEntry(array($field1,$field2,$field3,$field4));
}
@@ -594,6 +605,7 @@ class faiManagement extends plugin
$smarty->assign("alphabet" , generate_alphabet());
$smarty->assign("apply" , apply_filter());
$smarty->assign("search_image" , get_template_path('images/search.png'));
+ $smarty->assign("hint", print_sizelimit_warning());
$display = $smarty->fetch(get_template_path('headpage.tpl', TRUE, dirname(__FILE__)));
return ($display);
@@ -634,10 +646,10 @@ class faiManagement extends plugin
}
ksort($tmp);
foreach($tmp as $value){
- if($value["description"][0]!=".."){
+ if(isset($value["description"][0])){
$this->departments[$value['dn']]=convert_department_dn2($value['dn'])." - [".$value["description"][0]."]";
}else{
- $this->departments[$value['dn']]=$value["description"][0];
+ $this->departments[$value['dn']]=convert_department_dn2($value['dn']);//$value["description"][0];
}
}