* remove templates moved to the core.
* remove useless templates and fix broken references.
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
--- /dev/null
+<?php
+/***************************************************************************
+ * 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 *
+ ***************************************************************************/
+
+class Xorg extends Platal
+{
+ public function force_login(PlPage &$page)
+ {
+ header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden');
+ if (S::logged()) {
+ $page->changeTpl('core/password_prompt_logged.tpl');
+ $page->addJsLink('do_challenge_response_logged.js');
+ } else {
+ $page->changeTpl('core/password_prompt.tpl');
+ $page->addJsLink('do_challenge_response.js');
+ }
+ $page->assign_by_ref('platal', $this);
+ $page->run();
+ }
+}
+
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+?>
-Subproject commit 8cd8f58b0e58ee8ebc2ebf1bb79f2e20eb05808d
+Subproject commit 7cb40d85a05eb9d16218b9504ee484741e2e92e3
require_once dirname(__FILE__).'/../include/xorg.inc.php';
-$platal = new Platal('auth', 'carnet', 'email', 'events', 'forums',
- 'geoloc', 'lists', 'marketing', 'payment', 'platal',
- 'profile', 'register', 'search', 'stats', 'admin',
- 'newsletter', 'axletter', 'bandeau', 'survey',
- 'gadgets', 'googleapps');
+$platal = new Xorg('auth', 'carnet', 'email', 'events', 'forums',
+ 'geoloc', 'lists', 'marketing', 'payment', 'platal',
+ 'profile', 'register', 'search', 'stats', 'admin',
+ 'newsletter', 'axletter', 'bandeau', 'survey',
+ 'gadgets', 'googleapps');
if (!($path = Env::v('n')) || ($path{0} < 'A' || $path{0} > 'Z')) {
$platal->run();
</form>
{if $promo}
-{include file="include/csv-importer.tpl"}
+{include core=csv-importer.tpl}
{/if}
{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
<h1>Ajout d'utilisateurs</h1>
-{include file="include/csv-importer.tpl"}
+{include core=csv-importer.tpl}
{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
Rechercher dans tes contacts :
</p>
-{include file="core/plset.tpl"}
+{include core=plset.tpl}
{/if}
+++ /dev/null
-{**************************************************************************}
-{* *}
-{* 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: *}
+++ /dev/null
-{**************************************************************************}
-{* *}
-{* 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 :<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: *}
+++ /dev/null
-{**************************************************************************}\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 Polytechnique.org, 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
- Sujet : <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
+++ /dev/null
-{**************************************************************************}
-{* *}
-{* 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: *}
+++ /dev/null
-{**************************************************************************}
-{* *}
-{* 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 : <a href="{$t->pl}/new">Manuellement</a> • <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> {/if}
-{if $p_next > -1}<a href="{$platal->path}?start={$p_next}">{$msg_next_page}</a>{/if}
-</p>
-{/if}
-
-{elseif $massadd}
-{include file="include/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: *}
+++ /dev/null
-{**************************************************************************}
-{* *}
-{* 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: *}
+++ /dev/null
-{**************************************************************************}
-{* *}
-{* 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'><-- 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: *}
<h1>Aperçu de l'astuce</h1>
{include file="include/tips.tpl" full=true tips=$entry nochange=true}
-{include file="core/table-editor.tpl"}
+{include core=table-editor.tpl}
{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
Les différentes règles sont appliquées par ordre de priorité décroissante.
</p>
-{include file="core/table-editor.tpl"}
+{include core=table-editor.tpl}
{literal}
<script type="text/javascript">
+++ /dev/null
-{**************************************************************************}
-{* *}
-{* 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 :
- {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) :<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 :
- <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: *}
+++ /dev/null
-{**************************************************************************}
-{* *}
-{* 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}] </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}&page=1#pl_set_top">{icon name=resultset_first title="Première page"}</a>{*
- *}<a href="{$platal->pl_self()}{$plset_search}order={$order}&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}&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}&page={$plview->page+1}#pl_set_top">{icon name=resultset_next title="Page suivante"}</a>{*
- *}<a href="{$platal->pl_self()}{$plset_search}order={$order}&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 :
- {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}
- ]
- {/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: *}
</tr>
</table>
-{include file="core/plset.tpl"}
+{include core=plset.tpl}
<h1>
modérateurs de la liste
{* *}
{**************************************************************************}
-{include file="core/table-editor.tpl"}
+{include core=table-editor.tpl}
<h1>Administration Polytechnique.org</h1>
{if $plset_count}
-{include file="core/plset.tpl"}
+{include core=plset.tpl}
{else}
{include wiki=Docs.Emploi}
{/if}
{include file=search/adv.links.tpl do_title=1 with_soundex=$with_soundex}
{/if}
{/if}
-
- {include file='core/plset.tpl'}
+
+ {include core=plset.tpl}
{if $search_pages_nb > 1}
<p>
+++ /dev/null
-{**************************************************************************}
-{* *}
-{* 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} : {$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: *}
</ul>
{if $plset_base}
-{include file="core/plset.tpl"}
+{include core=plset.tpl}
{else}
<p class="center">