diff --git a/plugins/admin/systems/class_divListSystem.inc b/plugins/admin/systems/class_divListSystem.inc
index 7b0097267bcc4bb8fda4cfb153c77909a50ad70b..fe125e2aa7090e760c6afafae5d23041836084b5 100644 (file)
$this->EnableCloseButton(false);
$this->EnableSaveButton (false);
+ /* Dynamic action col, depending on snapshot icons */
+ $action_col_size = 50;
+ if($this->parent->snapshotEnabled()){
+ $action_col_size += 38;
+ }
+
/* set Page header */
$this->AddHeader(array("string"=>" ","attach"=>"style='width:20px;'"));
$this->AddHeader(array("string"=>_("System / Department")));
- $this->AddHeader(array("string"=>_("Actions"),"attach"=>"style='width:90px;border-right:0px;'"));
+ $this->AddHeader(array("string"=>_("Actions"),"attach"=>"style='width:".$action_col_size."px;border-right:0px;'"));
/* Text ,Value ,Name ,Is selected */
$this->AddCheckBox("ShowServers", _("Select to see servers"), _("Show servers"), true);
title='"._("Go to users department")."' alt='"._("Home")."' name='dep_home'> ".
" <input class='center' type='image' src='images/list_reload.png' align='middle' title='"._("Reload list")."' name='submit_department' alt='". _("Submit")."'> ".
" <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'> ";
-
- if($this->parent->snapshotEnabled()){
- $listhead .= " <input class='center' type='image' align='middle' src='images/restore.png'
- title='"._("Restore objects")."' alt='"._("Up")."' name='RestoreDeletedSnapShot'>".
- " <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'> ";
- }
-
+ $listhead .= $this->get_snapshot_header($this->selectedBase);
$listhead .= " <input class='center' type='image' align='middle' src='images/select_new_terminal.png'
name='newsystem_terminal' alt='"._("New Terminal template")."' title='"._("New Terminal")."'>".
" <input class='center' type='image' align='middle' src='images/select_new_workstation.png'
}
- function GetSnapShotActions($dn)
- {
- $str = "";
-
- if($this->parent->snapshotEnabled()){
-
- $str .="<input class='center' type='image' src='images/snapshot.png'
- alt='"._("Create snapshot")."' name='CreateSnapShot_".base64_encode($dn)."' title='"._("Create snapshot")."'> ";
-
- if(count($this->parent->Available_SnapsShots($dn))){
- $str .="<input class='center' type='image' src='images/restore.png'
- alt='"._("Restore snapshot")."' name='RestoreSnapShot_".base64_encode($dn)."' title='"._("Restore snapshot")."'> ";
- }else{
- $str.= "<img src='images/empty.png' style='width:16px;' class='center'> ";
- }
- }
- return($str);
- }
-
function setEntries($terminals)
{
$img1 = "<img class='center' src='images/printer.png' alt='C' title='"._("Cups Server") ."'>";
$empty =" ";
+ /* Dynamic action col, depending on snapshot icons */
+ $action_col_size = 50;
+ if($this->parent->snapshotEnabled()){
+ $action_col_size += 38;
+ }
+
// User and Template Images
$editlink = "<a href='?plug=".$_GET['plug']."&id=%s&act=edit_entry'>%s</a>";
// Test Every Entry and generate divlist Array
foreach($terminals as $key => $val){
- $action = $this->GetSnapShotActions($val['dn']);
- $action.= "<input class='center' type='image' src='images/edit.png' alt='"._("edit")."' name='user_edit_%KEY%' title='"._("Edit system")."'>";
+ $action= "<input class='center' type='image' src='images/edit.png' alt='"._("edit")."' name='user_edit_%KEY%' title='"._("Edit system")."'>";
+ $action.= $this->GetSnapShotActions($val['dn']);
$action.= "<input class='center' type='image' src='images/edittrash.png' alt='"._("delete")."' name='user_del_%KEY%' title='"._("Delete system")."'>";
/* Generate picture list, which is currently disabled */
$img = $this->parent->convert_list($val);
$field1 = array("string" => sprintf($img['img'],$val['dn']), "attach" => "style='text-align:center;width:20px;'");
$field2 = array("string" => sprintf($editlink,$key,$display), "attach" => "style='' title='".preg_replace('/ /', ' ', @LDAP::fix($val['dn']))."'");
- $field3 = array("string" => preg_replace("/%KEY%/", "$key", $action2.$action), "attach" => "style='width:90px;border-right:0px;text-align:right;'");
+ $field3 = array("string" => preg_replace("/%KEY%/", "$key", $action2.$action), "attach" => "style='width:".$action_col_size."px;border-right:0px;text-align:right;'");
$this->AddElement( array($field1,$field2,$field3));
}