Code

Readded direct edit link to fai management
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 3 Dec 2008 11:00:35 +0000 (11:00 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 3 Dec 2008 11:00:35 +0000 (11:00 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13141 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/fai/admin/fai/class_divListFai.inc
gosa-plugins/fai/admin/fai/class_faiManagement.inc

index 742a20285e4533caea2d1a764dba11334afe7806..ccdd458124fe3d75a080e1ccf5c8473501e444b6 100644 (file)
@@ -202,6 +202,7 @@ class divListFai extends MultiSelectWindow
       Variable init
      ********************/
 
+    $edit_link = "<a href=\"?plug=".$_GET['plug']."&amp;id=%s&amp;act=edit\">%s</a>";
     $objects = array(
         "FAIpartitionTable"  => array("IMG"=> "plugins/fai/images/fai_partitionTable.png", 
           "NAME"=>_("Partition table"),"KZL"=> "PT", "VAR"=>"ShowPartitions"),
@@ -286,7 +287,7 @@ class divListFai extends MultiSelectWindow
           "string" => $checkbox ,
           "attach" => "style='width:20px;'");
       $field2 = array(
-          "string" => $name,
+          "string" => sprintf($edit_link,$key,$name),
           "attach" => "style=''");
       $field3 = array(
           "string" => $icon_list ,
index f9a8758612307d4beafbf128c89c2c61f242bc4f..013ee765745a44e7459974e4754ba927f7e4595d 100644 (file)
@@ -151,18 +151,15 @@ class faiManagement extends plugin
           break;
         }
       }
-                       if(preg_match("/^edit_[0-9]*_.*$/",$name)){
-        $i_entryID  = preg_replace("/^edit_([0-9]*)_.*$/i","\\1",$name);
-        $s_entryType= preg_replace("/^edit_[0-9]*_([^_]*)_.*$/i","\\1",$name);
-        $s_action = "edit";
-        break;
-      }elseif(preg_match("/^entry_delete_.*/",$name)){
-        $s_entry = preg_replace("/^entry_delete_/","",$name);
-        $s_entry = preg_replace("/_.*$/","",$s_entry);
-        $s_action = "delete";
-        break;
+    }
+
+    if(isset($_GET['act']) && $_GET['act'] == "edit" && isset($_GET['id'])){
+      if(isset($this->objects[$_GET['id']])){
+        $s_action = "group_edit";
+        $s_entry = $_GET['id'];
       }
     }
+
     foreach(array("freeze_branch" => "freeze_branch",
           "branch_branch" => "branch_branch",
           "remove_branch" => "remove_branch") as $from => $to){
@@ -404,7 +401,7 @@ class faiManagement extends plugin
       Edit entry 
      ****************/
 
-               if(($s_action == "edit") || $this->dialog instanceOf faiGroupHandle && $this->dialog->get_mode() == "edit"){
+               if($this->dialog instanceOf faiGroupHandle && $this->dialog->get_mode() == "edit"){
 
       $entry = array();
       if($this->dialog instanceOf faiGroupHandle){