From ce2215bfd43512b02b7e5180bfe62a6d7dbda2ec Mon Sep 17 00:00:00 2001
From: hickert \n";
- $display.= "\n";
- $display.= " \n";
- if ($this->dn != "new"){
- $display.= "\n";
+ if(isset($this->grouptab->by_object)){
+ if (!$this->grouptab->by_object[$this->grouptab->current]->dialog){
+ $display.= " \n";
+ $display.= "\n";
$display.= " \n";
+ if ($this->dn != "new"){
+ $display.= "\n";
+ $display.= " \n";
+ }
+ $display.= "\n";
+ $display.= "
";
+ }
+ }
+ return($str);
+ }
+
+
function GenHeader()
{
/* Prepare departments,
@@ -94,13 +114,21 @@ class divListGroup extends MultiSelectWindow
" ".
" ".
" ".
- "
".
- " ".
+ "
";
+
+
+ if($this->parent->snapshotEnabled()){
+ $listhead .= " ".
+ "
";
+ }
+
+ $listhead.=" ".
$Copy_Paste.
"
".
_("Base")." ".
- " ".
+ " ".
"";
$this->SetListHeader($listhead);
@@ -138,25 +166,26 @@ class divListGroup extends MultiSelectWindow
// Space
$empty = "
";
- /* Create action icons - copy & paste icons */
- $actions = "";
- if($this->parent->CopyPasteHandler){
- $actions.= " ";
- $actions.= " ";
- }
- $actions.= "";
- $actions.= "";
-
// User and Template Images
$editlink = "%s";
// Test Every Entry and generate divlist Array
foreach($groups as $key => $val){
+
+ /* Create action icons - copy & paste icons */
+ $actions = $this->GetSnapShotActions($val['dn']);
+ if($this->parent->CopyPasteHandler){
+ $actions.= " ";
+ $actions.= " ";
+ }
+ $actions.= "";
+ $actions.= "";
+
$posix=$mail=$samba=$appl=$phone=$enviro=$empty;
@@ -185,7 +214,7 @@ class divListGroup extends MultiSelectWindow
$field1 = array("string" => sprintf($userimg,$val['dn']), "attach" => "style='text-align:center;width:20px;'");
$field2 = array("string" => sprintf($editlink,$key,($val['cn']['0'].$desc)), "attach" => "style='' ".$title);
$field3 = array("string" => preg_replace("/%KEY%/", $key, $posix." ".$enviro." ".$mail." ".$samba." ".$appl." ".$phone), "attach" => "style='width:136px;'");
- $field4 = array("string" => preg_replace("/%KEY%/", $key, $actions), "attach" => "style='width:80px;border-right:0px;text-align:right;'");
+ $field4 = array("string" => preg_replace("/%KEY%/", $key, $actions), "attach" => "style='width:110px;border-right:0px;text-align:right;'");
$this->AddElement(array($field1,$field2,$field3,$field4));
}
diff --git a/plugins/admin/groups/class_groupManagement.inc b/plugins/admin/groups/class_groupManagement.inc
index 30309740d..305fd6a9c 100644
--- a/plugins/admin/groups/class_groupManagement.inc
+++ b/plugins/admin/groups/class_groupManagement.inc
@@ -306,7 +306,9 @@ class groupManagement extends plugin
/* Cancel dialogs */
if (isset($_POST['edit_cancel']) || isset($_POST['password_cancel'])){
- del_lock ($this->grouptab->dn);
+ if(isset($this->grouptab->dn)){
+ del_lock ($this->grouptab->dn);
+ }
unset ($this->grouptab);
$this->grouptab= NULL;
unset($_SESSION['objectinfo']);
@@ -322,16 +324,18 @@ class groupManagement extends plugin
$display= $this->grouptab->execute();
/* Don't show buttons if tab dialog requests this */
- if (!$this->grouptab->by_object[$this->grouptab->current]->dialog){
- $display.= "
-{t}You will be able to restore from{/t}
+
+ {if $CountSnapShots!=0}
+ {t}You will be able to restore from{/t}
+ {else}
+ {t}There are no available snapshots.{/t}
+ {/if}
| {t}Choose a snapshot and click continue, to restore the snapshot.{/t} + | + {if $CountSnapShots==0} + {t}There is no snapshot available that could be restored.{/t} + {else} + {t}Choose a snapshot and click continue, to restore the snapshot.{/t} + {/if} |
| - |