Update admin pages in order to list all NLs
authorRaphaël Barrois <raphael.barrois@polytechnique.org>
Sat, 29 Jan 2011 23:33:24 +0000 (00:33 +0100)
committerRaphaël Barrois <raphael.barrois@polytechnique.org>
Sun, 30 Jan 2011 00:05:15 +0000 (01:05 +0100)
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
templates/newsletter/admin_all.tpl [new file with mode: 0644]
templates/newsletter/index.tpl

diff --git a/templates/newsletter/admin_all.tpl b/templates/newsletter/admin_all.tpl
new file mode 100644 (file)
index 0000000..20b0714
--- /dev/null
@@ -0,0 +1,40 @@
+{**************************************************************************}
+{*                                                                        *}
+{*  Copyright (C) 2003-2011 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               *}
+{*                                                                        *}
+{**************************************************************************}
+
+<table class="bicol" cellpadding="3" cellspacing="0" summary="Liste des Newsletter actives">
+  <tr>
+    <th>Id</th>
+    <th>Groupe</th>
+    <th>Titre</th>
+    <th>CSS spécifique</th>
+    <th>Critères actifs</th>
+  </tr>
+  {foreach from=$nls item=nl}
+  <tr class="{cycle values="pair,impair"}">
+    <td class="titre">{$nl->id}</td>
+    <td>{$nl->group}</td>
+    <td>{$nl->name}</td>
+    <td>{if $nl->hasCustomCss()}Oui{else}Non{/if}</td>
+    <td>{$nl->criteria->flags()}</td>
+  </tr>
+  {/foreach}
+</table>
index 4fd362c..1978e44 100644 (file)
@@ -61,9 +61,9 @@ Tu n'es actuellement pas inscrit à la {$nl->name}.
   </tr>
   {foreach item=nli from=$nl_list}
   <tr class="{cycle values="impair,pair"}">
-    <td>{$nli.date|date_format}</td>
+    <td>{$nli->date|date_format}</td>
     <td>
-      <a href="{$nl->prefix()}/show/{$nli.id}">{$nli.title|default:"[Sans titre]"}</a>
+      <a href="{$nl->prefix()}/show/{$nli->id()}">{$nli->title()|default:"[Sans titre]"}</a>
     </td>
   </tr>
   {/foreach}