0337d704 |
1 | {**************************************************************************} |
2 | {* *} |
3 | {* Copyright (C) 2003-2004 Polytechnique.org *} |
4 | {* http://opensource.polytechnique.org/ *} |
5 | {* *} |
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. *} |
10 | {* *} |
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. *} |
15 | {* *} |
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 *} |
20 | {* *} |
21 | {**************************************************************************} |
22 | |
23 | <h1> |
24 | Lettre de Polytechnique.org de {$nl->_date|date_format:"%B %Y"} |
25 | </h1> |
26 | |
27 | {if !$art} |
28 | |
29 | <p> |
30 | [<a href="{"admin/newsletter.php"|url}">liste</a>] |
31 | [<a href="{"newsletter/show.php"|url}?nid={$nl->_id}">visualiser</a>] |
32 | </p> |
33 | |
34 | <form action='{$smarty.server.PHP_SELF}?nid={$nl->_id}' method='post'> |
35 | <table class="bicol" cellpadding="3" cellspacing="0"> |
36 | <tr> |
37 | <th colspan='2'> |
38 | Propriétés de la newsletter |
39 | </th> |
40 | </tr> |
41 | <tr> |
42 | <td class='titre'> |
43 | Titre |
44 | </td> |
45 | <td> |
46 | <input type='text' size='60' name='title' value="{$nl->title()}" /> |
47 | </td> |
48 | </tr> |
49 | <tr> |
50 | <td class='titre'> |
51 | Date d'envoi |
52 | </td> |
53 | <td> |
54 | <input type='text' size='60' name='date' value="{$nl->_date}" /> |
55 | </td> |
56 | </tr> |
57 | <tr> |
58 | <td class='titre'> |
59 | Intro de la lettre |
60 | </td> |
61 | <td> |
62 | <textarea name='head' cols='60' rows='6'>{$nl->head()}</textarea> |
63 | </td> |
64 | </tr> |
65 | <tr class='center'> |
66 | <td colspan='2'> |
67 | <input type='submit' name='update' value='sauver' /> |
68 | </td> |
69 | </tr> |
70 | </table> |
71 | </form> |
72 | |
73 | <br /> |
74 | |
75 | <table class="bicol" cellpadding="3" cellspacing="0"> |
76 | <tr> |
77 | <td> |
78 | Créer un nouvel article ... |
79 | </td> |
80 | <td style='vertical-align:middle; border-left: 1px gray solid'> |
81 | [<a href="{$smarty.server.PHP_SELF}?nid={$nl->_id}&edit_aid=-1#edit">créer</a>] |
82 | </td> |
83 | </tr> |
84 | {foreach from=$nl->_arts item=arts key=cat} |
85 | <tr> |
86 | <th> |
87 | {$nl->_cats[$cat]|default:"[no cat]"} |
88 | </th> |
89 | <th></th> |
90 | </tr> |
91 | {foreach from=$arts item=art} |
92 | <tr class="{cycle values="impair,pair"}"> |
93 | <td> |
94 | <pre>{$art->toText($smarty.session.prenom,$smarty.session.nom,$smarty.session.femme)|smarty:nodefaults}</pre> |
95 | </td> |
96 | <td style='vertical-align:middle; border-left: 1px gray solid'> |
97 | <strong>Pos: {$art->_pos}</strong><br /> |
98 | [<a href="{$smarty.server.PHP_SELF}?nid={$nl->_id}&edit_aid={$art->_aid}#edit">edit</a>]<br /> |
99 | [<a href="{$smarty.server.PHP_SELF}?nid={$nl->_id}&del_aid={$art->_aid}">delete</a>] |
100 | </td> |
101 | </tr> |
102 | {/foreach} |
103 | {/foreach} |
104 | </table> |
105 | |
106 | {else} |
107 | |
108 | <p> |
109 | [<a href="?nid={$nl->_id}">retour</a>] |
110 | </p> |
111 | |
112 | {if !$art->check()}<p class='erreur'>article trop long !</p>{/if} |
113 | <table class='bicol'> |
114 | <tr><th>Version texte</th></tr> |
115 | <tr id='text'> |
116 | <td><pre>{$art->toText()}</pre></td> |
117 | </tr> |
118 | <tr><th>Version html</th></tr> |
119 | <tr id='html'> |
120 | <td> |
121 | <div class='nl'> |
122 | {$art->toHtml()|smarty:nodefaults} |
123 | </div> |
124 | </td> |
125 | </tr> |
126 | </table> |
127 | |
128 | <br /> |
129 | |
130 | <form action="{$smarty.server.REQUEST_URI}#edit" method="post"> |
131 | <table class='bicol'> |
132 | <tr> |
133 | <th colspan='2'> |
134 | <a id='edit'></a>Editer un article |
135 | <input type='hidden' name='aid' value='{$smarty.get.edit_aid}' /> |
136 | </th> |
137 | </tr> |
138 | <tr class="impair"> |
139 | <td class='titre'>Sujet</td> |
140 | <td> |
141 | <input size='60' type='text' value="{$art->title()}" name='title' /> |
142 | </td> |
143 | </tr> |
144 | <tr class="impair"> |
145 | <td class='titre'>Catégorie</td> |
146 | <td> |
147 | <select name='cid'> |
148 | <option value='0'>-- none --</option> |
149 | {foreach from=$nl->_cats item=text key=cid} |
150 | <option value='{$cid}' {if $art->_cid eq $cid}selected="selected"{/if}>{$text}</option> |
151 | {/foreach} |
152 | </select> |
153 | </td> |
154 | </tr> |
155 | <tr class="impair"> |
156 | <td class='titre'>Position</td> |
157 | <td> |
158 | <input type='text' value='{$art->_pos}' name='pos' /> |
159 | </td> |
160 | </tr> |
161 | <tr class="pair"> |
162 | <td class='titre'>Contenu</td> |
163 | <td> |
164 | <textarea cols="68" rows="10" name='body'>{$art->body()}</textarea> |
165 | </td> |
166 | </tr> |
167 | <tr class="impair"> |
168 | <td class='titre'>Ajouts (emails, contacts, tarifs, site web, ...)</td> |
169 | <td> |
170 | <textarea cols="68" rows="6" name='append'>{$art->append()}</textarea> |
171 | </td> |
172 | </tr> |
173 | <tr class='pair'> |
174 | <td colspan='2' class='center'> |
175 | <input type='submit' value='visualiser' /> |
176 | <input type='submit' name='save' value='Sauver' /> |
177 | </td> |
178 | </tr> |
179 | </table> |
180 | </form> |
181 | |
182 | {/if} |
183 | |
184 | |
185 | {* vim:set et sw=2 sts=2 sws=2: *} |