Code

Added snapshot to conferences
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 14 Jun 2006 07:14:57 +0000 (07:14 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 14 Jun 2006 07:14:57 +0000 (07:14 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3810 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/gofon/conference/class_divListConferences.inc
plugins/gofon/conference/class_phoneConferenceManagment.inc

index 44d6118717f89763d8153858981c73382aba1769..6d97bd055f9c3830a5409fd869fb2e3812915ce3 100755 (executable)
@@ -82,12 +82,19 @@ class divListConference extends MultiSelectWindow
       " <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'>&nbsp;".
       " <input class='center' type='image' align='middle' src='images/list_new_conference.png' 
       title='"._("Create new conference")."' alt='"._("New conference")."' name='user_new'>&nbsp;".
-      " <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'>&nbsp;".
-      _("Base")."&nbsp;<select name='CurrentMainBase' onChange='mainform.submit()' class='center'>$options</select>".
+      " <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'>&nbsp;";
+
+    if($this->parent->snapshotEnabled()){
+      $listhead .= "  <input class='center' type='image' align='middle' src='images/restore.png'
+        title='"._("Restore snapshopts of already deleted objects")."' alt='"._("Restore")."' name='RestoreDeletedSnapShot'>".
+        " <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'>&nbsp;";
+    }
+
+    $listhead .= _("Base")."&nbsp;<select name='CurrentMainBase' onChange='mainform.submit()' class='center'>$options</select>".
       " <input class='center' type='image' src='images/list_submit.png' align='middle' 
       title='"._("Submit department")."' name='submit_department' alt='".  _("Submit").     "'>&nbsp;".
       "</div>";
-    
+
     $this->SetListHeader($listhead);
   }
 
@@ -99,20 +106,23 @@ class divListConference extends MultiSelectWindow
 
   function setEntries($list)
   {
-    $actions = "<input class='center' type='image' src='images/edit.png'     
-      alt='"._("edit")."'    name='conf_edit_%KEY%' title='"._("Edit this entry")."'>";
-    $actions.= "<input class='center' type='image' src='images/edittrash.png' 
-      alt='"._("delete")."'   name='conf_del_%KEY%'  title='"._("Delete this entry")."'>";
-    $actions2= "<input class='center' type='image' src='images/edittrash.png' 
-      alt='"._("delete")."'   name='conf_del_%KEY%'  title='"._("Delete this entry")."'>";
     $linkopen= "<a href='?plug=".$_GET['plug']."&amp;act=dep_open&amp;dep_id=%s'>%s</a>";
 
     $userimg  = "<img class='center' src='images/select_conference.png' alt='User' title='%s'>";
     $editlink = "<a href='?plug=".$_GET['plug']."&amp;id=%s&amp;act=edit_entry'>%s</a>";
   
         /* Insert conferneces*/
+
     foreach($list as $conferencekey => $conference ){
 
+      $action = $this->GetSnapShotActions($conference['dn']);
+      $actions= "<input class='center' type='image' src='images/edit.png'     
+        alt='"._("edit")."'    name='conf_edit_%KEY%' title='"._("Edit this entry")."'>";
+      $actions.= "<input class='center' type='image' src='images/edittrash.png' 
+        alt='"._("delete")."'   name='conf_del_%KEY%'  title='"._("Delete this entry")."'>";
+      $actions2= "<input class='center' type='image' src='images/edittrash.png' 
+        alt='"._("delete")."'   name='conf_del_%KEY%'  title='"._("Delete this entry")."'>";
+
       if((isset($conference['goFonPIN'][0]))&&(($this->parent->ui->dn==$conference['goFonConferenceOwner'][0])||($this->parent->acl=="#all#"))){
         $pin = "<img class='center' src='images/list_password.png' title='PIN : ".$conference['goFonPIN'][0]."' alt='PIN'>";
       }else{
@@ -147,9 +157,9 @@ class divListConference extends MultiSelectWindow
       $a_field4 = array("string"=> $pin, "attach" =>  $title." style='width:50px;'");
 
       if(($this->parent->ui->dn==$conference['goFonConferenceOwner'][0])&&(chkacl($this->parent->acl,"goFonConferenceOwner")=="")){
-        $a_field5 = array("string"=>preg_replace("/%KEY%/",$conferencekey,$actions), "attach" =>  $title."style='width:60px;border-right:0px;text-align:right;'");
+        $a_field5 = array("string"=>preg_replace("/%KEY%/",$conferencekey,$action.$actions), "attach" =>  $title."style='width:60px;border-right:0px;text-align:right;'");
       }elseif(chkacl($this->parent->acl,"goFonConferenceOwner")==""){
-        $a_field5 = array("string"=>preg_replace("/%KEY%/",$conferencekey,$actions2), "attach" =>  $title."style='width:52px;border-right:0px;text-align:right;'");
+        $a_field5 = array("string"=>preg_replace("/%KEY%/",$conferencekey,$action.$actions2), "attach" =>  $title."style='width:52px;border-right:0px;text-align:right;'");
       }else{
         $a_field5 = array("string"=>"&nbsp;", "attach" =>  $title."style='width:52px;border-right:0px;text-align:right;'");
       }
index c7902f8f26cf2f3433dd25c977b633f6a6d52da5..f2b093910e4d6ac414e582a78a267f41aa9bf4f2 100644 (file)
@@ -255,6 +255,12 @@ class phoneConferenceManagment extends plugin
       display divlist
      ***************/
 
+    /* Check if there is a snapshot dialog open */
+    if($str = $this->showSnapshotDialog($this->DivListConference->selectedBase,
+      array("ou=conferences,ou=asterisk,ou=configs,ou=systems,".$this->DivListConference->selectedBase))){
+      return($str);
+    }
+
     /* Return rendered main page */
     /* Display dialog with system list */
     $this->DivListConference->parent = $this;