Can add a text before banana table in tab container
authorx2003bruneau <x2003bruneau@9869982d-c50d-0410-be91-f2a2ec7c7c7b>
Thu, 10 Aug 2006 20:56:02 +0000 (20:56 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 4 Jan 2008 23:35:08 +0000 (00:35 +0100)
git-svn-id: svn+ssh://murphy/home/svn/banana/trunk@136 9869982d-c50d-0410-be91-f2a2ec7c7c7b

banana/misc.inc.php

index f8bdada..3bc4f17 100644 (file)
@@ -465,11 +465,17 @@ function displayPages($first = -1)
 
 function makeTable($text)
 {
+    $links = null;
+    if (function_exists('hook_browsingAction')) {
+        $links = hook_browsingAction();
+    }
+
     return '<table class="cadre_a_onglet" cellpadding="0" cellspacing="0" width="100%">'
          . '<tr><td>'
          . displayTabs()
          . '</td></tr>'
          . '<tr><td class="conteneur_tab">'
+         . $links
          . $text
          . '</td></tr>'
          . '</table>';
@@ -552,7 +558,11 @@ function wrap($text, $_prefix="", $_force=false, $firstpass = true)
         $result = array_merge($result, $next);
     }
 
-    $result = $_prefix.join("\n$_prefix", $result).($_prefix ? '' : $sign);
+    $break = "\n";
+    if (!$firstpass) {
+        $break .= $_prefix;
+    }
+    $result = $_prefix.join($break, $result).($_prefix ? '' : $sign);
     if ($firstpass) {
         return wrap($result, $_prefix, $_force, false);
     }