1 {**************************************************************************}
3 {* Copyright (C) 2003-2006 Polytechnique.org *}
4 {* http://opensource.polytechnique.org/ *}
6 {* This program is free software; you can redistribute it and/or modify *}
7 {* it under the terms of the GNU General Public License as published by *}
8 {* the Free Software Foundation; either version 2 of the License, or *}
9 {* (at your option) any later version. *}
11 {* This program is distributed in the hope that it will be useful, *}
12 {* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
13 {* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
14 {* GNU General Public License for more details. *}
16 {* You should have received a copy of the GNU General Public License *}
17 {* along with this program; if not, write to the Free Software *}
18 {* Foundation, Inc., *}
19 {* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
21 {**************************************************************************}
24 Lettre de Polytechnique.org de {$nl->_date|date_format:"%B %Y"}
30 [<a href="{rel}/admin/newsletter.php">liste</a>]
31 [<a href="{rel}/nl/show/{$nl->_id}">visualiser</a>]
34 <form action='{$smarty.server.PHP_SELF}?nid={$nl->_id}' method='post'>
35 <table class="bicol" cellpadding="3" cellspacing="0">
38 Propriétés de la newsletter
54 <input type='text' size='60' name='title' value="{$nl->title()}" />
62 <input type='text' size='60' name='date' value="{$nl->_date}" />
70 <textarea name='head' cols='60' rows='6'>{$nl->head()}</textarea>
75 <input type='submit' name='update' value='sauver' />
83 <table class="bicol" cellpadding="3" cellspacing="0">
86 Créer un nouvel article ...
88 <td style='vertical-align:middle; border-left: 1px gray solid'>
89 [<a href="{$smarty.server.PHP_SELF}?nid={$nl->_id}&edit_aid=-1#edit">créer</a>]
92 {foreach from=$nl->_arts item=arts key=cat}
95 {$nl->_cats[$cat]|default:"[no cat]"}
99 {foreach from=$arts item=art}
100 <tr class="{cycle values="impair,pair"}">
102 <pre>{$art->toText($smarty.session.prenom,$smarty.session.nom,$smarty.session.femme)|smarty:nodefaults}</pre>
104 <td style='vertical-align:middle; border-left: 1px gray solid'>
105 <strong>Pos: {$art->_pos}</strong><br />
106 [<a href="{$smarty.server.PHP_SELF}?nid={$nl->_id}&edit_aid={$art->_aid}#edit">edit</a>]<br />
107 [<a href="{$smarty.server.PHP_SELF}?nid={$nl->_id}&del_aid={$art->_aid}">delete</a>]
117 [<a href="?nid={$nl->_id}">retour</a>]
120 {if !$art->check()}<p class='erreur'>article trop long !</p>{/if}
121 <table class='bicol'>
122 <tr><th>Version texte</th></tr>
124 <td><pre>{$art->toText()}</pre></td>
126 <tr><th>Version html</th></tr>
130 {$art->toHtml()|smarty:nodefaults}
138 <form action="{$smarty.server.REQUEST_URI}#edit" method="post">
139 <table class='bicol'>
142 <a id='edit'></a>Editer un article
143 <input type='hidden' name='aid' value='{$smarty.get.edit_aid}' />
147 <td class='titre'>Sujet</td>
149 <input size='60' type='text' value="{$art->title()}" name='title' />
153 <td class='titre'>Catégorie</td>
156 <option value='0'>-- none --</option>
157 {foreach from=$nl->_cats item=text key=cid}
158 <option value='{$cid}' {if $art->_cid eq $cid}selected="selected"{/if}>{$text}</option>
164 <td class='titre'>Position</td>
166 <input type='text' value='{$art->_pos}' name='pos' />
170 <td class='titre'>Contenu</td>
172 <textarea cols="68" rows="10" name='body'>{$art->body()}</textarea>
176 <td class='titre'>Ajouts (emails, contacts, tarifs, site web, ...)</td>
178 <textarea cols="68" rows="6" name='append'>{$art->append()}</textarea>
182 <td colspan='2' class='center'>
183 <input type='submit' value='visualiser' />
184 <input type='submit' name='save' value='Sauver' />
193 {* vim:set et sw=2 sts=2 sws=2: *}