Commit | Line | Data |
---|---|---|
0337d704 | 1 | {**************************************************************************} |
2 | {* *} | |
179afa7f | 3 | {* Copyright (C) 2003-2008 Polytechnique.org *} |
0337d704 | 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> | |
86f0a6af | 30 | [<a href="admin/newsletter">liste</a>] |
ed76a506 | 31 | [<a href="nl/show/{$nl->id()}">visualiser</a>] |
0337d704 | 32 | </p> |
33 | ||
4882f4a5 | 34 | <form action='admin/newsletter/edit/{$nl->id(true)}/update' method='post'> |
0337d704 | 35 | <table class="bicol" cellpadding="3" cellspacing="0"> |
36 | <tr> | |
37 | <th colspan='2'> | |
a7de4ef7 | 38 | Propriétés de la newsletter |
0337d704 | 39 | </th> |
40 | </tr> | |
41 | <tr> | |
42 | <td class='titre'> | |
fbd95de7 | 43 | ID |
44 | </td> | |
45 | <td> | |
46 | {$nl->_id} | |
47 | </td> | |
48 | </tr> | |
49 | <tr> | |
50 | <td class='titre'> | |
ed76a506 | 51 | Nom |
52 | </td> | |
53 | <td> | |
54 | <input type='text' size='16' name='shortname' value="{$nl->_shortname}" /> | |
e8439508 | 55 | <span class="smaller">(Ex : 2006-06 pour la NL de juin 2006)</span> |
ed76a506 | 56 | </td> |
57 | </tr> | |
58 | <tr> | |
59 | <td class='titre'> | |
8269d2d6 | 60 | Titre du mail |
61 | </td> | |
62 | <td> | |
63 | <input type='text' size='60' name='title_mail' value="{$nl->title(true)}" /> | |
64 | </td> | |
65 | </tr> | |
66 | <tr> | |
67 | <td class='titre'> | |
0337d704 | 68 | Titre |
69 | </td> | |
70 | <td> | |
71 | <input type='text' size='60' name='title' value="{$nl->title()}" /> | |
72 | </td> | |
73 | </tr> | |
74 | <tr> | |
75 | <td class='titre'> | |
76 | Date d'envoi | |
77 | </td> | |
78 | <td> | |
79 | <input type='text' size='60' name='date' value="{$nl->_date}" /> | |
80 | </td> | |
81 | </tr> | |
82 | <tr> | |
83 | <td class='titre'> | |
84 | Intro de la lettre | |
85 | </td> | |
86 | <td> | |
87 | <textarea name='head' cols='60' rows='6'>{$nl->head()}</textarea> | |
88 | </td> | |
89 | </tr> | |
90 | <tr class='center'> | |
91 | <td colspan='2'> | |
86f0a6af | 92 | <input type='submit' value='sauver' /> |
0337d704 | 93 | </td> |
94 | </tr> | |
95 | </table> | |
96 | </form> | |
97 | ||
98 | <br /> | |
99 | ||
100 | <table class="bicol" cellpadding="3" cellspacing="0"> | |
101 | <tr> | |
102 | <td> | |
a7de4ef7 | 103 | Créer un nouvel article ... |
0337d704 | 104 | </td> |
36fbd4c4 FB |
105 | <td style='vertical-align:middle; border-left: 1px gray solid' class="center"> |
106 | <a href="admin/newsletter/edit/{$nl->_id}/new#edit">{icon name=add title="créer"}</a> | |
0337d704 | 107 | </td> |
108 | </tr> | |
109 | {foreach from=$nl->_arts item=arts key=cat} | |
110 | <tr> | |
111 | <th> | |
112 | {$nl->_cats[$cat]|default:"[no cat]"} | |
113 | </th> | |
114 | <th></th> | |
115 | </tr> | |
116 | {foreach from=$arts item=art} | |
117 | <tr class="{cycle values="impair,pair"}"> | |
118 | <td> | |
aacc771b | 119 | <pre>{$art->toText('%hash%','%login%')}</pre> |
0337d704 | 120 | </td> |
121 | <td style='vertical-align:middle; border-left: 1px gray solid'> | |
36fbd4c4 FB |
122 | <small><strong>Pos: {$art->_pos}</strong></small><br /> |
123 | <a href="admin/newsletter/edit/{$nl->_id}/{$art->_aid}/edit#edit">{icon name="page_edit" title="Editer"}</a> | |
124 | <a href="admin/newsletter/edit/{$nl->_id}/{$art->_aid}/delete">{icon name="delete" title="Supprimer"}</a> | |
0337d704 | 125 | </td> |
126 | </tr> | |
127 | {/foreach} | |
128 | {/foreach} | |
129 | </table> | |
130 | ||
131 | {else} | |
132 | ||
133 | <p> | |
86f0a6af | 134 | [<a href="admin/newsletter/edit/{$nl->_id}">retour</a>] |
0337d704 | 135 | </p> |
136 | ||
137 | {if !$art->check()}<p class='erreur'>article trop long !</p>{/if} | |
138 | <table class='bicol'> | |
139 | <tr><th>Version texte</th></tr> | |
140 | <tr id='text'> | |
141 | <td><pre>{$art->toText()}</pre></td> | |
142 | </tr> | |
143 | <tr><th>Version html</th></tr> | |
144 | <tr id='html'> | |
145 | <td> | |
146 | <div class='nl'> | |
147 | {$art->toHtml()|smarty:nodefaults} | |
148 | </div> | |
149 | </td> | |
150 | </tr> | |
151 | </table> | |
152 | ||
153 | <br /> | |
154 | ||
86f0a6af | 155 | <form action="admin/newsletter/edit/{$nl->_id}/{$art->_aid}/edit#edit" method="post"> |
0337d704 | 156 | <table class='bicol'> |
157 | <tr> | |
158 | <th colspan='2'> | |
661e78f7 | 159 | <a id='edit'></a>Éditer un article |
0337d704 | 160 | </th> |
161 | </tr> | |
162 | <tr class="impair"> | |
163 | <td class='titre'>Sujet</td> | |
164 | <td> | |
165 | <input size='60' type='text' value="{$art->title()}" name='title' /> | |
166 | </td> | |
167 | </tr> | |
168 | <tr class="impair"> | |
a7de4ef7 | 169 | <td class='titre'>Catégorie</td> |
0337d704 | 170 | <td> |
171 | <select name='cid'> | |
172 | <option value='0'>-- none --</option> | |
173 | {foreach from=$nl->_cats item=text key=cid} | |
174 | <option value='{$cid}' {if $art->_cid eq $cid}selected="selected"{/if}>{$text}</option> | |
175 | {/foreach} | |
176 | </select> | |
177 | </td> | |
178 | </tr> | |
179 | <tr class="impair"> | |
180 | <td class='titre'>Position</td> | |
181 | <td> | |
182 | <input type='text' value='{$art->_pos}' name='pos' /> | |
183 | </td> | |
184 | </tr> | |
185 | <tr class="pair"> | |
186 | <td class='titre'>Contenu</td> | |
187 | <td> | |
188 | <textarea cols="68" rows="10" name='body'>{$art->body()}</textarea> | |
189 | </td> | |
190 | </tr> | |
191 | <tr class="impair"> | |
192 | <td class='titre'>Ajouts (emails, contacts, tarifs, site web, ...)</td> | |
193 | <td> | |
194 | <textarea cols="68" rows="6" name='append'>{$art->append()}</textarea> | |
195 | </td> | |
196 | </tr> | |
3ad44e08 | 197 | <tr class="pair smaller"> |
198 | <td></td> | |
199 | <td> | |
200 | <a href="wiki_help/notitle" class="popup3">{icon name=information} Voir la documentation du wiki</a> | |
201 | </td> | |
202 | </tr> | |
0337d704 | 203 | <tr class='pair'> |
204 | <td colspan='2' class='center'> | |
205 | <input type='submit' value='visualiser' /> | |
206 | <input type='submit' name='save' value='Sauver' /> | |
207 | </td> | |
208 | </tr> | |
209 | </table> | |
210 | </form> | |
211 | ||
212 | {/if} | |
213 | ||
214 | ||
a7de4ef7 | 215 | {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} |