diff --git a/plugins/admin/applications/class_divListApplication.inc b/plugins/admin/applications/class_divListApplication.inc
index 2a2db84959cbce1a8fa4398b64682007467f1e23..32ea35acdec173c8d8a48f14802f24fe12730c4e 100755 (executable)
$this->parent = $parent;
$this->ui = get_userinfo();
- /* Set default base */
- if(!isset($_SESSION['CurrentMainBase'])){
- $_SESSION['CurrentMainBase'] = $this->config->current['BASE'];
- }
- $this->selectedBase = $_SESSION['CurrentMainBase'];
-
/* Set list strings */
$this->SetTitle(_("List of Applications"));
$this->SetSummary(_("This table displays all applications in the selected tree."));
/* Result page will look like a headpage */
$this->SetHeadpageMode();
- $this->SetInformation(_("This menu allows you to add, edit and remove selected applications. ".
- "You may want to use the range selector on top of the application listbox, ".
- "when working with a large number of applications."));
+ $this->SetInformation(_("This menu allows you to add, edit and remove selected applications. You may want to use the range selector on top of the application listbox, when working with a large number of applications."));
$this->EnableAplhabet(true);
/* set Page header */
$this->AddHeader(array("string" => " ", "attach" => "style='text-align:center;width:20px;'"));
$this->AddHeader(array("string" => _("Application name")." / "._("Department"), "attach" => "style=''"));
- $this->AddHeader(array("string" => _("Actions"), "attach" => "style='width:80px;border-right:0px;text-align:right;'"));
+ $this->AddHeader(array("string" => _("Actions"), "attach" => "style='width:110px;border-right:0px;text-align:right;'"));
/* Add SubSearch checkbox */
$this->AddCheckBox("SubSearch", _("Select to search within subtrees"), _("Ignore subtrees"), false);
function AddUserBoxToFilter($position){
$str = "";
- if(($position == 2) && ($this->parent->enableReleaseManagement)){
+ if(($position == 2) && ($this->parent->IsReleaseManagementActivated($this->config))){
$smarty = get_smarty();
$smarty->assign("selectedRelease",$this->selectedRelease);
$smarty->assign("branchimage","images/branch.png");
* It provides general navigation and object creation
*/
$listhead = "<div style='background:#F0F0F9;padding:5px;'>".
- " <input class='center' type='image' src='images/list_root.png' align='middle'
- title='"._("Go to root department")."' name='dep_root' alt='"._("Root")."'> ".
- " <input class='center' type='image' align='middle' src='images/list_back.png'
- title='"._("Go up one department")."' alt='"._("Up")."' name='dep_back'> ".
- " <input class='center' type='image' align='middle' src='images/list_home.png'
- 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'> ".
- " <input class='center' type='image' align='middle' src='images/list_new_app.png' alt='"._("new")."'
- title='"._("Create new application")."' name='appl_new'> ".
+ " <input class='center' type='image' src='images/list_root.png' align='middle' ".
+ "title='"._("Go to root department")."' name='dep_root' alt='"._("Root")."'> ".
+ " <input class='center' type='image' align='middle' src='images/list_back.png' ".
+ "title='"._("Go up one department")."' alt='"._("Up")."' name='dep_back'> ".
+ " <input class='center' type='image' align='middle' src='images/list_home.png' ".
+ "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 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 .= " <input class='center' type='image' align='middle' src='images/list_new_app.png' alt='"._("new").
+ "' title='"._("Create new application")."' name='appl_new'> ".
$Copy_Paste.
" <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'> ".
_("Base")." <select name='CurrentMainBase' onChange='mainform.submit()' class='center'>$options</select>".
$empty = "<img class='center' src='images/empty.png' style='width:16px;height:16px;' alt=''>";
- /* Create action icons */
- $actions = "";
- if($this->parent->CopyPasteHandler){
- $actions.= "<input class='center' type='image'
- src='images/editcut.png' alt='"._("cut")."' name='cut_%KEY%' title='"._("Cut this entry")."'> ";
- $actions.= "<input class='center' type='image'
- src='images/editcopy.png' alt='"._("copy")."' name='copy_%KEY%' title='"._("Copy this entry")."'> ";
- }
- $actions.= "<input class='center' type='image'
- src='images/edit.png' alt='"._("edit")."' name='appl_edit_%KEY%' title='"._("Edit this entry")."'>";
- $actions.= "<input class='center' type='image'
- src='images/edittrash.png' alt='"._("delete")."' name='appl_del_%KEY%' title='"._("Delete this entry")."'>";
/********************
********************/
foreach($list as $key => $val){
- $title = "title='dn: ".@LDAP::fix($val['dn'])."'";
+
+ /* Create action icons */
+ $actions = $this->GetSnapShotActions($val['dn']);
+ if($this->parent->CopyPasteHandler){
+ $actions.= "<input class='center' type='image'
+ src='images/editcut.png' alt='"._("cut")."' name='cut_%KEY%' title='"._("Cut this entry")."'> ";
+ $actions.= "<input class='center' type='image'
+ src='images/editcopy.png' alt='"._("copy")."' name='copy_%KEY%' title='"._("Copy this entry")."'> ";
+ }
+ $actions.= "<input class='center' type='image'
+ src='images/edit.png' alt='"._("edit")."' name='appl_edit_%KEY%' title='"._("Edit this entry")."'>";
+ $actions.= "<input class='center' type='image'
+ src='images/edittrash.png' alt='"._("delete")."' name='appl_del_%KEY%' title='"._("Delete this entry")."'>";
+
+ $title = "title='".preg_replace('/ /', ' ', @LDAP::fix($val['dn']))."'";
if(!isset($val['description'][0])){
$desc = "";
}
$field1 = array("string" => sprintf($applimg,$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, $actions), "attach" => "style='width:80px;border-right:0px;text-align:right;'");
+ $field3 = array("string" => preg_replace("/%KEY%/", $key, $actions), "attach" => "style='width:110px;border-right:0px;text-align:right;'");
$this->AddElement(array($field1,$field2,$field3));
}
}
MultiSelectWindow::save_object();
$_SESSION['appfilter']['release'] = $this->selectedRelease;
}
+
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>