Can define elements to display
authorx2003bruneau <x2003bruneau@9869982d-c50d-0410-be91-f2a2ec7c7c7b>
Sun, 14 Jan 2007 18:26:34 +0000 (18:26 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Fri, 4 Jan 2008 23:35:18 +0000 (00:35 +0100)
git-svn-id: svn+ssh://murphy/home/svn/banana/trunk@167 9869982d-c50d-0410-be91-f2a2ec7c7c7b

banana/banana.inc.php.in
banana/page.inc.php
banana/templates/banana-base.tpl
css/style.css

index e260626..0b3c77c 100644 (file)
@@ -23,6 +23,7 @@ class Banana
                                     'subscribe' => array(),
                                     'autoup' => 1);
     static public $boxpattern;
+    static public $withtabs = true;
 
 ### Spool ###
     static public $spool_max     = 3000;
@@ -44,6 +45,7 @@ class Banana
     static public $msgshow_mimeparts = array('multipart/report', 'multipart/mixed', 'text/html', 'text/plain', 'text/enriched', 'text', 'message');
     static public $msgshow_xface     = true;
     static public $msgshow_wrap      = 78;
+    static public $msgshow_withthread = true;
 
     /** Match an url
      * Should be included in a regexp delimited using /, !, , or @ (eg: "/$url_regexp/ui")
index d0d67b6..228c0ed 100644 (file)
@@ -140,6 +140,8 @@ class BananaPage extends Smarty
         $this->assign('spool',     Banana::$spool);
         $this->assign('protocole', Banana::$protocole);
         $this->assign('showboxlist', Banana::$spool_boxlist);
+        $this->assign('showthread',  Banana::$msgshow_withthread);
+        $this->assign('withtabs'   , Banana::$withtabs);
 
         $this->register_function('url',     array($this, 'makeUrl'));
         $this->register_function('link',    array($this, 'makeLink'));
index d1f9cc6..8f3f82c 100644 (file)
@@ -2,6 +2,7 @@
 {* *}
 {* *}
 
+{if $withtabs}
 <table class="cadre_a_onglet" style="width: 100%" cellpadding="0" cellspacing="0">
   <tr>
     <td>
@@ -24,6 +25,9 @@
   </tr>
   <tr>
     <td class="conteneur_tab banana">
+{else}
+<div class="banana">
+{/if}
       {foreach from=$errors item=error}
       <p class="error">{$error}</p>
       {/foreach}
@@ -43,7 +47,9 @@
         {include file="banana-thread.inc.tpl" withtitle=true}
       {elseif $page eq 'message'}
         {include file="banana-message.inc.tpl"}
+        {if $withthread}
         {include file="banana-thread.inc.tpl" withtitle=false}
+        {/if}
       {elseif $page eq 'new'}
         {include file="banana-newmessage.inc.tpl"}
       {elseif $page eq 'cancel'}
         {include file=$current_page.template}
       {/if}
       {/if}
+{if $withtabs}
     </td>
   </tr>
 </table>
+{else}
+</div>
+{/if}
 
 {* vim:set et sw=2 sts=2 ts=2 enc=utf-8: *}
index 06ccc7c..979f197 100644 (file)
@@ -6,6 +6,10 @@
 * Copyright: See COPYING files that comes with this distribution
 ********************************************************************************/
 
+.banana {
+    margin-bottom: 1em;
+}
+
 /** GROUP LIST **/
 .banana .grp { text-align: left; }
 .banana .dsc { text-align: left; }