Add documentation text near the edit area of the newsletter header
[platal.git] / templates / newsletter / edit.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2014 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   {$nl->name} de {$issue->date|date_format:"%B %Y"}
25 </h1>
26
27 {if !$art}
28
29 <p>
30 [<a href="{$nl->adminPrefix()}">liste</a>]
31 [<a href="{$nl->prefix()}/show/{$issue->id()}">visualiser</a>]
32
33 </p>
34
35 <form action='{$nl->adminPrefix()}/edit/{$issue->id(true)}/update' method='post'>
36   <table class="bicol" cellpadding="3" cellspacing="0">
37     <tr>
38       <th colspan='2'>
39         Propriétés de la newsletter
40       </th>
41     </tr>
42     <tr>
43       <td class='titre'>
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       </td>
67     </tr>
68     <tr>
69       <td class='titre'>
70         ID
71       </td>
72       <td>
73         {$issue->id}
74       </td>
75     </tr>
76     <tr>
77       <td class='titre'>
78         Nom
79       </td>
80       <td>
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}
87       </td>
88     </tr>
89     <tr>
90       <td class='titre'>
91         Titre de l'email
92       </td>
93       <td>
94         <input type='text' size='60' name='title_mail' value="{$issue->title(true)}" />
95       </td>
96     </tr>
97     <tr>
98       <td class='titre'>
99         Titre
100       </td>
101       <td>
102         <input type='text' size='60' name='title' value="{$issue->title()}" />
103       </td>
104     </tr>
105     <tr>
106       <td class='titre'>
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)
120       </td>
121       <td rowspan="2">
122         <textarea name='head' cols='60' rows='20'>{$issue->head()}</textarea>
123       </td>
124     </tr>
125     <tr>
126       <td class="smaller">
127         <p><a href="wiki_help/notitle" class="popup3">{icon name=information} Voir la documentation du wiki</a>
128         </p>
129         <p>{icon name=information} Dans le message, "&lt;cher&gt; &lt;prenom&gt;"
130         sera remplacé par ce que chaque destinataire a défini dans son profil pour le paramètre "Comment t'appeler".
131         </p>
132       </td>
133     </tr>
134     <tr>
135       <td class='titre'>
136         Signature de la lettre
137       </td>
138       <td>
139         <input type='text' size='60' name='signature' value="{$issue->signature}" />
140       </td>
141     </tr>
142     <tr>
143       <td class='titre'>
144         Adresse de réponse (optionnelle)
145       </td>
146       <td>
147         <input type='text' size='60' name='reply_to' value="{$issue->reply_to}" />
148       </td>
149     </tr>
150     {if $nl->automaticMailingEnabled() && ($issue->isEditable() || $issue->isPending())}
151     <tr>
152       <td class='titre'>
153         Date d'envoi
154       </td>
155       <td>
156         {if $issue->isEditable()}
157         Le {valid_date name="send_before_date" value=$issue->getSendBeforeDate() from=0 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
158         {else}
159         Le {$issue->send_before|date_format:"%d/%m/%Y vers %Hh"}
160         {/if}
161       </td>
162     </tr>
163     {/if}
164     {if $nl->criteria->hasFlag('promo')}
165       <tr>
166         <td class="titre">Promotions</td>
167         <td>
168           {if $issue->isEditable()}
169             {include file="include/select_promo.tpl" promo_data=$smarty.request egal1="egal1" egal2="egal2" promo1="promo1" promo2="promo2" edu_type="edu_type"}
170           {else}
171             {if t($smarty.request.promo1)}
172               {if $smarty.request.egal1 eq "="}
173                 {$smarty.request.promo1}
174               {elseif t($smarty.request.promo2)}
175                 {if $smarty.request.egal1 eq "&gt;="}
176                   {$smarty.request.promo1} à {$smarty.request.promo2}
177                 {else}
178                   {$smarty.request.promo2} à {$smarty.request.promo1}
179                 {/if}
180               {else}
181                 {if $smarty.request.egal1 eq "&gt;="}
182                   après {$smarty.request.promo1}
183                 {else}
184                   avant {$smarty.request.promo1}
185                 {/if}
186               {/if}
187             {else}
188               Toutes les promotions
189             {/if}
190             {if $smarty.request.edu_type eq #UserFilter::GRADE_ING#}(X){/if}
191             {if $smarty.request.edu_type eq #UserFilter::GRADE_MST#}(Master){/if}
192             {if $smarty.request.edu_type eq #UserFilter::GRADE_PHD#}(Docteur){/if}
193           {/if}
194         </td>
195       </tr>
196     {/if}
197     {if $nl->criteria->hasFlag('axid')}
198       <tr>
199         <td class="titre">Matricule AX</td>
200         <td>
201           {if $issue->isEditable()}
202             <textarea name="axid" rows="10" cols="12">{$smarty.request.axid}</textarea>
203             <br />
204             <i>Entrer une liste de matricules AX (un par ligne)</i><br />
205             <input type="checkbox" name="axid_reversed" id="axid_reversed" {if $smarty.request.axid_reversed}checked="checked"{/if} value="1" />
206             Inverser la sélection <i>(sélectionner dans l'intervalle de promotions, à l'exception des matricules indiqués)</i>
207           {else}
208             {$smarty.request.axid}
209           {/if}
210         </td>
211       </tr>
212     {/if}
213     <tr class='center'>
214       <td colspan='2'>
215         <input type='submit' name='submit' value='Sauver' />
216       </td>
217     </tr>
218   </table>
219 </form>
220
221 <br />
222
223 <table class="bicol" cellpadding="3" cellspacing="0">
224   <tr>
225     <td>
226       Créer un nouvel article&hellip;
227     </td>
228     <td style='vertical-align:middle; border-left: 1px gray solid' class="center">
229       <a href="{$nl->adminPrefix()}/edit/{$issue->id}/new#edit">{icon name=add title="créer"}</a>
230     </td>
231   </tr>
232   {foreach from=$issue->arts item=arts key=cat}
233   <tr>
234     <th>
235       {$issue->category($cat)|default:"[no category]"}
236     </th>
237     <th></th>
238   </tr>
239   {foreach from=$arts item=art}
240   <tr class="{cycle values="impair,pair"}">
241     <td>
242       <pre>{$art->toText('%hash%','%login%')}</pre>
243     </td>
244     <td style="vertical-align: middle; border-left: 1px gray solid; text-align: center">
245       <small><strong>Pos:&nbsp;{$art->pos}</strong></small><br />
246       <a href="{$nl->adminPrefix()}/edit/{$issue->id}/{$art->aid}/edit#edit">
247         {icon name="page_edit" title="Editer"}
248       </a>
249       <br /><br /><br />
250       <a href="{$nl->adminPrefix()}/edit/{$issue->id}/{$art->aid}/delete"
251          onclick="return confirm('Es-tu sûr de vouloir supprimer cet article&nbsp;?')">
252         {icon name="delete" title="Supprimer"}
253       </a>
254     </td>
255   </tr>
256   {/foreach}
257   {/foreach}
258 </table>
259
260 <br />
261
262 <form action="{$nl->adminPrefix()}/edit/{$issue->id(true)}/blacklist_check" method="post">
263   <table class="bicol" cellpadding="3" cellspacing="0">
264     <tr>
265       <th colspan="2">
266         Vérifier les url et adresses emails sur Spamhaus
267       </th>
268     </tr>
269     {if $ips_to_check|@count > 0}
270     {foreach from=$ips_to_check item=ip_list key=title}
271     {foreach from=$ip_list item=domain key=ip}
272     <tr>
273       <td>{$title}</td>
274       <td><a href="{#globals.mail.blacklist_check_url#}{$ip}">{$domain}</a></td>
275     </tr>
276     {assign var=title value=''}
277     {/foreach}
278     {/foreach}
279     {else}
280     <tr class="center">
281       <td colspan="2">
282         <input type="submit" value="Vérifier" />
283       </td>
284     </tr>
285     {/if}
286   </table>
287 </form>
288
289 {else}
290
291 <p>
292 [<a href="{$nl->adminPrefix()}/edit/{$issue->id}">retour</a>]
293 </p>
294
295 <table class='bicol'>
296   <tr><th>Version texte</th></tr>
297   <tr id='text'>
298   <td><pre>{$art->toText()}</pre></td>
299   </tr>
300   <tr><th>Version html</th></tr>
301   <tr id='html'>
302     <td>
303       <div class='nl'>
304         {$art->toHtml()|smarty:nodefaults}
305       </div>
306     </td>
307   </tr>
308 </table>
309
310 <br />
311
312 <form action="{$nl->adminPrefix()}/edit/{$issue->id}/{$art->aid}/edit#edit" method="post">
313   <table class='bicol'>
314     <tr>
315       <th colspan='2'>
316         <a id='edit'></a>Éditer un article
317       </th>
318     </tr>
319     <tr class="impair">
320       <td class='titre'>Sujet</td>
321       <td>
322         <input size='60' type='text' value="{$art->title()}" name='title' />
323       </td>
324     </tr>
325     <tr class="impair">
326       <td class='titre'>Catégorie</td>
327       <td>
328         <select name='cid'>
329           <option value='0'>-- none --</option>
330           {foreach from=$nl->cats item=text key=cid}
331           <option value='{$cid}' {if $art->cid eq $cid}selected="selected"{/if}>{$text}</option>
332           {/foreach}
333         </select>
334       </td>
335     </tr>
336     <tr class="impair">
337       <td class='titre'>Position</td>
338       <td>
339         <input type='text' value='{$art->pos}' name='pos' />
340       </td>
341     </tr>
342     <tr class="pair">
343       <td class='titre'>Contenu</td>
344       <td>
345         <textarea cols="68" rows="10" name='body'>{$art->body()}</textarea>
346       </td>
347     </tr>
348     <tr class="impair">
349       <td class='titre'>Ajouts (emails, contacts, tarifs, site web&hellip;)</td>
350       <td>
351         <textarea cols="68" rows="6" name='append'>{$art->append()}</textarea>
352       </td>
353     </tr>
354     <tr class="pair smaller">
355       <td></td>
356       <td>
357         <a href="wiki_help/notitle" class="popup3">{icon name=information} Voir la documentation du wiki</a>
358       </td>
359     </tr>
360     <tr class='pair'>
361       <td colspan='2' class='center'>
362         <input type='submit' value='visualiser' />
363         <input type='submit' name='save' value='Sauver' />
364       </td>
365     </tr>
366   </table>
367 </form>
368
369 {/if}
370
371
372 {* vim:set et sw=2 sts=2 sws=2 fenc=utf-8: *}