Happy New Year !
[platal.git] / templates / newsletter / edit.tpl
CommitLineData
0337d704 1{**************************************************************************}
2{* *}
ba6ae046 3{* Copyright (C) 2003-2013 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&nbsp;?');">{*
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&nbsp;? 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&nbsp;? Toutes les données en seront perdues.');">{*
62 *}{icon name=cross} Supprimer</a>]
63{else}
64 Envoyée
65{/if}
913b8ef3
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&nbsp;: 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>
913b8ef3 130 <input type='text' size='60' name='signature' value="{$issue->signature}" />
0337d704 131 </td>
132 </tr>
5f0c028a
BG
133 <tr>
134 <td class='titre'>
135 Adresse de réponse (optionnelle)
136 </td>
137 <td>
138 <input type='text' size='60' name='reply_to' value="{$issue->reply_to}" />
139 </td>
140 </tr>
84163d58
RB
141 {if $nl->automaticMailingEnabled() && ($issue->isEditable() || $issue->isPending())}
142 <tr>
143 <td class='titre'>
144 Date d'envoi
145 </td>
146 <td>
147 {if $issue->isEditable()}
d39fe0a6 148 Le {valid_date name="send_before_date" value=$issue->getSendBeforeDate() from=1 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
84163d58 149 {else}
2d1ed661 150 Le {$issue->send_before|date_format:"%d/%m/%Y vers %Hh"}
84163d58
RB
151 {/if}
152 </td>
153 </tr>
154 {/if}
5c1c7572 155 {if $nl->criteria->hasFlag('promo')}
84163d58 156 <tr>
15952f74 157 <td class="titre">Promotions</td>
84163d58 158 <td>
5c1c7572
BG
159 {if $issue->isEditable()}
160 {include file="include/select_promo.tpl" promo_data=$smarty.request egal1="egal1" egal2="egal2" promo1="promo1" promo2="promo2" edu_type="edu_type"}
161 {else}
162 {if t($smarty.request.promo1)}
163 {if $smarty.request.egal1 eq "="}
164 {$smarty.request.promo1}
165 {elseif t($smarty.request.promo2)}
166 {if $smarty.request.egal1 eq "&gt;="}
167 {$smarty.request.promo1} à {$smarty.request.promo2}
168 {else}
169 {$smarty.request.promo2} à {$smarty.request.promo1}
170 {/if}
171 {else}
172 {if $smarty.request.egal1 eq "&gt;="}
173 après {$smarty.request.promo1}
174 {else}
175 avant {$smarty.request.promo1}
176 {/if}
177 {/if}
178 {else}
179 Toutes les promotions
180 {/if}
181 {if $smarty.request.edu_type eq #UserFilter::GRADE_ING#}(X){/if}
182 {if $smarty.request.edu_type eq #UserFilter::GRADE_MST#}(Master){/if}
183 {if $smarty.request.edu_type eq #UserFilter::GRADE_PHD#}(Docteur){/if}
184 {/if}
84163d58
RB
185 </td>
186 </tr>
5c1c7572
BG
187 {/if}
188 {if $nl->criteria->hasFlag('axid')}
84163d58 189 <tr>
15952f74 190 <td class="titre">Matricule AX</td>
84163d58 191 <td>
5c1c7572
BG
192 {if $issue->isEditable()}
193 <textarea name="axid" rows="10" cols="12">{$smarty.request.axid}</textarea>
194 <br />
195 <i>Entrer une liste de matricules AX (un par ligne)</i><br />
196 <input type="checkbox" name="axid_reversed" id="axid_reversed" {if $smarty.request.axid_reversed}checked="checked"{/if} value="1" />
197 Inverser la sélection <i>(sélectionner dans l'intervalle de promotions, à l'exception des matricules indiqués)</i>
198 {else}
199 {$smarty.request.axid}
200 {/if}
84163d58
RB
201 </td>
202 </tr>
84163d58 203 {/if}
0337d704 204 <tr class='center'>
205 <td colspan='2'>
2d1ed661 206 <input type='submit' name='submit' value='Sauver' />
0337d704 207 </td>
208 </tr>
209 </table>
210</form>
211
212<br />
213
214<table class="bicol" cellpadding="3" cellspacing="0">
215 <tr>
216 <td>
6e828e47 217 Créer un nouvel article&hellip;
0337d704 218 </td>
36fbd4c4 219 <td style='vertical-align:middle; border-left: 1px gray solid' class="center">
84163d58 220 <a href="{$nl->adminPrefix()}/edit/{$issue->id}/new#edit">{icon name=add title="créer"}</a>
0337d704 221 </td>
222 </tr>
84163d58 223 {foreach from=$issue->arts item=arts key=cat}
0337d704 224 <tr>
225 <th>
84163d58 226 {$issue->category($cat)|default:"[no category]"}
0337d704 227 </th>
228 <th></th>
229 </tr>
230 {foreach from=$arts item=art}
231 <tr class="{cycle values="impair,pair"}">
232 <td>
aacc771b 233 <pre>{$art->toText('%hash%','%login%')}</pre>
0337d704 234 </td>
7e3f1cfa 235 <td style="vertical-align: middle; border-left: 1px gray solid; text-align: center">
84163d58
RB
236 <small><strong>Pos:&nbsp;{$art->pos}</strong></small><br />
237 <a href="{$nl->adminPrefix()}/edit/{$issue->id}/{$art->aid}/edit#edit">
7e3f1cfa
SJ
238 {icon name="page_edit" title="Editer"}
239 </a>
240 <br /><br /><br />
84163d58 241 <a href="{$nl->adminPrefix()}/edit/{$issue->id}/{$art->aid}/delete"
6bb2f79a 242 onclick="return confirm('Es-tu sûr de vouloir supprimer cet article&nbsp;?')">
7e3f1cfa
SJ
243 {icon name="delete" title="Supprimer"}
244 </a>
0337d704 245 </td>
246 </tr>
247 {/foreach}
248 {/foreach}
249</table>
250
9e2a6a32
SJ
251<br />
252
84163d58 253<form action="{$nl->adminPrefix()}/edit/{$issue->id(true)}/blacklist_check" method="post">
9e2a6a32
SJ
254 <table class="bicol" cellpadding="3" cellspacing="0">
255 <tr>
256 <th colspan="2">
257 Vérifier les url et adresses emails sur Spamhaus
258 </th>
259 </tr>
260 {if $ips_to_check|@count > 0}
261 {foreach from=$ips_to_check item=ip_list key=title}
262 {foreach from=$ip_list item=domain key=ip}
263 <tr>
264 <td>{$title}</td>
265 <td><a href="{#globals.mail.blacklist_check_url#}{$ip}">{$domain}</a></td>
266 </tr>
267 {assign var=title value=''}
268 {/foreach}
269 {/foreach}
270 {else}
271 <tr class="center">
272 <td colspan="2">
273 <input type="submit" value="Vérifier" />
274 </td>
275 </tr>
276 {/if}
277 </table>
278</form>
279
0337d704 280{else}
281
282<p>
84163d58 283[<a href="{$nl->adminPrefix()}/edit/{$issue->id}">retour</a>]
0337d704 284</p>
285
0337d704 286<table class='bicol'>
287 <tr><th>Version texte</th></tr>
288 <tr id='text'>
289 <td><pre>{$art->toText()}</pre></td>
290 </tr>
291 <tr><th>Version html</th></tr>
292 <tr id='html'>
293 <td>
294 <div class='nl'>
295 {$art->toHtml()|smarty:nodefaults}
296 </div>
297 </td>
298 </tr>
299</table>
300
301<br />
302
84163d58 303<form action="{$nl->adminPrefix()}/edit/{$issue->id}/{$art->aid}/edit#edit" method="post">
0337d704 304 <table class='bicol'>
305 <tr>
306 <th colspan='2'>
661e78f7 307 <a id='edit'></a>Éditer un article
0337d704 308 </th>
309 </tr>
310 <tr class="impair">
311 <td class='titre'>Sujet</td>
312 <td>
313 <input size='60' type='text' value="{$art->title()}" name='title' />
314 </td>
315 </tr>
316 <tr class="impair">
a7de4ef7 317 <td class='titre'>Catégorie</td>
0337d704 318 <td>
319 <select name='cid'>
320 <option value='0'>-- none --</option>
84163d58
RB
321 {foreach from=$nl->cats item=text key=cid}
322 <option value='{$cid}' {if $art->cid eq $cid}selected="selected"{/if}>{$text}</option>
0337d704 323 {/foreach}
324 </select>
325 </td>
326 </tr>
327 <tr class="impair">
328 <td class='titre'>Position</td>
329 <td>
84163d58 330 <input type='text' value='{$art->pos}' name='pos' />
0337d704 331 </td>
332 </tr>
333 <tr class="pair">
334 <td class='titre'>Contenu</td>
335 <td>
336 <textarea cols="68" rows="10" name='body'>{$art->body()}</textarea>
337 </td>
338 </tr>
339 <tr class="impair">
6e828e47 340 <td class='titre'>Ajouts (emails, contacts, tarifs, site web&hellip;)</td>
0337d704 341 <td>
342 <textarea cols="68" rows="6" name='append'>{$art->append()}</textarea>
343 </td>
344 </tr>
3ad44e08 345 <tr class="pair smaller">
346 <td></td>
347 <td>
348 <a href="wiki_help/notitle" class="popup3">{icon name=information} Voir la documentation du wiki</a>
349 </td>
350 </tr>
0337d704 351 <tr class='pair'>
352 <td colspan='2' class='center'>
353 <input type='submit' value='visualiser' />
354 <input type='submit' name='save' value='Sauver' />
355 </td>
356 </tr>
357 </table>
358</form>
359
360{/if}
361
362
a7de4ef7 363{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}