Code

Moved files, updated template loading
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 14 Jan 2008 15:04:42 +0000 (15:04 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 14 Jan 2008 15:04:42 +0000 (15:04 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8331 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/admin/systems/class_divListRepositories.inc [deleted file]
gosa-core/plugins/admin/systems/services/class_divListRepositories.inc [deleted file]
gosa-core/plugins/admin/systems/services/repository/class_divListRepositories.inc [new file with mode: 0644]
gosa-core/plugins/admin/systems/services/repository/class_servRepository.inc
gosa-core/plugins/admin/systems/services/repository/class_servRepositorySetup.inc

diff --git a/gosa-core/plugins/admin/systems/class_divListRepositories.inc b/gosa-core/plugins/admin/systems/class_divListRepositories.inc
deleted file mode 100644 (file)
index 6e43dc1..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-<?php
-
-class divListRepository extends MultiSelectWindow
-{
-  /* CheckBoxes, to change default values modify $this->AddCheckBox */
-  var $parent             ;
-  var $ui                 ;
-
-  var $regex ="*";
-
-  function divListRepository ($config,$parent)
-  {
-    MultiSelectWindow::MultiSelectWindow($config,"Repository", "server");
-    
-    $this->parent       = $parent;
-    $this->ui           = get_userinfo();
-
-    $this->SetTitle("repositories");
-    $this->SetSummary(_("List of configured repositories."));
-    $this->SetInformation(_("This menu allows you to create, delete and edit repository settings."));
-    $this->EnableCloseButton(FALSE);
-    $this->EnableSaveButton(FALSE);
-    $this->AddHeader(array("string"=>_("Release"),"attach"=>"style='width:80px;'"));
-    $this->AddHeader(array("string"=>_("Sections")));
-    $this->AddHeader(array("string"=>_("Options"),"attach"=>"style='border-right:0px;width:55px;'"));
-    $this->AddRegex("regex",_("Regular expression for matching object names"),"*",TRUE);
-    $this->EnableAplhabet(TRUE);
-  }
-
-  function GenHeader()
-  {
-    if($this->parent->acl_is_createable()){
-      $this->SetListHeader("<input type=\"image\" src=\"images/fai_new_packages.png\" title=\""._("Add repository")."\"                 name=\"AddRepository\">");
-    }
-  }
-
-  function execute()
-  {
-    $this->ClearElementsList();
-    $this->GenHeader();
-  }
-
-  function setEntries($list)
-  {
-    $link   = "<a href='?plug=".$_GET['plug']."&amp;act=open_repository&amp;id=%s'>%s</a>";
-    $edit   = "<input type='image' value='%s' name='edit_%s'   src='images/edit.png'>&nbsp;";
-
-    /* Hide delete icon, if delete is not allowed */
-    if($this->parent->acl_is_removeable()){
-      $delete = "<input type='image' value='%s' name='delete_%s' src='images/edittrash.png'>";
-    }else{
-      $delete = "<img src='images/empty.png' alt='&nbsp;'>";
-    }
-
-    foreach($list as $name => $reps){
-
-      $str = " ";
-      if(preg_match("/".str_replace("*",".*",$this->regex)."/",$reps['Release'])){
-        foreach($reps['Sections'] as $sec){
-          $str.=$sec." ";
-        }
-        $this->AddElement(array(
-              array("string"=>sprintf($link,base64_encode($name),$name),"attach"=>"style='width:80px;'"),
-              array("string"=>sprintf($link,base64_encode($name),_("Sections")." :".$str)),
-              array("string"=>preg_replace("/%s/",base64_encode($name),$edit.$delete),"attach"=>"style='border-right:0px;width:55px;text-  align:right;'")
-              ));
-      }
-    }
-
-  }
-
-  function Save()
-  {
-    MultiSelectWindow :: Save();  
-  }
-
-  function save_object()
-  {
-    /* Save automatic created POSTs like regex, checkboxes */
-    MultiSelectWindow :: save_object();   
-  }
-}
-// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
-?>
diff --git a/gosa-core/plugins/admin/systems/services/class_divListRepositories.inc b/gosa-core/plugins/admin/systems/services/class_divListRepositories.inc
deleted file mode 100644 (file)
index 6e43dc1..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-<?php
-
-class divListRepository extends MultiSelectWindow
-{
-  /* CheckBoxes, to change default values modify $this->AddCheckBox */
-  var $parent             ;
-  var $ui                 ;
-
-  var $regex ="*";
-
-  function divListRepository ($config,$parent)
-  {
-    MultiSelectWindow::MultiSelectWindow($config,"Repository", "server");
-    
-    $this->parent       = $parent;
-    $this->ui           = get_userinfo();
-
-    $this->SetTitle("repositories");
-    $this->SetSummary(_("List of configured repositories."));
-    $this->SetInformation(_("This menu allows you to create, delete and edit repository settings."));
-    $this->EnableCloseButton(FALSE);
-    $this->EnableSaveButton(FALSE);
-    $this->AddHeader(array("string"=>_("Release"),"attach"=>"style='width:80px;'"));
-    $this->AddHeader(array("string"=>_("Sections")));
-    $this->AddHeader(array("string"=>_("Options"),"attach"=>"style='border-right:0px;width:55px;'"));
-    $this->AddRegex("regex",_("Regular expression for matching object names"),"*",TRUE);
-    $this->EnableAplhabet(TRUE);
-  }
-
-  function GenHeader()
-  {
-    if($this->parent->acl_is_createable()){
-      $this->SetListHeader("<input type=\"image\" src=\"images/fai_new_packages.png\" title=\""._("Add repository")."\"                 name=\"AddRepository\">");
-    }
-  }
-
-  function execute()
-  {
-    $this->ClearElementsList();
-    $this->GenHeader();
-  }
-
-  function setEntries($list)
-  {
-    $link   = "<a href='?plug=".$_GET['plug']."&amp;act=open_repository&amp;id=%s'>%s</a>";
-    $edit   = "<input type='image' value='%s' name='edit_%s'   src='images/edit.png'>&nbsp;";
-
-    /* Hide delete icon, if delete is not allowed */
-    if($this->parent->acl_is_removeable()){
-      $delete = "<input type='image' value='%s' name='delete_%s' src='images/edittrash.png'>";
-    }else{
-      $delete = "<img src='images/empty.png' alt='&nbsp;'>";
-    }
-
-    foreach($list as $name => $reps){
-
-      $str = " ";
-      if(preg_match("/".str_replace("*",".*",$this->regex)."/",$reps['Release'])){
-        foreach($reps['Sections'] as $sec){
-          $str.=$sec." ";
-        }
-        $this->AddElement(array(
-              array("string"=>sprintf($link,base64_encode($name),$name),"attach"=>"style='width:80px;'"),
-              array("string"=>sprintf($link,base64_encode($name),_("Sections")." :".$str)),
-              array("string"=>preg_replace("/%s/",base64_encode($name),$edit.$delete),"attach"=>"style='border-right:0px;width:55px;text-  align:right;'")
-              ));
-      }
-    }
-
-  }
-
-  function Save()
-  {
-    MultiSelectWindow :: Save();  
-  }
-
-  function save_object()
-  {
-    /* Save automatic created POSTs like regex, checkboxes */
-    MultiSelectWindow :: save_object();   
-  }
-}
-// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
-?>
diff --git a/gosa-core/plugins/admin/systems/services/repository/class_divListRepositories.inc b/gosa-core/plugins/admin/systems/services/repository/class_divListRepositories.inc
new file mode 100644 (file)
index 0000000..6e43dc1
--- /dev/null
@@ -0,0 +1,84 @@
+<?php
+
+class divListRepository extends MultiSelectWindow
+{
+  /* CheckBoxes, to change default values modify $this->AddCheckBox */
+  var $parent             ;
+  var $ui                 ;
+
+  var $regex ="*";
+
+  function divListRepository ($config,$parent)
+  {
+    MultiSelectWindow::MultiSelectWindow($config,"Repository", "server");
+    
+    $this->parent       = $parent;
+    $this->ui           = get_userinfo();
+
+    $this->SetTitle("repositories");
+    $this->SetSummary(_("List of configured repositories."));
+    $this->SetInformation(_("This menu allows you to create, delete and edit repository settings."));
+    $this->EnableCloseButton(FALSE);
+    $this->EnableSaveButton(FALSE);
+    $this->AddHeader(array("string"=>_("Release"),"attach"=>"style='width:80px;'"));
+    $this->AddHeader(array("string"=>_("Sections")));
+    $this->AddHeader(array("string"=>_("Options"),"attach"=>"style='border-right:0px;width:55px;'"));
+    $this->AddRegex("regex",_("Regular expression for matching object names"),"*",TRUE);
+    $this->EnableAplhabet(TRUE);
+  }
+
+  function GenHeader()
+  {
+    if($this->parent->acl_is_createable()){
+      $this->SetListHeader("<input type=\"image\" src=\"images/fai_new_packages.png\" title=\""._("Add repository")."\"                 name=\"AddRepository\">");
+    }
+  }
+
+  function execute()
+  {
+    $this->ClearElementsList();
+    $this->GenHeader();
+  }
+
+  function setEntries($list)
+  {
+    $link   = "<a href='?plug=".$_GET['plug']."&amp;act=open_repository&amp;id=%s'>%s</a>";
+    $edit   = "<input type='image' value='%s' name='edit_%s'   src='images/edit.png'>&nbsp;";
+
+    /* Hide delete icon, if delete is not allowed */
+    if($this->parent->acl_is_removeable()){
+      $delete = "<input type='image' value='%s' name='delete_%s' src='images/edittrash.png'>";
+    }else{
+      $delete = "<img src='images/empty.png' alt='&nbsp;'>";
+    }
+
+    foreach($list as $name => $reps){
+
+      $str = " ";
+      if(preg_match("/".str_replace("*",".*",$this->regex)."/",$reps['Release'])){
+        foreach($reps['Sections'] as $sec){
+          $str.=$sec." ";
+        }
+        $this->AddElement(array(
+              array("string"=>sprintf($link,base64_encode($name),$name),"attach"=>"style='width:80px;'"),
+              array("string"=>sprintf($link,base64_encode($name),_("Sections")." :".$str)),
+              array("string"=>preg_replace("/%s/",base64_encode($name),$edit.$delete),"attach"=>"style='border-right:0px;width:55px;text-  align:right;'")
+              ));
+      }
+    }
+
+  }
+
+  function Save()
+  {
+    MultiSelectWindow :: Save();  
+  }
+
+  function save_object()
+  {
+    /* Save automatic created POSTs like regex, checkboxes */
+    MultiSelectWindow :: save_object();   
+  }
+}
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
+?>
index 10321c02453a36f5c19e959f7280b778af844182..1c021208bf87cebe5fc00a827c405301823f2c7e 100644 (file)
@@ -254,7 +254,7 @@ class servrepository extends goService
     $this->divlist->execute(); 
     $this->divlist->setEntries($this->repositories);
     $smarty->assign("Repositories",$this->divlist->Draw());
-    $display.= $smarty->fetch(get_template_path('servRepository.tpl', TRUE));
+    $display.= $smarty->fetch(get_template_path('servRepository.tpl', TRUE,dirname(__FILE__)));
     return($display);
   }
 
index 40f37b0628acca88f431cc89042a7e16b31cdcf2..a355b190e07df08bbdff98b3b46c548386953bab 100644 (file)
@@ -123,7 +123,7 @@ class servRepositorySetup  extends plugin
     $smarty->assign("ParentServers"   ,$tmp);
     $smarty->assign("ParentServerKeys",array_flip($tmp));
 
-    return($smarty->fetch(get_template_path('servRepositorySetup.tpl', TRUE)));
+    return($smarty->fetch(get_template_path('servRepositorySetup.tpl', TRUE,dirname(__FILE__))));
   }
 
   /* Save data to object */