Commit | Line | Data |
---|---|---|
0337d704 | 1 | {**************************************************************************} |
2 | {* *} | |
12262f13 | 3 | {* Copyright (C) 2003-2011 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> | |
84163d58 | 24 | {$nl->name} de {$issue->date|date_format:"%B %Y"} |
0337d704 | 25 | </h1> |
26 | ||
27 | {if !$art} | |
28 | ||
29 | <p> | |
84163d58 RB |
30 | [<a href="{$nl->adminPrefix()}">liste</a>] |
31 | [<a href="{$nl->prefix()}/show/{$issue->id()}">visualiser</a>] | |
32 | ||
0337d704 | 33 | </p> |
34 | ||
84163d58 | 35 | <form action='{$nl->adminPrefix()}/edit/{$issue->id(true)}/update' method='post'> |
0337d704 | 36 | <table class="bicol" cellpadding="3" cellspacing="0"> |
37 | <tr> | |
38 | <th colspan='2'> | |
a7de4ef7 | 39 | Propriétés de la newsletter |
0337d704 | 40 | </th> |
41 | </tr> | |
42 | <tr> | |
43 | <td class='titre'> | |
84163d58 RB |
44 | État |
45 | </td> | |
46 | <td> | |
47 | {if $issue->isPending()} | |
48 | En attente d'envoi | |
49 | {if $nl->automaticMailingEnabled()} | |
50 | [<a href="{$nl->adminPrefix()}/edit/cancel/{$issue->id()}?token={xsrf_token}" onclick="return confirm('Es-tu sûr de vouloir annuler l\'envoi de ce message ?');">{* | |
51 | *}{icon name=delete} Annuler l'envoi</a>] | |
52 | {/if} | |
53 | {elseif $issue->isEditable()} | |
54 | En cours d'édition | |
55 | ||
56 | {if $nl->automaticMailingEnabled()} | |
57 | [<a href="{$nl->adminPrefix()}/edit/valid/{$issue->id()}?token={xsrf_token}" onclick="return confirm('Es-tu sûr de vouloir déclencher l\'envoi de ce message ? Tu ne pourras plus le modifier après cela.');">{* | |
58 | *}{icon name=tick} Valider l'envoi</a>] | |
59 | {/if} | |
60 | ||
61 | [<a href="{$nl->adminPrefix()}/edit/delete/{$issue->id()}?token={xsrf_token}" onclick="return confirm('Es-tu sûr de vouloir supprimer cette lettre ? Toutes les données en seront perdues.');">{* | |
62 | *}{icon name=cross} Supprimer</a>] | |
63 | {else} | |
64 | Envoyée | |
65 | {/if} | |
04d12e24 SJ |
66 | </td> |
67 | </tr> | |
84163d58 RB |
68 | <tr> |
69 | <td class='titre'> | |
fbd95de7 | 70 | ID |
71 | </td> | |
72 | <td> | |
84163d58 | 73 | {$issue->id} |
fbd95de7 | 74 | </td> |
75 | </tr> | |
76 | <tr> | |
77 | <td class='titre'> | |
ed76a506 | 78 | Nom |
79 | </td> | |
80 | <td> | |
84163d58 RB |
81 | {if $issue->isEditable()} |
82 | <input type='text' size='16' name='shortname' value="{$issue->shortname}" /> | |
83 | <span class="smaller">(Ex : 2006-06 pour la NL de juin 2006)</span> | |
84 | {else} | |
85 | {$issue->shortname} | |
86 | {/if} | |
ed76a506 | 87 | </td> |
88 | </tr> | |
89 | <tr> | |
90 | <td class='titre'> | |
faefdbb7 | 91 | Titre de l'email |
8269d2d6 | 92 | </td> |
93 | <td> | |
84163d58 | 94 | <input type='text' size='60' name='title_mail' value="{$issue->title(true)}" /> |
8269d2d6 | 95 | </td> |
96 | </tr> | |
97 | <tr> | |
98 | <td class='titre'> | |
0337d704 | 99 | Titre |
100 | </td> | |
101 | <td> | |
84163d58 | 102 | <input type='text' size='60' name='title' value="{$issue->title()}" /> |
0337d704 | 103 | </td> |
104 | </tr> | |
105 | <tr> | |
106 | <td class='titre'> | |
84163d58 RB |
107 | Date |
108 | </td> | |
109 | <td> | |
110 | {if $issue->isEditable()} | |
111 | {valid_date name="date" value=$issue->date from=0 to=60} | |
112 | {else} | |
113 | {$issue->date} | |
114 | {/if} | |
115 | </td> | |
116 | </tr> | |
117 | <tr> | |
118 | <td class='titre'> | |
119 | Intro de la lettre<br />(ou contenu pour les lettres exceptionnelles) | |
0337d704 | 120 | </td> |
121 | <td> | |
84163d58 | 122 | <textarea name='head' cols='60' rows='20'>{$issue->head()}</textarea> |
0337d704 | 123 | </td> |
124 | </tr> | |
125 | <tr> | |
126 | <td class='titre'> | |
84163d58 | 127 | Signature de la lettre |
0337d704 | 128 | </td> |
129 | <td> | |
04d12e24 | 130 | <input type='text' size='60' name='signature' value="{$issue->signature}" /> |
0337d704 | 131 | </td> |
132 | </tr> | |
84163d58 RB |
133 | {if $nl->automaticMailingEnabled() && ($issue->isEditable() || $issue->isPending())} |
134 | <tr> | |
135 | <td class='titre'> | |
136 | Date d'envoi | |
137 | </td> | |
138 | <td> | |
139 | {if $issue->isEditable()} | |
140 | Le {valid_date name="send_before_date" value=$issue->getSendBeforeDate() from=3 to=15} vers {html_select_time prefix="send_before_time_" time=$issue->getSendBeforeTime() display_hours=true display_minutes=false display_seconds=false display_meridian=false use_24_hours=true} heures | |
141 | {else} | |
2d1ed661 | 142 | Le {$issue->send_before|date_format:"%d/%m/%Y vers %Hh"} |
84163d58 RB |
143 | {/if} |
144 | </td> | |
145 | </tr> | |
146 | {/if} | |
147 | {if $issue->isEditable()} | |
148 | {if $nl->criteria->hasFlag('promo')} | |
149 | <tr> | |
150 | <td class='titre'> | |
151 | Promotions | |
152 | </td> | |
153 | <td> | |
154 | <script type="text/javascript">/*<![CDATA[*/ | |
155 | {literal} | |
156 | function updatepromofields(egal1) { | |
157 | var f = egal1.form; | |
158 | f.egal2.disabled = f.promo2.disabled = egal1.value == '='; | |
159 | f.egal2.readOnly = true; | |
160 | if (f.egal1.value == '>=') { | |
161 | f.egal2.value = '<='; | |
162 | } else { | |
163 | f.egal2.value = '>='; | |
164 | } | |
165 | } | |
166 | $(function() { updatepromofields($('select[name=egal1]')[0]); }); | |
167 | {/literal} | |
168 | /*]]>*/</script> | |
169 | <select name="egal1" onchange="updatepromofields(this)" style="text-align:center"> | |
170 | <option value="=" {if $smarty.request.egal1 eq "="}selected="selected"{/if}> = </option> | |
171 | <option value=">=" {if $smarty.request.egal1 eq ">="}selected="selected"{/if}> >= </option> | |
172 | <option value="<=" {if $smarty.request.egal1 eq "<="}selected="selected"{/if}> <= </option> | |
173 | </select> | |
174 | <input type="text" name="promo1" size="4" maxlength="4" value="{$smarty.request.promo1}" /> | |
175 | et | |
176 | <input type="text" name="egal2" size="1" style="text-align:center" value="{if t($smarty.request.egal2) eq '<'}<{else}>{/if}" readonly="readonly" /> | |
177 | <input type="text" name="promo2" size="4" maxlength="4" value="{$smarty.request.promo2}" /> | |
178 | </td> | |
179 | </tr> | |
180 | {/if} | |
181 | {if $nl->criteria->hasFlag('axid')} | |
182 | <tr> | |
183 | <td>Matricule AX</td> | |
184 | <td> | |
185 | <textarea name="axid" rows="10" cols="12">{$smarty.request.axid}</textarea> | |
186 | <br /> | |
187 | <i>Entrer une liste de matricules AX (un par ligne)</i><br /> | |
188 | <input type="checkbox" name="axid_reversed" id="axid_reversed" {if $smarty.request.axid_reversed}checked="checked"{/if} value="1" /> | |
91b9255b | 189 | Inverser la sélection <i>(sélectionner dans l'intervalle de promotions, à l'exception des matricules indiqués)</i> |
84163d58 RB |
190 | </td> |
191 | </tr> | |
192 | {/if} | |
193 | {/if} | |
0337d704 | 194 | <tr class='center'> |
195 | <td colspan='2'> | |
2d1ed661 | 196 | <input type='submit' name='submit' value='Sauver' /> |
0337d704 | 197 | </td> |
198 | </tr> | |
199 | </table> | |
200 | </form> | |
201 | ||
202 | <br /> | |
203 | ||
204 | <table class="bicol" cellpadding="3" cellspacing="0"> | |
205 | <tr> | |
206 | <td> | |
6e828e47 | 207 | Créer un nouvel article… |
0337d704 | 208 | </td> |
36fbd4c4 | 209 | <td style='vertical-align:middle; border-left: 1px gray solid' class="center"> |
84163d58 | 210 | <a href="{$nl->adminPrefix()}/edit/{$issue->id}/new#edit">{icon name=add title="créer"}</a> |
0337d704 | 211 | </td> |
212 | </tr> | |
84163d58 | 213 | {foreach from=$issue->arts item=arts key=cat} |
0337d704 | 214 | <tr> |
215 | <th> | |
84163d58 | 216 | {$issue->category($cat)|default:"[no category]"} |
0337d704 | 217 | </th> |
218 | <th></th> | |
219 | </tr> | |
220 | {foreach from=$arts item=art} | |
221 | <tr class="{cycle values="impair,pair"}"> | |
222 | <td> | |
aacc771b | 223 | <pre>{$art->toText('%hash%','%login%')}</pre> |
0337d704 | 224 | </td> |
7e3f1cfa | 225 | <td style="vertical-align: middle; border-left: 1px gray solid; text-align: center"> |
84163d58 RB |
226 | <small><strong>Pos: {$art->pos}</strong></small><br /> |
227 | <a href="{$nl->adminPrefix()}/edit/{$issue->id}/{$art->aid}/edit#edit"> | |
7e3f1cfa SJ |
228 | {icon name="page_edit" title="Editer"} |
229 | </a> | |
230 | <br /><br /><br /> | |
84163d58 | 231 | <a href="{$nl->adminPrefix()}/edit/{$issue->id}/{$art->aid}/delete" |
6bb2f79a | 232 | onclick="return confirm('Es-tu sûr de vouloir supprimer cet article ?')"> |
7e3f1cfa SJ |
233 | {icon name="delete" title="Supprimer"} |
234 | </a> | |
0337d704 | 235 | </td> |
236 | </tr> | |
237 | {/foreach} | |
238 | {/foreach} | |
239 | </table> | |
240 | ||
9e2a6a32 SJ |
241 | <br /> |
242 | ||
84163d58 | 243 | <form action="{$nl->adminPrefix()}/edit/{$issue->id(true)}/blacklist_check" method="post"> |
9e2a6a32 SJ |
244 | <table class="bicol" cellpadding="3" cellspacing="0"> |
245 | <tr> | |
246 | <th colspan="2"> | |
247 | Vérifier les url et adresses emails sur Spamhaus | |
248 | </th> | |
249 | </tr> | |
250 | {if $ips_to_check|@count > 0} | |
251 | {foreach from=$ips_to_check item=ip_list key=title} | |
252 | {foreach from=$ip_list item=domain key=ip} | |
253 | <tr> | |
254 | <td>{$title}</td> | |
255 | <td><a href="{#globals.mail.blacklist_check_url#}{$ip}">{$domain}</a></td> | |
256 | </tr> | |
257 | {assign var=title value=''} | |
258 | {/foreach} | |
259 | {/foreach} | |
260 | {else} | |
261 | <tr class="center"> | |
262 | <td colspan="2"> | |
263 | <input type="submit" value="Vérifier" /> | |
264 | </td> | |
265 | </tr> | |
266 | {/if} | |
267 | </table> | |
268 | </form> | |
269 | ||
0337d704 | 270 | {else} |
271 | ||
272 | <p> | |
84163d58 | 273 | [<a href="{$nl->adminPrefix()}/edit/{$issue->id}">retour</a>] |
0337d704 | 274 | </p> |
275 | ||
0337d704 | 276 | <table class='bicol'> |
277 | <tr><th>Version texte</th></tr> | |
278 | <tr id='text'> | |
279 | <td><pre>{$art->toText()}</pre></td> | |
280 | </tr> | |
281 | <tr><th>Version html</th></tr> | |
282 | <tr id='html'> | |
283 | <td> | |
284 | <div class='nl'> | |
285 | {$art->toHtml()|smarty:nodefaults} | |
286 | </div> | |
287 | </td> | |
288 | </tr> | |
289 | </table> | |
290 | ||
291 | <br /> | |
292 | ||
84163d58 | 293 | <form action="{$nl->adminPrefix()}/edit/{$issue->id}/{$art->aid}/edit#edit" method="post"> |
0337d704 | 294 | <table class='bicol'> |
295 | <tr> | |
296 | <th colspan='2'> | |
661e78f7 | 297 | <a id='edit'></a>Éditer un article |
0337d704 | 298 | </th> |
299 | </tr> | |
300 | <tr class="impair"> | |
301 | <td class='titre'>Sujet</td> | |
302 | <td> | |
303 | <input size='60' type='text' value="{$art->title()}" name='title' /> | |
304 | </td> | |
305 | </tr> | |
306 | <tr class="impair"> | |
a7de4ef7 | 307 | <td class='titre'>Catégorie</td> |
0337d704 | 308 | <td> |
309 | <select name='cid'> | |
310 | <option value='0'>-- none --</option> | |
84163d58 RB |
311 | {foreach from=$nl->cats item=text key=cid} |
312 | <option value='{$cid}' {if $art->cid eq $cid}selected="selected"{/if}>{$text}</option> | |
0337d704 | 313 | {/foreach} |
314 | </select> | |
315 | </td> | |
316 | </tr> | |
317 | <tr class="impair"> | |
318 | <td class='titre'>Position</td> | |
319 | <td> | |
84163d58 | 320 | <input type='text' value='{$art->pos}' name='pos' /> |
0337d704 | 321 | </td> |
322 | </tr> | |
323 | <tr class="pair"> | |
324 | <td class='titre'>Contenu</td> | |
325 | <td> | |
326 | <textarea cols="68" rows="10" name='body'>{$art->body()}</textarea> | |
327 | </td> | |
328 | </tr> | |
329 | <tr class="impair"> | |
6e828e47 | 330 | <td class='titre'>Ajouts (emails, contacts, tarifs, site web…)</td> |
0337d704 | 331 | <td> |
332 | <textarea cols="68" rows="6" name='append'>{$art->append()}</textarea> | |
333 | </td> | |
334 | </tr> | |
3ad44e08 | 335 | <tr class="pair smaller"> |
336 | <td></td> | |
337 | <td> | |
338 | <a href="wiki_help/notitle" class="popup3">{icon name=information} Voir la documentation du wiki</a> | |
339 | </td> | |
340 | </tr> | |
0337d704 | 341 | <tr class='pair'> |
342 | <td colspan='2' class='center'> | |
343 | <input type='submit' value='visualiser' /> | |
344 | <input type='submit' name='save' value='Sauver' /> | |
345 | </td> | |
346 | </tr> | |
347 | </table> | |
348 | </form> | |
349 | ||
350 | {/if} | |
351 | ||
352 | ||
a7de4ef7 | 353 | {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} |