Move the templates required by the core module in the core.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 17 Aug 2008 19:23:53 +0000 (21:23 +0200)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Sun, 17 Aug 2008 19:43:02 +0000 (21:43 +0200)
New methods:
 * PlPage::coreTpl(): same as changeTpl() bug take a tpl from the core
 * PlPage::getCoreTpl(): return the path to a tpl from the core
 * template tag {include core=mycoretpl.tpl ...}

The "bug" handler require cleanup to be really site independent.

Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
15 files changed:
classes/plpage.php
classes/plset.php
classes/pltableeditor.php
include/wiki.engine.inc.php
modules/core.php
templates/403.tpl [new file with mode: 0644]
templates/404.tpl [new file with mode: 0644]
templates/backtrace.tpl [new file with mode: 0644]
templates/bug.tpl [new file with mode: 0644]
templates/csv-importer.tpl [new file with mode: 0644]
templates/plset.tpl [new file with mode: 0644]
templates/plview.multipage.tpl [new file with mode: 0644]
templates/table-editor.tpl [new file with mode: 0644]
templates/wiki.help.tpl [new file with mode: 0644]
templates/wiki.tpl [new file with mode: 0644]

index 175fc05..5309765 100644 (file)
@@ -72,6 +72,26 @@ abstract class PlPage extends Smarty
     }
 
     // }}}
+    // {{{ function getCoreTpl()
+
+    public static function getCoreTpl($tpl)
+    {
+        global $globals;
+        return $globals->spoolroot . '/core/templates/' . $tpl;
+    }
+
+    // }}}
+    // {{{ function coreTpl()
+
+    /** Use a template from the core.
+     */
+    public function coreTpl($tpl, $type = SKINNED)
+    {
+        global $globals;
+        $this->changeTpl(self::getCoreTpl($tpl), $type);
+    }
+
+    // }}}
     // {{{ function raw()
 
     public function raw()
@@ -93,6 +113,7 @@ abstract class PlPage extends Smarty
         $this->register_prefilter('trimwhitespace');
         $this->register_prefilter('form_force_encodings');
         $this->register_prefilter('wiki_include');
+        $this->register_prefilter('core_include');
         $this->register_prefilter('if_has_perms');
         $this->assign('pl_triggers', $this->_errors);
         $this->assign('pl_errors', $this->nb_errs());
@@ -153,7 +174,9 @@ abstract class PlPage extends Smarty
         if ($globals->debug & DEBUG_BT) {
             PlBacktrace::clean();
             $this->assign_by_ref('backtraces', PlBacktrace::$bt);
-            $result = str_replace('@@BACKTRACE@@', $this->fetch('skin/common.backtrace.tpl'), $result);
+            $result = str_replace('@@BACKTRACE@@',
+                                  $this->fetch(self::getCoreTpl('backtrace.tpl')),
+                                  $result);
         } else {
             $result = str_replace('@@BACKTRACE@@', '', $result);
         }
