From: hickert Date: Wed, 22 Aug 2007 07:57:19 +0000 (+0000) Subject: Added edit link to overview list of gotomasses X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f50a22cd66620e41f2e22cb09f7f1078bd67ce64;p=gosa.git Added edit link to overview list of gotomasses git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7097 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/addons/gotomasses/class_gotomasses.inc b/plugins/addons/gotomasses/class_gotomasses.inc index e9fb357c8..44a5db138 100644 --- a/plugins/addons/gotomasses/class_gotomasses.inc +++ b/plugins/addons/gotomasses/class_gotomasses.inc @@ -50,6 +50,12 @@ class gotomasses extends plugin } } + /* Edit posted from list link */ + if(isset($_GET['act']) && $_GET['act'] == "edit" && isset($_GET['id']) && isset($this->tasks[$_GET['id']])){ + $s_action = "edit"; + $s_entry = $_GET['id']; + } + /************ * List posts ************/ @@ -79,6 +85,7 @@ class gotomasses extends plugin unset($this->tasks[$id]); } } + $this->save(); } /* Remove entry from list */ @@ -203,6 +210,9 @@ class gotomasses extends plugin $divlist->AddHeader(array("string"=>_("Action"), "attach"=>"style='border-right:0px;width:40px;'")); + /* Create edit link */ + $edit_link = "
%str%
"; + if(!empty($acls)){ foreach($this->tasks as $key => $task){ $action = ""; @@ -213,7 +223,7 @@ class gotomasses extends plugin $field0 = array("string" => "" , "attach" => "style='width:20px;'"); - $field1 = array("string" => "
".$this->target_to_string($task)."
"); + $field1 = array("string" => preg_replace(array("/%key%/","/%str%/"),array($key,$this->target_to_string($task)),$edit_link)); $field2 = array("string" => $this->time_to_string($task),"attach" => "style='width:100px;'"); $field3 = array("string" => $this->action_to_string($task),"attach" => "style='width:80px;'"); $field4 = array("string" => $action,"attach" => "style='text-align:right;width:40px;border-right:0px;'");