From fe868cbacf916a5d664cd820fa37036d8da03961 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 13 Jun 2006 11:35:24 +0000 Subject: [PATCH] Made apps compatible to snapshots git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3801 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../class_applicationManagement.inc | 5 ++ .../applications/class_divListApplication.inc | 51 +++++++++++-------- 2 files changed, 35 insertions(+), 21 deletions(-) diff --git a/plugins/admin/applications/class_applicationManagement.inc b/plugins/admin/applications/class_applicationManagement.inc index 4563f4fd7..117ef50df 100644 --- a/plugins/admin/applications/class_applicationManagement.inc +++ b/plugins/admin/applications/class_applicationManagement.inc @@ -364,6 +364,11 @@ class applicationManagement extends plugin Dialog display ****************/ + /* Check if there is a snapshot dialog open */ + if($str = $this->showSnapshotDialog($this->DivListApplication->selectedBase,"ou=apps,")){ + return($str); + } + /* Display dialog with system list */ $this->DivListApplication->parent = $this; $this->DivListApplication->execute(); diff --git a/plugins/admin/applications/class_divListApplication.inc b/plugins/admin/applications/class_divListApplication.inc index e5bddf2ce..32ea35acd 100755 --- a/plugins/admin/applications/class_divListApplication.inc +++ b/plugins/admin/applications/class_divListApplication.inc @@ -42,7 +42,7 @@ class divListApplication extends MultiSelectWindow /* 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); @@ -89,16 +89,23 @@ class divListApplication extends MultiSelectWindow */ $listhead = "
". "  ". + "title='"._("Go to root department")."' name='dep_root' alt='"._("Root")."'> ". "  ". + "title='"._("Go up one department")."' alt='"._("Up")."' name='dep_back'> ". "  ". + "title='"._("Go to users department")."' alt='"._("Home")."' name='dep_home'> ". "  ". - "  ". - "  ". + "title='"._("Reload list")."' name='submit_department' alt='"._("Submit")."'> ". + "  "; + + if($this->parent->snapshotEnabled()){ + $listhead .= " ". + "  "; + } + + $listhead .= "  ". $Copy_Paste. "  ". _("Base")." ". @@ -131,18 +138,6 @@ class divListApplication extends MultiSelectWindow $empty = ""; - /* Create action icons */ - $actions = ""; - if($this->parent->CopyPasteHandler){ - $actions.= " "; - $actions.= " "; - } - $actions.= ""; - $actions.= ""; /******************** @@ -150,6 +145,20 @@ class divListApplication extends MultiSelectWindow ********************/ foreach($list as $key => $val){ + + /* Create action icons */ + $actions = $this->GetSnapShotActions($val['dn']); + if($this->parent->CopyPasteHandler){ + $actions.= " "; + $actions.= " "; + } + $actions.= ""; + $actions.= ""; + $title = "title='".preg_replace('/ /', ' ', @LDAP::fix($val['dn']))."'"; if(!isset($val['description'][0])){ @@ -159,7 +168,7 @@ class divListApplication extends MultiSelectWindow } $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)); } } -- 2.30.2