summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bf781db)
raw | patch | inline | side by side (parent: bf781db)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 2 Nov 2007 07:34:31 +0000 (07:34 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 2 Nov 2007 07:34:31 +0000 (07:34 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7707 594d385d-05f5-0310-b6e9-bd551577e9d8
include/class_MultiSelectWindow.inc | patch | blob | history | |
include/class_plugin.inc | patch | blob | history | |
plugins/admin/systems/class_divListSystem.inc | patch | blob | history |
index e267b3ded553e827844ae0881a29c9f0afcef086..7c2be7aa5f1994778cd2d06a56b8a2d064280181 100644 (file)
/* Create header snapshot value */
- function get_snapshot_header()
+ function get_snapshot_header($layer_menu = FALSE)
{
$str = " ";
if($this->parent->snapshotEnabled()){
$ok |= count($this->parent->getAllDeletedSnapshots($base)) >= 1 ;
}
if($ok){
- $str = "<input class='center' type='image' align='middle' src='images/restore.png'
- title='"._("Restore snapshopts of already deleted objects")."'
- alt='"._("Restore")."' name='RestoreDeletedSnapShot'> ";
+ if($layer_menu){
+ $str = "..|<img class='center' src='images/restore.png'> "._("Restore")."|RestoreDeletedSnapShot|\n";
+ }else{
+ $str = "<input class='center' type='image' align='middle' src='images/restore.png'
+ title='"._("Restore snapshopts of already deleted objects")."'
+ alt='"._("Restore")."' name='RestoreDeletedSnapShot'> ";
+ }
}else{
- $str = "<img class='center' src='images/restore_grey.png' alt=''> ";
+ if($layer_menu){
+ $str = "..|<img class='center' src='images/restore_grey.png' alt=''> "._("Restore")."|RestoreDeletedSnapShot|\n";
+ }else{
+ $str = "<img class='center' src='images/restore_grey.png' alt=''> ";
+ }
}
-
# $str .= "<img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'> ";
}
return($str);
index 58cec70eea89b1dc07b20aae2db6382120a67c79..bb4863c3e30f7ff4c1102434a4b2d13a1c1013d1 100644 (file)
--- a/include/class_plugin.inc
+++ b/include/class_plugin.inc
}
/* Restore one of the already deleted objects */
- if(preg_match("/^RestoreDeletedSnapShot_/",$name) && $once){
+ if(((isset($_POST['menu_action']) && $_POST['menu_action'] == "RestoreDeletedSnapShot")
+ || preg_match("/^RestoreDeletedSnapShot_/",$name)) && $once){
$once = false;
$this->snapDialog = new SnapShotDialog($this->config,"",$this);
$this->snapDialog->set_snapshot_bases($baseSuffixe);
diff --git a/plugins/admin/systems/class_divListSystem.inc b/plugins/admin/systems/class_divListSystem.inc
index e64d25ba3c9e955bb4bfe364d2a5b63aadc94f41..92109423b3347ed36b63a3a55b0bf93276290aa1 100644 (file)
/* Add default header */
$listhead = MultiSelectWindow::get_default_header();
- /* Add snapshot icons */
- if(preg_match("/(c.*w|w.*c)/",$all_module_acls)){
- $listhead .= $this->get_snapshot_header($this->selectedBase);
- $add_sep = true;
- }
-
/* Add base selection */
$listhead .= _("Base")." <select name='CurrentMainBase' onChange='mainform.submit()' class='center'>$options</select>".
" <input class='center' type='image' src='images/list_submit.png' align='middle'
}
}
+ /* Add snapshot icons */
+ if(preg_match("/(c.*w|w.*c)/",$all_module_acls)){
+ $s .= $this->get_snapshot_header(TRUE);
+ }
$this->SetDropDownHeaderMenu($s);
$this->SetListHeader($listhead);