X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fadmin%2Ffai%2Fclass_faiManagement.inc;h=9444ed8721373b3297be1efb2cb834440f96c899;hb=e09cceb9fd2df74597f9370cb6a00fe556e1ed95;hp=7ec7329f6d149b55ede689a65a554989deb3454b;hpb=1d9578d8ee2d5a59bd4f9777785ef8567ab8cef1;p=gosa.git diff --git a/plugins/admin/fai/class_faiManagement.inc b/plugins/admin/fai/class_faiManagement.inc index 7ec7329f6..9444ed872 100644 --- a/plugins/admin/fai/class_faiManagement.inc +++ b/plugins/admin/fai/class_faiManagement.inc @@ -28,7 +28,7 @@ require "tabsPackage.inc"; class faiManagement extends plugin { /* Definitions */ - var $plHeadline = "FAI management"; + var $plHeadline = "FAI"; var $plDescription = "Fully Automatic Installation - management"; /* CLI vars */ @@ -125,9 +125,7 @@ class faiManagement extends plugin $s_action = "new_package"; }elseif(preg_match("/create_profile/i",$key)){ $s_action = "new_profile"; - }elseif(preg_match("/UseNewClass/",$key)){ - $s_action = "select_class_name_finished"; - }elseif(preg_match("/UseSelectedClass/",$key)){ + }elseif(preg_match("/edit_continue/",$key)){ $s_action = "select_class_name_finished"; }elseif(preg_match("/^entry_edit_.*/",$key)){ $s_entry = preg_replace("/^entry_edit_/","",$key); @@ -141,6 +139,11 @@ class faiManagement extends plugin } + if(isset($_GET['edit_entry'])){ + $s_entry = $_GET['edit_entry']; + $s_action = "edit"; + } + /* Confirm dialog * Delte object */ @@ -162,7 +165,7 @@ class faiManagement extends plugin /* Lock the current entry, so nobody will edit it during deletion */ add_lock ($this->dn, $this->ui->dn); - $smarty->assign("warning", sprintf(_("You're about to delete all information about the component at '%s'."), $this->dn)); + $smarty->assign("warning", sprintf(_("You're about to delete all information about the FAI class at '%s'."), $this->dn)); return($smarty->fetch(get_template_path('remove.tpl', TRUE))); } else { @@ -172,6 +175,12 @@ class faiManagement extends plugin } } + /* Delete canceled? */ + if (isset($_POST['delete_cancel'])){ + del_lock ($this->dn); + } + + /* Deltetion was confirmed, so delete this entry */ if (isset($_POST['delete_terminal_confirm'])){ @@ -192,7 +201,7 @@ class faiManagement extends plugin $this->dialog->by_object[$type[1]]->remove_from_parent (); unset ($this->dialog); - gosa_log ("System object'".$this->dn."' has been removed"); + gosa_log ("FAI class '".$this->dn."' has been removed"); $this->dialog= NULL; /* Terminal list has changed, reload it. */ @@ -341,6 +350,7 @@ class faiManagement extends plugin $display.= "

"; }elseif(!isset($this->dialog->current)){ $display.= "

\n"; + $display.= " "; $display.= "\n"; $display.= "

"; } @@ -359,28 +369,28 @@ class faiManagement extends plugin $faihead = "
 ". - "  ". + + "\"\" ". + + "  ". - "  ". + "  ". - "  ". + "  ". - "  ". + "  ". - "  ". + "  ". - "  ". - - "\"\" ". - - "  ". + "  ". "
"; @@ -393,13 +403,15 @@ class faiManagement extends plugin $divlist->SetHeader(array( array("string" => " "), - array("string" => _("FAI objects / ObjectClasses")), - array("string" => _("Object group")), - array("string" => _("Options"), "attach" => "style='border:none'" ))); + array("string" => _("Name of FAI class")), + array("string" => _("Class type")), + array("string" => _("Actions"), "attach"=>"style='border:none;width:40px;'"))); + + $action = ""; + $action .= ""; - $action = ""; - $action .= ""; + $editlink ="%NAME%"; /* Attach objects */ foreach($this->objects as $key => $value){ @@ -413,55 +425,56 @@ class faiManagement extends plugin if(!$faifilter['ShowPartitions']){ $abort = true; } - $img="PT"; + $img="PT"; $info = _("Partition table"); break; case "FAIpackageList" : if(!$faifilter['ShowPackages']){ $abort = true; } - $img="PL"; + $img="PL"; $info = _("Package list"); break; case "FAIscript" : if(!$faifilter['ShowScripts']){ $abort = true; } - $img="S"; - $info = _("Script set"); + $img="S"; + $info = _("Scripts"); break; case "FAIvariable" : if(!$faifilter['ShowVariables']){ $abort = true; } - $img="V"; - $info = _("Variable set"); + $img="V"; + $info = _("Variables"); break; case "FAIhook" : if(!$faifilter['ShowHooks']){ $abort = true; } - $img="H"; - $info = _("Hook set"); + $img="H"; + $info = _("Hooks"); break; case "FAIprofile" : if(!$faifilter['ShowProfiles']){ $abort = true; } - $img="P"; - $info = _("Profile")." (".$value['FAIclass']." )"; + $img="P"; + $info = _("Profile"); break; case "FAItemplate" : if(!$faifilter['ShowTemplates']){ $abort = true; } - $img="T"; - $info = _("Template"); + $img="T"; + $info = _("Templates"); break; default : $img="";$info = "";break; } + if(!$abort) { if((isset($value['description']))&&(!empty($value['description']))){ $desc= " [".$value['description']."]"; @@ -470,9 +483,9 @@ class faiManagement extends plugin } $field1 = array("string" => $img , "attach" => "style='height:26px;width=20px;'"); - $field2 = array("string" => $value['cn'].$desc , "attach" => ""); + $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='border-right:none;'"); + $field4 = array("string" => preg_replace("/%KEY%/",$key,$action) , "attach"=>"style='text-align:right;border:none'"); $divlist->AddEntry(array($field1,$field2,$field3,$field4)); }