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