* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: index.tpl,v 1.3 2004-09-20 20:37:15 x2000habouzit Exp $
+ $Id: index.tpl,v 1.4 2004-09-20 21:31:29 x2000habouzit Exp $
***************************************************************************}
<div class="rubrique">
Listes de diffusion publiques
</div>
-<table class='bicol' cellpadding='0' cellspacing='0'>
- <tr>
- <th>Liste</th>
- <th>Description</th>
- <th>Diffusion</th>
- <th>Inscription</th>
- </tr>
- {foreach from=$listes item=liste}
- {if $liste.priv eq 0}
- <tr class='{cycle values="impair,pair"}'>
- <td>
- <a href='liste.php?liste={$liste.list}'>{$liste.list}</a>
- {if $liste.you>1}[<a href='moderate.php?liste={$liste.list}'>mod</a>]{/if}
- </td>
- <td>{$liste.desc}</td>
- <td class='center'>{if $liste.diff}modérée{else}libre{/if}</td>
- <td class='right'>{if $liste.you is odd}désinscription{elseif $liste.ins}ins modérée{else}inscription{/if}</td>
- </tr>
- {/if}
- {/foreach}
-</table>
+{include file='listes/listes.inc.tpl' min=0}
<div class="rubrique">
Listes de diffusion privées
</div>
-<table class='bicol' cellpadding='0' cellspacing='0'>
- <tr>
- <th>Liste</th>
- <th>Description</th>
- <th>Diffusion</th>
- <th>Inscription</th>
- </tr>
- {foreach from=$listes item=liste}
- {if $liste.priv eq 1}
- <tr class='{cycle values="impair,pair"}'>
- <td>
- <a href='liste.php?liste={$liste.list}'>{$liste.list}</a>
- {if $liste.you>1}[<a href='moderate.php?liste={$liste.list}'>mod</a>]{/if}
- </td>
- <td>{$liste.desc}</td>
- <td class='center'>{if $liste.diff}modérée{else}libre{/if}</td>
- <td class='right'>{if $liste.you is odd}désinscription{elseif $liste.ins}ins modérée{else}inscription{/if}</td>
- </tr>
- {/if}
- {/foreach}
-</table>
+{include file='listes/listes.inc.tpl' min=1}
{perms level=admin}
<div class="rubrique">
Listes d'administration
</div>
-<table class='bicol' cellpadding='0' cellspacing='0'>
- <tr>
- <th>Liste</th>
- <th>Description</th>
- <th>Diffusion</th>
- <th>Inscription</th>
- </tr>
- {foreach from=$listes item=liste}
- {if $liste.priv > 1}
- <tr class='{cycle values="impair,pair"}'>
- <td>
- <a href='liste.php?liste={$liste.list}'>{$liste.list}</a>
- {if $liste.you>1}[<a href='moderate.php?liste={$liste.list}'>mod</a>]{/if}
- </td>
- <td>{$liste.desc}</td>
- <td class='center'>{if $liste.diff}modérée{else}libre{/if}</td>
- <td class='right'>{if $liste.you is odd}désinscription{elseif $liste.ins}ins modérée{else}inscription{/if}</td>
- </tr>
- {/if}
- {/foreach}
-</table>
+{include file='listes/listes.inc.tpl' min=2 max=4}
+
{/perms}
{/dynamic}
--- /dev/null
+{***************************************************************************
+ * Copyright (C) 2003-2004 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 *
+ ***************************************************************************
+ $Id: listes.inc.tpl,v 1.1 2004-09-20 21:31:29 x2000habouzit Exp $
+ ***************************************************************************}
+
+<form action='{$smarty.server.PHP_SELF}'>
+ <table class='bicol' cellpadding='0' cellspacing='0'>
+ <tr>
+ <th>Liste</th>
+ <th>Description</th>
+ <th>Diffusion</th>
+ <th>Inscription</th>
+ </tr>
+ {foreach from=$listes item=liste}
+ {if $liste.priv >= $min && $liste.priv <= $max|default:$min}
+ <tr class='{cycle values="impair,pair"}'>
+ <td>
+ <a href='liste.php?liste={$liste.list}'>{$liste.list}</a>
+ {if $liste.you>1}[<a href='moderate.php?liste={$liste.list}'>mod</a>]{/if}
+ </td>
+ <td>{$liste.desc}</td>
+ <td class='center'>{if $liste.diff}modérée{else}libre{/if}</td>
+ <td class='right'>
+ {if $liste.you is odd}
+ {if $liste.ins}inscrit{/if} <input type='checkbox' checked='checked' name='{$liste.desc}' />
+ {elseif $liste.ins}
+ <input type='submit' name='{$liste.desc}' value='demander' />
+ {else}
+ <input type='checkbox' name='{$liste.desc}' />
+ {/if}
+ </td>
+ </tr>
+ {/if}
+ {/foreach}
+ </table>
+</form>
+
+{* vim:set et sw=2 sts=2 sws=2: *}
* Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************
- $Id: moderate.tpl,v 1.1 2004-09-20 20:04:38 x2000habouzit Exp $
+ $Id: moderate.tpl,v 1.2 2004-09-20 21:31:29 x2000habouzit Exp $
***************************************************************************}
{dynamic}
Inscriptions en attente de modération
</div>
+{if $subs|@count}
+{else}
+<p>pas d'inscriptions en attente de modération</p>
+{/if}
+
+{if $mails|@count}
<div class='rubrique'>
Mails en attente de modération
</div>
</tr>
{/foreach}
</table>
+{else}
+<p>pas de mails en attente de modération</p>
+{/if}
{/if}