index 7d910064db7841cdca0bff838c46f6d3843d49d7..58cd27a8ee39639287d2c65264df8510381be70b 100644 (file)
function divListFai ($config,$parent)
{
- MultiSelectWindow::MultiSelectWindow($config,"Fai");
+ MultiSelectWindow::MultiSelectWindow($config, "Fai", "fai");
$this->parent = $parent;
$this->ui = get_userinfo();
/* Set list strings */
$this->SetTitle(_("List of FAI classes"));
- $this->SetSummary(_("This table displays all systems, in the selected tree."));
+ $this->SetSummary(_("This table displays all FAI classes in the selected tree."));
/* Result page will look like a headpage */
$this->SetHeadpageMode();
$this->EnableCloseButton(false);
$this->EnableSaveButton (false);
+ /* Dynamic action col, depending on snapshot icons */
+ $action_col_size = 50;
+ if($this->parent->snapshotEnabled()){
+ $action_col_size += 20;
+ }
+
/* set Page header */
$this->AddHeader(array("string" => " ", "attach" => "style='text-align:center;width:20px;'"));
$this->AddHeader(array("string" => _("Name of FAI class"), "attach" => "style=''"));
$this->AddHeader(array("string" => _("Class type"), "attach" => "style='width:200px;'"));
- $this->AddHeader(array("string" => _("Actions"), "attach" => "style='width:90px;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("ShowProfiles" , _("Display FAI profile objects") ,_("Show profiles") ,true);
$this->AddCheckBox("ShowTemplates" , _("Display FAI template objects") ,_("Show templates") ,true);
title='"._("New profile")."' name='Create_profile' alt='"._("P")."'> ".
"<img class='center' src=\"images/list_seperator.png\" alt=\"\" align=\"middle\" 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' src='images/fai_new_partitionTable.png' align='middle'
title='"._("New partition table")."' name='Create_partition' alt='"._("PT")."'> ".
$editlink ="<a href='?plug=".$_GET['plug']."&edit_entry=%KEY%' title='%TITLE%'>%NAME%</a>";
+ /* Dynamic action col, depending on snapshot icons */
+ $action_col_size = 50;
+ if($this->parent->snapshotEnabled()){
+ $action_col_size += 20;
+ }
+
/********************
Attach objects
********************/
$desc= "";
}
- $action = $this->GetSnapShotActions($value['dn']);;
if($value['FAIstate'] == "freeze"){
- $action .= "<input class='center' type='image' src='images/edit.png' alt='"._("edit")."'
+ $action= "<input class='center' type='image' src='images/edit.png' alt='"._("edit")."'
name='entry_edit_%KEY%' title='"._("Edit class")."'>";
$edi = $editlink;
$acti = $action;
}else{
- $action .= "<input class='center' type='image' src='images/edit.png' alt='"._("edit")."'
+ $action= "<input class='center' type='image' src='images/edit.png' alt='"._("edit")."'
name='entry_edit_%KEY%' title='"._("Edit class")."'>";
- $action .= "<input class='center' type='image' src='images/edittrash.png' alt='"._("delete")."'
+ $action.= $this->GetSnapShotActions($value['dn']);;
+ $action.= "<input class='center' type='image' src='images/edittrash.png' alt='"._("delete")."'
name='entry_delete_%KEY%' title='"._("Delete class")."'>";
$acti = $action;
$edi = $editlink;
$field1 = array("string" => $img , "attach" => "style='text-align:center;width:20px;'");
$field2 = array("string" => preg_replace(array("/%KEY%/","/%NAME%/","/%TITLE%/"),array($key,$value['cn'].$desc,preg_replace('/ /', ' ', @LDAP::fix($value['dn']))),$edi) , "attach" => "style=''");
$field3 = array("string" => $info, "attach" => "style='width:200px;'");
- $field4 = array("string" => preg_replace("/%KEY%/",$key,$acti) , "attach" => "style='width:90px;border-right:0px;text-align:right;'");
+ $field4 = array("string" => preg_replace("/%KEY%/",$key,$acti) , "attach" => "style='width:".$action_col_size."px;border-right:0px;text-align:right;'");
$this->AddElement(array($field1,$field2,$field3,$field4));
}
}