index 2262fd8ae8c6e33b09d0d494ba4b74318261bb7e..f8826637a45181740dcbed2db23f074046cd6945 100644 (file)
/* 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:60px;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);
" <input class='center' type='image' src='images/fai_new_profile.png' align='middle'
title='"._("New profile")."' name='Create_profile' alt='"._("P")."'> ".
- "<img class='center' src=\"images/list_seperator.png\" alt=\"\" align=\"middle\" height=\"16\" width=\"1\"> ".
-
- " <input class='center' type='image' src='images/fai_new_partitionTable.png' align='middle'
+ "<img class='center' src=\"images/list_seperator.png\" alt=\"\" align=\"middle\" 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")."'> ".
" <input class='center' type='image' src='images/fai_new_script.png' align='middle'
$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
********************/
}
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:60px;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));
- }
+ }
}
function Save()