diff --git a/plugins/admin/users/class_divListUsers.inc b/plugins/admin/users/class_divListUsers.inc
index 55efed9eed4225a3b6ec9d7412eaafc0c89f0f5c..af5b0af65076b10bcca3b8b160ed2345e8fe4bd5 100644 (file)
$this->EnableCloseButton(false);
$this->EnableSaveButton (false);
+ /* Dynamic action col, depending on snapshot icons */
+ $action_col_size = 88;
+ if($this->parent->snapshotEnabled()){
+ $action_col_size += 38;
+ }
+
/* set Page header */
$this->AddHeader(array("string"=>" ", "attach"=>"style='width:20px;'"));
$this->AddHeader(array("string"=>_("Username")." / "._("Department")));
$this->AddHeader(array("string"=>_("Properties"), "attach" => "style='width:152px;'"));
- $this->AddHeader(array("string"=>_("Actions"), "attach" => "style='width:132px;border-right:0px;text-align:right;'"));
+ $this->AddHeader(array("string"=>_("Actions"), "attach" => "style='width:".$action_col_size."px;border-right:0px;text-align:right;'"));
$this->AddCheckBox("ShowTemplates" ,_("Select to see template pseudo users") ,_("Show templates") , false);
$this->AddCheckBox("ShowFunctionalUsers",_("Select to see users that have only a GOsa object"),_("Show functional users") , true);
$this->AddRegex ("Regex", _("Display users matching"),"*" , true);
}
- 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 a new snapshot from this object")."'> ";
-
- 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 GenHeader()
{
" <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 snapshopts of already deleted objects")."' alt='"._("Restore")."' 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/list_new_user.png'
title='"._("Create new user")."' alt='"._("New user")."' name='user_new'> ".
" <input class='center' type='image' align='middle' src='images/list_new.png'
$tplimg = "<img class='center' src='images/select_template.png' alt='Template' title='%s'>";
$editlink = "<a href='?plug=".validate($_GET['plug'])."&id=%s&act=edit_entry'>%s</a>";
+ /* Dynamic action col, depending on snapshot icons */
+ $action_col_size = 88;
+ if($this->parent->snapshotEnabled()){
+ $action_col_size += 38;
+ }
+
/* Possilbe objectClass image combinations */
$possibleAccounts = array(
"posixAccount" => array("VAR"=>"posix" ,"IMG"=>"posiximg"),
$field2 = array("string" => sprintf($editlink,$key,$display).$ip_port, "attach" => "style='' title='".preg_replace('/ /', ' ', @LDAP::fix($val['dn']))."'");
$field3 = array("string" => $UseImg, "attach" => "style='width:152px;'");
$field4 = array("string" => $s_img_create_from_template.preg_replace("/%KEY%/", "$key", $action),
- "attach" => "style='width:132px;border-right:0px; text-align:right;'");
+ "attach" => "style='width:".$action_col_size."px;border-right:0px; text-align:right;'");
/* Add to list */
$add = array($field1,$field2,$field3,$field4);
$this->AddElement($add);