Code

Updated listing
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 24 Aug 2009 13:58:34 +0000 (13:58 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 24 Aug 2009 13:58:34 +0000 (13:58 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14119 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_listing.inc

index 3b3e04bd502d68c179fd8694310629a912d8d71e..c160807a2dcb323df4fd2a59a42be9fd2aecce8e 100644 (file)
@@ -471,6 +471,12 @@ class listing {
   }
 
 
+  function getBase()
+  {
+    return $this->base;
+  }
+
+
   function parseLayout($layout)
   {
     $result= array();
@@ -980,6 +986,10 @@ class listing {
           $result.= $this->renderSnapshotMenu($separator);
           break;
 
+        case 'exporter':
+          $result.= $this->renderExporterMenu($separator);
+          break;
+
         case 'daemon':
           $result.= $this->renderDaemonMenu($separator);
           break;
@@ -1247,6 +1257,24 @@ class listing {
   }
 
 
+  function renderExporterMenu($separator)
+  {
+    // Presets
+    $result = "";
+
+    // Draw entries
+    $result.= "<li$separator><a href='#'><img border='0' class='center' src='images/lists/export.png'>&nbsp;"._("Export list")."&nbsp;<img border='0' src='images/forward-arrow.png'></a><ul class='level3'>";
+
+    // Export CVS as build in exporter
+    $result.= "<li><a href='#' onClick='document.getElementById(\"actionmenu\").value= \"exportCSV\";mainform.submit();'><img border='0' class='center' src='plugins/lists/exportCSV.png'>&nbsp;CSV</a></li>";
+
+    // Finalize list
+    $result.= "</ul></li>";
+
+    return($result);
+  }
+
+
   function renderSnapshotActions($row, $dn, $category, $class, $copy= true, $cut= true)
   {
     // We can only provide information if we've got a snapshot handler