@@ -312,7 +335,7 @@ abstract class PlPage extends Smarty
 
 function escape_xorgDB(&$item, $key)
 {
-    if (is_a($item, 'XOrgDBIterator')) {
+    if ($item instanceof XOrgDBIterator) {
         $expanded = array();
         while ($a = $item->next()) {
             $expanded[] = $a;
@@ -364,32 +387,41 @@ function _to_globals($s) {
 function at_to_globals($tpl_source, &$smarty)
 {
     return preg_replace('/#globals\.([a-zA-Z0-9_.]+?)#/e', '_to_globals(\'\\1\')', $tpl_source);
-                        }
+}
 
-                        // }}}
-                        // {{{  function trimwhitespace
+// }}}
+// {{{  function trimwhitespace
 
-                        function trimwhitespace($source, &$smarty)
-                        {
-                        $tags = '(script|pre|textarea)';
-                        preg_match_all("!<$tags.*?>.*?</(\\1)>!ius", $source, $tagsmatches);
-                        $source = preg_replace("!<$tags.*?>.*?</(\\1)>!ius", "&&&tags&&&", $source);
+function trimwhitespace($source, &$smarty)
+{
+    $tags = '(script|pre|textarea)';
+    preg_match_all("!<$tags.*?>.*?</(\\1)>!ius", $source, $tagsmatches);
+    $source = preg_replace("!<$tags.*?>.*?</(\\1)>!ius", "&&&tags&&&", $source);
 
-                        // remove all leading spaces, tabs and carriage returns NOT
-                        // preceeded by a php close tag.
-                        $source = preg_replace('/((?<!\?>)\n)[\s]+/m', '\1', $source);
-                        $source = preg_replace("!&&&tags&&&!e",  'array_shift($tagsmatches[0])', $source);
+    // remove all leading spaces, tabs and carriage returns NOT
+    // preceeded by a php close tag.
+    $source = preg_replace('/((?<!\?>)\n)[\s]+/m', '\1', $source);
+    $source = preg_replace("!&&&tags&&&!e",  'array_shift($tagsmatches[0])', $source);
 
-                        return $source;
-                        }
+    return $source;
+}
 
-                        // }}}
-                        // {{{ function wiki_include
+// }}}
+// {{{ function wiki_include
 
 function wiki_include($source, &$smarty)
 {
+    global $globals;
     return preg_replace('/\{include( [^}]*)? wiki=([^} ]+)(.*?)\}/ui',
-                        '{include\1 file="../spool/wiki.d/cache_\2.tpl"\3 included=1}',
+                        '{include\1 file="' . $globals->spoolroot . '/spool/wiki.d/cache_\2.tpl"\3 included=1}',
+                        $source);
+}
+
+function core_include($source, &$smarty)
+{
+    global $globals;
+    return preg_replace('/\{include( [^}]*)? core=([^} ]+)(.*?)\}/ui',
+                        '{include\1 file="' . $globals->spoolroot . '/core/templates/\2"\3}',
                         $source);
 }
 
@@ -399,11 +431,11 @@ function wiki_include($source, &$smarty)
 function if_has_perms($source, &$smarty)
 {
     $source = preg_replace('/\{if([^}]*) (\!?)hasPerms\(([^)]+)\)([^}]*)\}/',
-    '{if\1 \2$smarty.session.perms->hasFlagCombination(\3)\4}',
-    $source);
-return preg_replace('/\{if([^}]*) (\!?)hasPerm\(([^)]+)\)([^}]*)\}/',
-       '{if\1 \2($smarty.session.perms && $smarty.session.perms->hasFlag(\3))\4}',
-       $source);
+                           '{if\1 \2$smarty.session.perms->hasFlagCombination(\3)\4}',
+                           $source);
+    return preg_replace('/\{if([^}]*) (\!?)hasPerm\(([^)]+)\)([^}]*)\}/',
+                        '{if\1 \2($smarty.session.perms && $smarty.session.perms->hasFlag(\3))\4}',
+                        $source);
 }
 
 // }}}
index 68a06d5..40183b7 100644 (file)
@@ -164,7 +164,7 @@ class PlSet
         if (!isset($args['rechercher'])) {
             $args['rechercher'] = 'Chercher';
         }
-        $page->changeTpl('core/plset.tpl');
+        $page->coreTpl('plset.tpl');
         $page->assign('plset_base', $baseurl);
         $page->assign('plset_mods', $this->mods);
         $page->assign('plset_mod', $this->mod);
@@ -291,7 +291,7 @@ abstract class MultipageView implements PlView
         $page->assign_by_ref('set', $res);
         $count = $this->set->count();
         $this->pages = intval(ceil($count / $this->entriesPerPage));
-        return 'include/plview.multipage.tpl';
+        return PlPage::getCoreTpl('plview.multipage.tpl');
     }
 
     public function args()
index d364d0e..b2fd2aa 100644 (file)
@@ -190,7 +190,7 @@ class PLTableEditor
     // call when done
     public function apply(PlPage &$page, $action, $id = false)
     {
-        $page->changeTpl('core/table-editor.tpl');
+        $page->coreTpl('table-editor.tpl');
         $list = true;
         if ($action == 'delete') {
             S::assert_xsrf_token();
index c1cbcba..b65abe0 100644 (file)
@@ -77,7 +77,7 @@ if (Env::v('action') || !$cache_exists) {
 $wiki_exists = file_exists($wp->filename());
 
 $page =& Platal::page();
-$page->changeTpl('core/wiki.tpl');
+$page->coreTpl('wiki.tpl');
 
 if ($feed) {
     $wikiAll = str_replace('dc:contributor', 'author', $wikiAll);
@@ -99,7 +99,7 @@ if ($feed) {
         $wikiAll = "<p>La page de wiki $n n'existe pas. "
                  . "Il te suffit de <a href='" . str_replace('.', '/', $n) . "?action=edit'>l'éditer</a></p>";
     } else {
-        $page->changeTpl('core/404.tpl');
+        $page->coreTpl('404.tpl');
     }
 }
 
index b92761c..d025c4a 100644 (file)
@@ -51,14 +51,14 @@ class CoreModule extends PLModule
     {
         global $globals;
         header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden');
-        $page->changeTpl('core/403.tpl');
+        $page->coreTpl('403.tpl');
     }
 
     function handler_404(&$page)
     {
         global $globals, $platal;
         header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
-        $page->changeTpl('core/404.tpl');
+        $page->coreTpl('404.tpl');
         $page->assign('near', $platal->near_hook());
     }
 
@@ -134,7 +134,7 @@ class CoreModule extends PLModule
             $location = $_SERVER['HTTP_REFERER'];
         }
 
-        $page->changeTpl('core/bug.tpl', SIMPLE);
+        $page->coreTpl('bug.tpl', SIMPLE);
         $page->assign('location', $location);
         $page->addJsLink('close_on_esc.js');
 
@@ -162,7 +162,7 @@ class CoreModule extends PLModule
 
     function handler_wiki_help(&$page, $action = 'title')
     {
-        $page->changeTpl('core/wiki.help.tpl', SIMPLE);
+        $page->coreTpl('wiki.help.tpl', SIMPLE);
         $page->assign('wiki_help', MiniWiki::help($action == 'title'));
     }
 
diff --git a/templates/403.tpl b/templates/403.tpl
new file mode 100644 (file)
index 0000000..aeea268
--- /dev/null
@@ -0,0 +1,25 @@
+{**************************************************************************}
+{*                                                                        *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
+{*  http://opensource.polytechnique.org/                                  *}
+{*                                                                        *}
+{*  This program is free software; you can redistribute it and/or modify  *}
+{*  it under the terms of the GNU General Public License as published by  *}
+{*  the Free Software Foundation; either version 2 of the License, or     *}
+{*  (at your option) any later version.                                   *}
+{*                                                                        *}
+{*  This program is distributed in the hope that it will be useful,       *}
+{*  but WITHOUT ANY WARRANTY; without even the implied warranty of        *}
+{*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *}
+{*  GNU General Public License for more details.                          *}
+{*                                                                        *}
+{*  You should have received a copy of the GNU General Public License     *}
+{*  along with this program; if not, write to the Free Software           *}
+{*  Foundation, Inc.,                                                     *}
+{*  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA               *}
+{*                                                                        *}
+{**************************************************************************}
+
+<h1 class="erreur">Tu n'as pas les permissions nécessaires pour accéder à cette page.</h1>
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
diff --git a/templates/404.tpl b/templates/404.tpl
new file mode 100644 (file)
index 0000000..a606b54
--- /dev/null
@@ -0,0 +1,30 @@
+{**************************************************************************}
+{*                                                                        *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
+{*  http://opensource.polytechnique.org/                                  *}
+{*                                                                        *}
+{*  This program is free software; you can redistribute it and/or modify  *}
+{*  it under the terms of the GNU General Public License as published by  *}
+{*  the Free Software Foundation; either version 2 of the License, or     *}
+{*  (at your option) any later version.                                   *}
+{*                                                                        *}
+{*  This program is distributed in the hope that it will be useful,       *}
+{*  but WITHOUT ANY WARRANTY; without even the implied warranty of        *}
+{*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *}
+{*  GNU General Public License for more details.                          *}
+{*                                                                        *}
+{*  You should have received a copy of the GNU General Public License     *}
+{*  along with this program; if not, write to the Free Software           *}
+{*  Foundation, Inc.,                                                     *}
+{*  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA               *}
+{*                                                                        *}
+{**************************************************************************}
+
+<h1 class="erreur">Cette page n'existe pas !!!</h1>
+
+{if $near}
+<p>L'adresse suivante semble correspondre à ta demande&nbsp;:<br />
+{icon name="lightbulb" title="Cherchais-tu ?"} <a href="{$globals->baseurl}/{$near}">{$globals->baseurl}/{$near}</a>
+</p>
+{/if}
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
diff --git a/templates/backtrace.tpl b/templates/backtrace.tpl
new file mode 100644 (file)
index 0000000..7df0dee
--- /dev/null
@@ -0,0 +1,80 @@
+{**************************************************************************}
+{*                                                                        *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
+{*  http://opensource.polytechnique.org/                                  *}
+{*                                                                        *}
+{*  This program is free software; you can redistribute it and/or modify  *}
+{*  it under the terms of the GNU General Public License as published by  *}
+{*  the Free Software Foundation; either version 2 of the License, or     *}
+{*  (at your option) any later version.                                   *}
+{*                                                                        *}
+{*  This program is distributed in the hope that it will be useful,       *}
+{*  but WITHOUT ANY WARRANTY; without even the implied warranty of        *}
+{*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *}
+{*  GNU General Public License for more details.                          *}
+{*                                                                        *}
+{*  You should have received a copy of the GNU General Public License     *}
+{*  along with this program; if not, write to the Free Software           *}
+{*  Foundation, Inc.,                                                     *}
+{*  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA               *}
+{*                                                                        *}
+{**************************************************************************}
+
+{foreach from=$backtraces key=bt_name item=trace}
+<div class="backtrace">
+  <h1>
+    {if $trace->error}<span style="color: #f00">{/if}
+    Exécution de {$bt_name}&nbsp;: {$trace->traces|@count} actions en {$trace->totaltime|string_format:"%.3f"}s (hover-me pour la trace)
+    {if $trace->error}</span>{/if}
+  </h1>
+  <div class="hide">
+{foreach item=query from=$trace->traces}
+{if $query.data}
+{assign var=cols value=$query.data[0]|@count}
+{else}
+{assign var=cols value=1}
+{/if}
+<table class="bicol" style="width: 75%; font-size: smaller; margin-left:2px; margin-top: 3px;">
+  <tr class="impair">
+    <td colspan="{$cols}">
+      <strong>ACTION:</strong>
+      <pre style="padding: 0; margin: 0;">{$query.action}</pre>
+      <br/>
+    </td>
+  </tr>
+  {if $query.error}
+  <tr>
+    <td colspan="{$cols}">
+      <strong style="color: #f00">ERROR:</strong><br />
+      {$query.error|nl2br}
+    </td>
+  </tr>
+  {else}
+  <tr>
+    <td colspan="{$cols}">
+      <strong>INFO:</strong><br />
+      {$query.rows} ligne{if $query.rows > 1}s{/if} en {$query.exectime|string_format:"%.3f"}s
+    </td>
+  </tr>
+  {/if}
+{if $query.data}
+  <tr>
+    {foreach key=key item=item from=$query.data[0]}
+    <th style="font-size: smaller">{$key}</th>
+    {/foreach}
+  </tr>
+  {foreach item=data_row from=$query.data}
+  <tr class="impair">
+    {foreach item=item from=$data_row}
+    <td class="center" style="font-size: smaller">{$item}</td>
+    {/foreach}
+  </tr>
+  {/foreach}
+{/if}
+</table>
+{/foreach}
+</div>
+</div>
+{/foreach}
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
diff --git a/templates/bug.tpl b/templates/bug.tpl
new file mode 100644 (file)
index 0000000..568274d
--- /dev/null
@@ -0,0 +1,86 @@
+{**************************************************************************}\r
+{*                                                                        *}\r
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}\r
+{*  http://opensource.polytechnique.org/                                  *}\r
+{*                                                                        *}\r
+{*  This program is free software; you can redistribute it and/or modify  *}\r
+{*  it under the terms of the GNU General Public License as published by  *}\r
+{*  the Free Software Foundation; either version 2 of the License, or     *}\r
+{*  (at your option) any later version.                                   *}\r
+{*                                                                        *}\r
+{*  This program is distributed in the hope that it will be useful,       *}\r
+{*  but WITHOUT ANY WARRANTY; without even the implied warranty of        *}\r
+{*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *}\r
+{*  GNU General Public License for more details.                          *}\r
+{*                                                                        *}\r
+{*  You should have received a copy of the GNU General Public License     *}\r
+{*  along with this program; if not, write to the Free Software           *}\r
+{*  Foundation, Inc.,                                                     *}\r
+{*  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA               *}\r
+{*                                                                        *}\r
+{**************************************************************************}\r
+\r
+<script type="text/javascript">//<![CDATA[\r
+{literal}\r
+var edited=false;\r
+\r
+function cleanContent()\r
+{\r
+  if (edited == false) {\r
+    var field = document.getElementById('flyspray_detail');\r
+    field.value = '';\r
+    field.style.color = "black";\r
+    field.style.textAlign = "left";\r
+  }\r
+}\r
+\r
+function fillContent()\r
+{\r
+  var field = document.getElementById('flyspray_detail');\r
+  if (field.value == '' || (field.value.toUpperCase() == field.value && field.value.toLowerCase() == field.value)) {\r
+    field.value = "** Explique ici le problème ou l'amélioration proposée **";\r
+    field.style.color = "gray";\r
+    field.style.textAlign = "center";\r
+    edited = false;\r
+  } else {\r
+    edited = true;\r
+  }\r
+}\r
+{/literal}\r
+//]]></script>\r
+\r
+<div style="width:800px;height:600px">\r
+{if $bug_sent}\r
+<p class="erreur">\r
+  Ton message a bien été envoyé au support de {#globals.core.sitename#}, tu devrais en\r
+  recevoir une copie d'ici quelques minutes. Nous allons le traiter et y répondre\r
+  dans les plus brefs délais.\r
+</p>\r
+\r
+<div class="center"><input type="submit" onclick="window.close()" name="close" value="Fermer" /></div>\r
+{else}\r
+<form action="send_bug" method="post" onsubmit="cleanContent()">\r
+  {xsrf_token_field}\r
+  <h1>Signaler un bug ou demander une amélioration</h1>\r
+  <div style="margin-left:10%;margin-right:10%">\r
+    <select name="task_type">\r
+      <option value="bug">Erreur</option>\r
+      <option value="wish">Souhait</option>\r
+      <option value="help">Aide/Dépannage</option>\r
+    </select>\r
+    &nbsp;&nbsp;Sujet&nbsp;: <input type="text" name="item_summary" id="flyspray_title" value="sur la page { $location }" size="50" maxlength="100"/>\r
+    <textarea name="detailed_desc" id="flyspray_detail" cols="70" rows="10" style="width:100%;margin-top:10px;margin-bottom:10px;height:400px;display:block;" onFocus="cleanContent()" onBlur="fillContent()"></textarea>\r
+    <input type="hidden" name="page" value="{$smarty.server.HTTP_REFERER|default:$smarty.request.page}" />\r
+    <div class="center">\r
+      <input type="button" value="Abandonner" onclick="window.close()"/>\r
+      <input type="submit" name="send" value="Envoyer"/>\r
+    </div>\r
+  </div>\r
+</form>\r
+<script type="text/javascript">\r
+  fillContent();\r
+</script>\r
+</div>\r
+{/if}\r
+\r
+{* vim:set et sws=2 sts=2 sw=2 enc=utf-8: *}\r
diff --git a/templates/csv-importer.tpl b/templates/csv-importer.tpl
new file mode 100644 (file)
index 0000000..0660a2c
--- /dev/null
@@ -0,0 +1,243 @@
+{**************************************************************************}
+{*                                                                        *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
+{*  http://opensource.polytechnique.org/                                  *}
+{*                                                                        *}
+{*  This program is free software; you can redistribute it and/or modify  *}
+{*  it under the terms of the GNU General Public License as published by  *}
+{*  the Free Software Foundation; either version 2 of the License, or     *}
+{*  (at your option) any later version.                                   *}
+{*                                                                        *}
+{*  This program is distributed in the hope that it will be useful,       *}
+{*  but WITHOUT ANY WARRANTY; without even the implied warranty of        *}
+{*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *}
+{*  GNU General Public License for more details.                          *}
+{*                                                                        *}
+{*  You should have received a copy of the GNU General Public License     *}
+{*  along with this program; if not, write to the Free Software           *}
+{*  Foundation, Inc.,                                                     *}
+{*  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA               *}
+{*                                                                        *}
+{**************************************************************************}
+
+{if $form_title}
+<h1>{$form_title}</h1>
+{/if}
+
+<script type="text/javascript">//<![CDATA[
+{literal}
+  function showValue(key, box)
+  {
+    var span_value = document.getElementById('csv_user_value_span[' + key + ']');
+    var span_cond  = document.getElementById('csv_cond_value_span[' + key + ']');
+    var i    = box.selectedIndex;
+    if (box.options[i].value == "user_value") {
+      span_value.style.display = "";
+      span_cond.style.display = "none";
+    } else if(box.options[i].value == "cond_value") {
+      span_value.style.display = "none";
+      span_cond.style.display = "";
+    } else {
+      span_value.style.display = "none";
+      span_conf.style.display = "none";
+    }
+  }
+  function showCond(key, box)
+  {
+    var line = document.getElementById('csv_cond_value[' + key + ']');
+    var i    = box.selectedIndex;
+    if (box.options[i].value == "defined") {
+      line.style.display = "none";
+    } else {
+      line.style.display = "";
+    }
+  }
+  function gotoPage(page)
+  {
+    document.getElementById('csv_next_page').value = page;
+    document.getElementById('csv_form').submit();
+    return false;
+  }
+{/literal}
+//]]></script>
+<form action="{$csv_path}" method="post" id="csv_form">
+  {xsrf_token_field}
+  <div class="center" style="padding-bottom: 1em">
+    Import d'un CSV&nbsp;:
+    {if $csv_page eq 'source'}
+    <span class="erreur">Choisir la source</span>
+    {else}
+    <a href="{$csv_path}" onclick="return gotoPage('source');">Choisir la source</a>
+    {/if}
+    »
+    {if $csv_page eq 'values'}
+    <span class="erreur">Définir les valeurs</span>
+    {elseif $smarty.session.csv}
+    <a href="{$csv_path}" onclick="return gotoPage('values');">Définir les valeurs</a>
+    {else}
+    Définir les valeurs
+    {/if}
+    »
+    {if $csv_page eq 'valid'}
+    <span class="erreur">Vérifier et valider</span>
+    {elseif $csv_action}
+    <a href="{$csv_path}" onclick="return gotoPage('valid');">Vérifier et valider</a>
+    {else}
+    Vérifier et valider
+    {/if}
+  </div>
+  {if $csv_page eq 'source'}
+  <div>
+    <textarea name="csv_source" rows="20" cols="80">{$smarty.session.csv|default:$smarty.session.csv_source}</textarea><br />
+    Entrez les données sous la forme suivante (avec
+    <input type="text" name="csv_separator" value="{$smarty.session.csv_separator|default:";"}" maxlength="1" size="1" />
+    comme séparateur)&nbsp;:<br/>
+    <pre class="center">TITRE1{$smarty.session.csv_separator|default:";"}TITRE2{$smarty.session.csv_separator|default:";"}...
+val1_1{$smarty.session.csv_separator|default:";"}val1_2{$smarty.session.csv_separator|default:";"}...
+val2_1{$smarty.session.csv_separator|default:";"}val2_2{$smarty.session.csv_separator|default:";"}...
+val3_1{$smarty.session.csv_separator|default:";"}val3_2{$smarty.session.csv_separator|default:";"}...</pre>
+  </div>
+  {elseif $csv_page eq 'values'}
+  <div class="center">
+    Action à effectuer si l'entrée existe&nbsp;: 
+    <select name="csv_action" onchange="this.form.submit()">
+      <option value="insert" {if $smarty.session.csv_action eq 'insert'}selected="selected"{/if}>
+        ne rien faire
+      </option>
+      <option value="replace" {if $smarty.session.csv_action eq 'replace'}selected="selected"{/if}>
+        remplacer par la nouvelle entrée
+      </option>
+      {if $csv_key}
+      <option value="update" {if $smarty.session.csv_action eq 'update'}selected="selected"{/if}>
+        mettre à jour les champs sélectionnés
+      </option>
+      {/if}
+    </select>
+  </div>
+  <table class="bicol">
+    <tr>
+      <th>Champ</th>
+      <th colspan="2">Valeur</th>
+      {if $smarty.session.csv_action eq 'update'}
+      <th>MàJ</th>
+    {/if}
+    </tr>
+    {foreach from=$csv_fields item=f}
+    <tr class="{cycle values="pair,impair"}">
+      <td>{$csv_field_desc[$f]|default:$f}</td>
+      <td>
+        <select name="csv_value[{$f}]" onchange="showValue('{$f}', this);">
+          <option value="" {if !$smarty.session.csv_value[$f]}selected="selected"{/if}>
+            Vide
+          </option>
+          <option value="user_value" {if $smarty.session.csv_value[$f] eq "user_value"}selected="selected"{/if}>
+            Entrer la valeur
+          </option>
+          <option value="cond_value" {if $smarty.session.csv_value[$f] eq "cond_value"}selected="selected"{/if}>
+            Valeur conditionnelle
+          </option>
+          <optgroup label="Colonnes du CSV">
+            {foreach from=$csv_index item=col}
+            <option value="{$col}" {if $smarty.session.csv_value[$f] eq $col}selected="selected"{/if}>{$col}</option>
+            {/foreach}
+          </optgroup>
+          {if $csv_functions|count}
+          <optgroup label="Fonctions">
+            {foreach from=$csv_functions key=func item=desc}
+            <option value="{$func}" {if $smarty.session.csv_value[$f] eq $func}selected="selected"{/if}>{$desc.desc}</option>
+            {/foreach}
+          </optgroup>
+          {/if}
+        </select>
+      </td>
+      <td>
+        <span id="csv_user_value_span[{$f}]" {if $smarty.session.csv_value[$f] neq "user_value"}style="display: none"{/if}>
+          <input type="text" name="csv_user_value[{$f}]" value="{$smarty.session.csv_user_value[$f]}" />
+        </span>
+        <span id="csv_cond_value_span[{$f}]" {if $smarty.session.csv_value[$f] neq "cond_value"}style="display: none"{/if}>
+          Si
+          <select name="csv_cond_field[{$f}]">
+            {foreach from=$csv_index item=col}
+            <option value="{$col}" {if $smarty.session.csv_cond_field_value[$f] eq $col}selected="selected"{/if}>
+              {$col}
+            </option>
+            {/foreach}
+          </select>
+          <select name="csv_cond[{$f}]" onchange="showCond('{$f}', this)">
+            <option value="defined" {if $smarty.session.csv_cond[$f] eq "defined"}selected="selected"{/if}>
+              défini
+            </option>
+            <option value="equals" {if $smarty.session.csv_cond[$f] eq "equals"}selected="selected"{/if}>
+              est égale à
+            </option>
+            <option value="contains" {if $smarty.session.csv_cond[$f] eq "contains"}selected="selected"{/if}>
+              contient
+            </option>
+            <option value="contained" {if $smarty.session.csv_cond[$f] eq "contained"}selected="selected"{/if}>
+              est contenu dans
+            </option>
+            <option value="greater" {if $smarty.session.csv_cond[$f] eq "greater"}selected="selected"{/if}>
+              supérieur à
+            </option>
+            <option value="greater_or_equal" {if $smarty.session.csv_cond[$f] eq "greater_or_equal"}selected="selected"{/if}>
+              supérieur ou égal à
+            </option>
+            <option value="lower" {if $smarty.session.csv_cond[$f] eq "lower"}selected="selected"{/if}>
+              inférieur à
+            </option>
+            <option value="lower_or_equal" {if $smarty.session.csv_cond[$f] eq "lower_or_equal"}selected="selected"{/if}>
+              inférieur ou égal à
+            </option>
+          </select>
+          <span id="csv_cond_value[{$f}]" {if $smarty.session.csv_cond[$f] eq "defined" || !$smarty.session.csv_cond[$f]}style="display: none"{/if}>
+            <input type="text" name="csv_cond_value[{$f}]" value="{$smarty.session.csv_cond_value[$f]}" />
+          </span>
+          <br />Alors <input type="text" name="csv_cond_then[{$f}]" value="{$smarty.session.csv_cond_then[$f]}" />
+          <br />Sinon <input type="text" name="csv_cond_else[{$f}]" value="{$smarty.session.csv_cond_else[$f]}" />
+        </span>
+      </td>
+      {if $smarty.session.csv_action eq 'update'}
+      <td class="center">
+        <input type="checkbox" name="csv_update[{$f}]" {if $smarty.session.csv_update[$f]}checked="checked"{/if} />
+      </td>
+      {/if}
+    </tr>
+    {/foreach}
+  </table>
+  {elseif $csv_page eq 'valid'}
+  {if !$csv_done}
+  <table class="bicol">
+    <tr>
+      {foreach from=$csv_fields item=f}
+      <th>{$csv_field_desc[$f]|default:$f}</th>
+      {/foreach}
+    </tr>
+    {foreach from=$csv_preview item=assoc}
+    <tr class="{cycle values="pair,impair"}">
+      {foreach from=$csv_fields item=f}
+      <td>{$assoc[$f]}</td>
+      {/foreach}
+    <tr>
+    {/foreach}
+  </table>
+  {else}
+  Les données ont été ajoutées.
+  {/if}
+  {/if}
+
+  {if !$csv_done}
+  <div class="center">
+    <input type="hidden" name="csv_page" value="{$csv_page}" />
+    <input type="hidden" id="csv_next_page" name="csv_next_page" value="{$csv_page}" />
+    {if $csv_page eq 'source'}
+    <input type="submit" name="csv_valid" value="Changer le CSV" />
+    {elseif $csv_page eq 'values'}
+    <input type="submit" name="csv_valid" value="Aperçu" />
+    {elseif $csv_page eq 'valid'}
+    <input type="submit" name="csv_valid" value="Valider" />
+    {/if}
+  </div>
+  {/if}
+</form>
+
+{* vim:set et sws=2 sts=2 sw=2 enc=utf-8: *}
diff --git a/templates/plset.tpl b/templates/plset.tpl
new file mode 100644 (file)
index 0000000..a0e4de1
--- /dev/null
@@ -0,0 +1,53 @@
+{**************************************************************************}
+{*                                                                        *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
+{*  http://opensource.polytechnique.org/                                  *}
+{*                                                                        *}
+{*  This program is free software; you can redistribute it and/or modify  *}
+{*  it under the terms of the GNU General Public License as published by  *}
+{*  the Free Software Foundation; either version 2 of the License, or     *}
+{*  (at your option) any later version.                                   *}
+{*                                                                        *}
+{*  This program is distributed in the hope that it will be useful,       *}
+{*  but WITHOUT ANY WARRANTY; without even the implied warranty of        *}
+{*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *}
+{*  GNU General Public License for more details.                          *}
+{*                                                                        *}
+{*  You should have received a copy of the GNU General Public License     *}
+{*  along with this program; if not, write to the Free Software           *}
+{*  Foundation, Inc.,                                                     *}
+{*  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA               *}
+{*                                                                        *}
+{**************************************************************************}
+
+<div id="pl_set_top" style="clear: both">
+<h1 style="display: block; float: left">
+  {$plset_mods[$plset_mod]}
+  {if $plset_mods|@count > 1}[
+  {assign var=has_prev value=false}
+  {foreach from=$plset_mods key=mod item=desc name=mods}
+    {if $mod neq $plset_mod}
+    {if $has_prev}| {/if}
+    <a href="{$platal->ns}{$plset_base}/{$mod}{$plset_search}#pl_set_top">{$desc}</a>
+    {assign var=has_prev value=true}
+    {/if}
+  {/foreach}
+  ]
+  {/if}
+</h1>
+<h1 style="display: block; float: right"> 
+  {if !$plset_count} 
+  Aucune entrée 
+  {elseif $plset_count eq 1} 
+  1 entrée 
+  {else} 
+  {$plset_count} entrées 
+  {/if} 
+</h1> 
+</div>
+
+<div id="plset_content" style="clear: both">
+{include file=$plset_content}
+</div>
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
diff --git a/templates/plview.multipage.tpl b/templates/plview.multipage.tpl
new file mode 100644 (file)
index 0000000..edd3313
--- /dev/null
@@ -0,0 +1,84 @@
+{**************************************************************************}
+{*                                                                        *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
+{*  http://opensource.polytechnique.org/                                  *}
+{*                                                                        *}
+{*  This program is free software; you can redistribute it and/or modify  *}
+{*  it under the terms of the GNU General Public License as published by  *}
+{*  the Free Software Foundation; either version 2 of the License, or     *}
+{*  (at your option) any later version.                                   *}
+{*                                                                        *}
+{*  This program is distributed in the hope that it will be useful,       *}
+{*  but WITHOUT ANY WARRANTY; without even the implied warranty of        *}
+{*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *}
+{*  GNU General Public License for more details.                          *}
+{*                                                                        *}
+{*  You should have received a copy of the GNU General Public License     *}
+{*  along with this program; if not, write to the Free Software           *}
+{*  Foundation, Inc.,                                                     *}
+{*  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA               *}
+{*                                                                        *}
+{**************************************************************************}
+
+{capture name=pages}
+{if $plview->pages > 1}
+  {if $show_bounds}<div style="float: right"><small><strong>[{$first} - {$last}]&nbsp;</strong></small></div>{/if}
+<div class="center pages" style="float: left">
+  {if $plview->page neq 1}
+  <a href="{$platal->pl_self()}{$plset_search}order={$order}&amp;page=1#pl_set_top">{icon name=resultset_first title="Première page"}</a>{*
+  *}<a href="{$platal->pl_self()}{$plset_search}order={$order}&amp;page={$plview->page-1}#pl_set_top">{icon name=resultset_previous title="Page précédente"}</a>
+  {else}
+  {icon name=null title=""}{icon name=null title=""}
+  {/if}
+  {section name=page loop=$plview->pages+1 start=1}
+  {if $smarty.section.page.index eq $plview->page}
+  <span style="color: red">{$plview->page}</span> 
+  {else}
+  <a href="{$platal->pl_self()}{$plset_search}order={$order}&amp;page={$smarty.section.page.index}#pl_set_top">{$smarty.section.page.index}</a>
+  {/if}
+  {/section}
+  {if $plview->page neq $plview->pages}
+  <a href="{$platal->pl_self()}{$plset_search}order={$order}&amp;page={$plview->page+1}#pl_set_top">{icon name=resultset_next title="Page suivante"}</a>{*
+  *}<a href="{$platal->pl_self()}{$plset_search}order={$order}&amp;page={$plview->pages}#pl_set_top">{icon name=resultset_last title="Dernière page"}</a>
+  {else}
+  {icon name=null title=""}{icon name=null title=""}
+  {/if}
+</div>
+{/if}
+{/capture}
+
+{capture name=order}
+{if $plset_count > 1}
+<div style="clear: both">
+  Trier par&nbsp;:
+  {foreach from=$orders key=name item=sort}
+  [
+  {if $name eq $order}
+  <img src='images/dn.png' alt='tri ascendant' />
+  <a href="{$platal->pl_self()}{$plset_search}order=-{$name}#pl_set_top">{$sort.desc}</a>
+  {elseif $order eq "-$name"}
+  <img src='images/up.png' alt='tri ascendant' />
+  <a href="{$platal->pl_self()}{$plset_search}order={$name}#pl_set_top">{$sort.desc}</a>
+  {else}
+  <a href="{$platal->pl_self()}{$plset_search}order={$name}#pl_set_top">{$sort.desc}</a>
+  {/if}
+  ]&nbsp;
+  {/foreach}
+</div>
+{/if}
+{/capture}
+
+
+{$smarty.capture.order|smarty:nodefaults}
+
+{$smarty.capture.pages|smarty:nodefaults}
+
+<div id="multipage_content" style="padding: 0.5em 0; clear: both">
+  {include file=$plview->templateName()}
+</div>
+
+{$smarty.capture.pages|smarty:nodefaults}<br />
+
+{$smarty.capture.order|smarty:nodefaults}
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
diff --git a/templates/table-editor.tpl b/templates/table-editor.tpl
new file mode 100644 (file)
index 0000000..e16826e
--- /dev/null
@@ -0,0 +1,160 @@
+{**************************************************************************}
+{*                                                                        *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
+{*  http://opensource.polytechnique.org/                                  *}
+{*                                                                        *}
+{*  This program is free software; you can redistribute it and/or modify  *}
+{*  it under the terms of the GNU General Public License as published by  *}
+{*  the Free Software Foundation; either version 2 of the License, or     *}
+{*  (at your option) any later version.                                   *}
+{*                                                                        *}
+{*  This program is distributed in the hope that it will be useful,       *}
+{*  but WITHOUT ANY WARRANTY; without even the implied warranty of        *}
+{*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *}
+{*  GNU General Public License for more details.                          *}
+{*                                                                        *}
+{*  You should have received a copy of the GNU General Public License     *}
+{*  along with this program; if not, write to the Free Software           *}
+{*  Foundation, Inc.,                                                     *}
+{*  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA               *}
+{*                                                                        *}
+{**************************************************************************}
+
+
+<h1>{$title}</h1>
+
+{if $list}
+<script type="text/javascript">
+       {literal}
+       function redirect(a) {
+               document.location = a;
+       }
+       {/literal}
+</script>
+<table class="bicol">
+<tr>
+  {foreach from=$t->vars item=myval key=myvar}{if $myval.display}
+    <th style="cursor:pointer" onclick="redirect('{$t->pl}/sort{if $t->sortfield eq $myvar && !$t->sortdesc}desc{/if}/{$myvar}')">{$myval.desc}{if $t->sortfield eq $myvar}{if $t->sortdesc}{icon name="bullet_arrow_down"}{else}{icon name="bullet_arrow_up"}{/if}{/if}</th>
+  {/if}{/foreach}
+  {if !$hideactions}
+  <th>action</th>
+  {/if}
+</tr>
+{if !$readonly}
+<tr class="impair">
+  <td colspan="{$t->nbfields}">
+    <strong>
+      Nouvelles entrées&nbsp;: <a href="{$t->pl}/new">Manuellement</a> &bull; <a href="{$t->pl}/massadd">Depuis un CSV</a>
+    </strong>
+  </td>
+  <td class="right">
+    <a href="{$t->pl}/new">{icon name=add title='nouvelle entrée'}</a>
+  </td>
+</tr>
+{/if}
+{iterate from=$list item=myrow}
+<tr class="{cycle values="pair,impair"}">
+{foreach from=$t->vars item=myval}{if $myval.display}
+  <td>
+    {assign var="myfield" value=$myval.Field}
+    {if $myfield eq $t->idfield}
+        {assign var="idval" value=$myrow.$myfield}
+    {/if}
+    {if $myval.Type eq 'timestamp'}
+      <span class="smaller">{$myrow.$myfield|date_format:"%x %X"}</span>
+    {elseif $myval.Type eq 'checkbox'}
+      <input type="checkbox" disabled="disabled"{if $myrow.$myfield} checked="checked"{/if}/>
+    {elseif $myval.Type eq 'ip_address'}
+      {$myrow.$myfield|uint_to_ip}
+    {else}
+      {$myrow.$myfield}
+    {/if}
+  </td>
+{/if}{/foreach}
+  {if !$hideactions}
+  <td class="action">
+    {if !$readonly}
+    <a href="{$t->pl}/edit/{$idval}">{icon name=page_edit title='éditer'}</a>
+    <a href="{$t->pl}/delete/{$idval}?token={xsrf_token}">{icon name=delete title='supprimer'}</a>
+    {/if}
+  </td>
+  {/if}
+</tr>
+{/iterate}
+</table>
+
+{if ($p_prev > -1) || ($p_next > -1)}
+<p class="pagenavigation">
+{if $p_prev > -1}<a href="{$platal->path}?start={$p_prev}">{$msg_previous_page}</a>&nbsp;{/if}
+{if $p_next > -1}<a href="{$platal->path}?start={$p_next}">{$msg_next_page}</a>{/if}
+</p>
+{/if}
+
+{elseif $massadd}
+{include core=csv-importer.tpl}
+
+<p>
+<a href="{$t->pl}">back</a>
+</p>
+
+{else}
+
+<form method="post" action="{$t->pl}/update/{$id}">
+  {xsrf_token_field}
+  <table class="bicol">
+    <tr class="impair">
+      <th colspan="2">
+        {if $id}
+            modification de l'entrée 
+        {else}
+            nouvelle entrée
+        {/if}
+      </th>
+    </tr>
+    {foreach from=$t->vars item=myval}{assign var="myfield" value=$myval.Field}{if ($myfield neq $t->idfield) or ($t->idfield_editable)}
+    <tr class="{cycle values="pair,impair"}">
+      <td>
+        <strong>{$myval.desc}</strong>
+      </td>
+      <td>
+        {if $myval.Type eq 'set'}
+          <select name="{$myfield}[]" multiple="multiple">
+            {foreach from=$myval.List item=option}
+              <option value="{$option}" {if $entry.$myfield.$option}selected="selected"{/if}>{$option}</option>
+            {/foreach}
+          </select>
+        {elseif $myval.Type eq 'enum'}
+          <select name="{$myfield}">
+            {foreach from=$myval.List item=option}
+              <option value="{$option}" {if $entry.$myfield eq $option}selected="selected"{/if}>{$option}</option>
+            {/foreach}
+          </select>
+        {elseif ($myval.Type eq 'textarea') or ($myval.Type eq 'varchar200')}
+          <textarea name="{$myfield}" rows="{if $myval.Type eq 'varchar200'}3{else}10{/if}" cols="70">{$entry.$myfield}</textarea>
+        {elseif ($myval.Type eq 'checkbox')}
+          <input type="checkbox" name="{$myfield}" value="{$myval.Value}"{if $entry.$myfield} checked="checked"{/if}/>
+        {else}
+          <input type="text" name="{$myfield}" value="{$entry.$myfield}" {if $myval.Size}size="{$myval.Size}" maxlength="{$myval.Maxlength}"{/if}/>
+          {if $myval.Type eq 'timestamp'}<em>jj/mm/aaaa hh:mm:ss</em>{/if}
+          {if $myval.Type eq 'date'}<em>jj/mm/aaaa</em>{/if}
+          {if $myval.Type eq 'time'}<em>hh:mm:ss</em>{/if}
+        {/if}
+      </td>
+    </tr>
+    {/if}{/foreach}
+  </table>
+
+  <p class="center">
+  <input type="submit" value="enregistrer" />
+  </p>
+
+</form>
+
+<p>
+<a href="{$t->pl}">back</a>
+</p>
+
+{/if}
+
+
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
diff --git a/templates/wiki.help.tpl b/templates/wiki.help.tpl
new file mode 100644 (file)
index 0000000..216c6d9
--- /dev/null
@@ -0,0 +1,35 @@
+{**************************************************************************}
+{*                                                                        *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
+{*  http://opensource.polytechnique.org/                                  *}
+{*                                                                        *}
+{*  This program is free software; you can redistribute it and/or modify  *}
+{*  it under the terms of the GNU General Public License as published by  *}
+{*  the Free Software Foundation; either version 2 of the License, or     *}
+{*  (at your option) any later version.                                   *}
+{*                                                                        *}
+{*  This program is distributed in the hope that it will be useful,       *}
+{*  but WITHOUT ANY WARRANTY; without even the implied warranty of        *}
+{*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *}
+{*  GNU General Public License for more details.                          *}
+{*                                                                        *}
+{*  You should have received a copy of the GNU General Public License     *}
+{*  along with this program; if not, write to the Free Software           *}
+{*  Foundation, Inc.,                                                     *}
+{*  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA               *}
+{*                                                                        *}
+{**************************************************************************}
+
+<h1>Syntaxe wiki</h1>
+
+<table class="bicol">
+  <tr><th>Syntaxe</th><th>Apparence</th></tr>
+  {foreach from=$wiki_help key=syntax item=html}
+  <tr class="{cycle values="pair,impair"}">
+    <td>{$syntax|nl2br}</td>
+    <td>{$html|smarty:nodefaults}</td>
+  </tr>
+  {/foreach}
+</table>
+
+{* vim:set et sws=2 sts=2 sw=2 enc=utf-8: *}
diff --git a/templates/wiki.tpl b/templates/wiki.tpl
new file mode 100644 (file)
index 0000000..8a76fa3
--- /dev/null
@@ -0,0 +1,64 @@
+{**************************************************************************}
+{*                                                                        *}
+{*  Copyright (C) 2003-2008 Polytechnique.org                             *}
+{*  http://opensource.polytechnique.org/                                  *}
+{*                                                                        *}
+{*  This program is free software; you can redistribute it and/or modify  *}
+{*  it under the terms of the GNU General Public License as published by  *}
+{*  the Free Software Foundation; either version 2 of the License, or     *}
+{*  (at your option) any later version.                                   *}
+{*                                                                        *}
+{*  This program is distributed in the hope that it will be useful,       *}
+{*  but WITHOUT ANY WARRANTY; without even the implied warranty of        *}
+{*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *}
+{*  GNU General Public License for more details.                          *}
+{*                                                                        *}
+{*  You should have received a copy of the GNU General Public License     *}
+{*  along with this program; if not, write to the Free Software           *}
+{*  Foundation, Inc.,                                                     *}
+{*  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA               *}
+{*                                                                        *}
+{**************************************************************************}
+
+{if $canedit || $has_perms}
+<table class='wiki' cellspacing='0' cellpadding='0'>
+  <tr>
+    <td>
+      <a href='{$wikipage}'>Voir la page</a>
+    </td>
+    {if $canedit}
+    <td>
+      <a href='{$wikipage}?action=edit'>Éditer la page</a>
+    </td>
+    {/if}
+  {if $has_perms}
+    <td>
+      <a href='{$wikipage}?action=diff'>Historique</a>
+    </td>
+    <td>
+      <a href='{$wikipage}?action=upload'>Upload</a>
+    </td>
+  </tr>
+  <tr>
+    <td>
+      <select onchange="dynpostkv('{$wikipage}', 'setrperms', this.value)">
+      {html_options options=$perms_opts selected=$perms[0]}
+      </select>
+    </td>
+    <td>
+      <select onchange="dynpostkv('{$wikipage}', 'setwperms', this.value)">
+      {html_options options=$perms_opts selected=$perms[1]}
+      </select>
+    </td>
+    <td colspan='2' style='text-align: left'>&lt;-- Droits associés</td>
+  {/if}
+  </tr>
+</table>
+{/if}
+
+{if $text}
+{$pmwiki|smarty:nodefaults}
+{else}
+{include file=$pmwiki_cache}
+{/if}
+{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}