From 072f438d134a13e30c51e743f5dc6d6b04b7f559 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 14 Jun 2006 07:07:42 +0000 Subject: [PATCH] Added snapshot to gofonmacros git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3809 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/gofon/macro/class_divListMacros.inc | 26 ++++++++++++++----- .../macro/class_gofonMacroManagement.inc | 6 +++++ 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/plugins/gofon/macro/class_divListMacros.inc b/plugins/gofon/macro/class_divListMacros.inc index 1ab12136f..918c91399 100755 --- a/plugins/gofon/macro/class_divListMacros.inc +++ b/plugins/gofon/macro/class_divListMacros.inc @@ -45,7 +45,7 @@ class divListMacro extends MultiSelectWindow $this->AddHeader(array("string" => " ", "attach" => "style='text-align:center;width:20px;'")); $this->AddHeader(array("string" => _("macro name")." / "._("Department"), "attach" => "style=''")); $this->AddHeader(array("string" => _("Visible"), "attach" => "style='width:50px;'")); - $this->AddHeader(array("string" => _("Actions"), "attach" => "style='width:60px;border-right:0px;text-align:right;'" )); + $this->AddHeader(array("string" => _("Actions"), "attach" => "style='width:90px;border-right:0px;text-align:right;'" )); /* Add Checkboxes / SubSearch checkbox */ $this->AddCheckBox("SubSearch", _("Select to search within subtrees"), _("Ignore subtrees"), false); @@ -78,13 +78,20 @@ class divListMacro extends MultiSelectWindow title='"._("Go to users department")."' alt='"._("Home")."' name='dep_home'> ". "  ". - "  ". - "  ". + "  "; + + if($this->parent->snapshotEnabled()){ + $listhead .= " ". + "  "; + } + + $listhead .= "  ". "  ". _("Base")." ". "  ". + title='"._("Submit department")."' name='submit_department' alt='"._("Submit")."'> ". ""; $this->SetListHeader($listhead); @@ -111,6 +118,13 @@ class divListMacro extends MultiSelectWindow $editlink = "%s"; foreach($list as $key => $val){ + + $action = $this->GetSnapShotActions($val['dn']); + $action .= ""; + $action .= ""; + $display= $val["displayName"][0]; if(isset($val['goFonMacroVisible']['0'])&&($val['goFonMacroVisible']['0'] == "1")){ @@ -122,7 +136,7 @@ class divListMacro extends MultiSelectWindow $field1 = array("string" => sprintf($macroimg,$val['dn']), "attach" => "style='text-align:center;width:20px;'"); $field2 = array("string" => sprintf($editlink,$key,$display), "attach" => "style='' title='".preg_replace('/ /', ' ', @LDAP::fix($val['dn']))."'"); $field3 = array("string" => $pic1, "attach" => "style='width:50px;'"); - $field4 = array("string" => preg_replace("/%KEY%/", "$key", $action), "attach" => "style='width:60px;border-right:0px;text-align:right;'"); + $field4 = array("string" => preg_replace("/%KEY%/", "$key", $action), "attach" => "style='width:90px;border-right:0px;text-align:right;'"); $this->AddElement(array($field1,$field2,$field3,$field4)); } diff --git a/plugins/gofon/macro/class_gofonMacroManagement.inc b/plugins/gofon/macro/class_gofonMacroManagement.inc index f494bc828..3c213883d 100755 --- a/plugins/gofon/macro/class_gofonMacroManagement.inc +++ b/plugins/gofon/macro/class_gofonMacroManagement.inc @@ -277,6 +277,12 @@ class gofonMacro extends plugin Display entry list *****************/ + /* Check if there is a snapshot dialog open */ + if($str = $this->showSnapshotDialog($this->DivListMacro->selectedBase, + array("ou=macros,ou=asterisk,ou=configs,ou=systems,".$this->DivListMacro->selectedBase))){ + return($str); + } + /* Return rendered main page */ /* Display dialog with system list */ $this->DivListMacro->parent = $this; -- 2.30.2