Code

Updated migration class
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 17 May 2010 13:43:31 +0000 (13:43 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 17 May 2010 13:43:31 +0000 (13:43 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18520 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/addons/configViewer/migrate.tpl
gosa-core/plugins/addons/configViewer/migration/class_migrateRDN.inc

index 08f08bef6c0f9a8159e692769e2c99a4b76aa62b..ad601eaa78703153c1ac98d2673b81ddbb2aeda6 100644 (file)
@@ -2,8 +2,10 @@
  <div class="mainlist-header">
   <p>{t}Property migration assistent{/t} - {t}Migration steps left{/t}: {$leftSteps}</p>
   <div class="mainlist-nav">
-   <div style='width:100%; height: 400px; overflow: scroll'>
+   <div style='width:100%; height: 400px; overflow: scroll; padding: 5px;'>
+
    {$content}
+
    </div>
    <hr>
    <div class="plugin-actions">
index 65cf2dee1cefcfacf766280b334b194a3823c924..bbafd4527e9e43bc4b1afc6ecc738ce6d16bebb3 100644 (file)
@@ -17,10 +17,22 @@ class migrateRDN implements propertyMigration
     protected $suffix = ""; 
     protected $prefix = ""; 
 
+    protected $title = "";
+    protected $description = "";
+
+
     function __construct($config,$property)
     {
         $this->property = &$property;
         $this->config = &$config;
+
+        //Set a dummy title and description
+        if(empty($this->title)){
+            $this->title = sprintf(_("GOsa migration of property '%s'"), $this->property->getName());
+        }
+        if(empty($this->description)){
+            $this->description = sprintf(_("GOsa has detected objects outside of the configured storage point (%s)"), $this->property->getValue(TRUE));
+        }
     }   
 
     function getChanges()
@@ -139,22 +151,29 @@ class migrateRDN implements propertyMigration
 
     function execute()
     {
-        $str = "";
+        $str = "<h3>".$this->title."</h3>";
+        $str.= $this->description;
+        $str.= "<hr>";
         if(count($this->found['add'])) {
-            $str.= "<br><h3>"._("Objects that will be added")."</h3>";
+            $str.= "<br>"._("Objects that will be added");
+            $str.= "<ul>";
             foreach($this->found['add'] as $dn => $attrs){
-                $str.= $dn."<br>";
+                $str.= "<li>".$dn."</li>";
             }
+            $str.= "</ul>";
         }
         if(count($this->found['move'])) {
-            $str.= "<br><h3>"._("Objects that will be moved")."</h3>";
-            $str.="<pre>";
+            $str.= "<br>"._("Objects that will be moved")."<br>";
+            $str.= "<ul style='list-style:none; padding: 15px;'>";
             foreach($this->found['move'] as $id => $data){
                 $checked = (!isset($_POST["migrateNow".get_class($this)])) ? 'checked':'';
-                $str.= "<input $checked type='checkbox' value='1' name='migrateEntry_{$id}'>";
-                $str.= sprintf(_("Moving object '%s' to '%s'"), $data['from'], $data['to'])."<br>";
+                $str.= "<li>
+            
+                <span style='white-space:nowrap;'>
+                <input $checked type='checkbox' value='1' name='migrateEntry_{$id}'>";
+                $str.= sprintf(_("Moving object '%s' to '%s'"), $data['from'], $data['to'])."</span></li>";
             }
-            $str.="</pre>";
+            $str.="</ul>";
         }
         $str.= "<button name='migrateNow".get_class($this)."'>"._("Migrate")."</button>";
         return($str);