Adds a Reply-To field for newsletters
[platal.git] / templates / newsletter / edit.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2011 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>
122         <textarea name='head' cols='60' rows='20'>{$issue->head()}</textarea>
123       </td>
124     </tr>
125     <tr>
126       <td class='titre'>
127         Signature de la lettre
128       </td>
129       <td>
130         <input type='text' size='60' name='signature' value="{$issue->signature}" />
131       </td>
132     </tr>
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>
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()}
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
149         {else}
150         Le {$issue->send_before|date_format:"%d/%m/%Y vers %Hh"}
151         {/if}
152       </td>
153     </tr>
154     {/if}
155     {if $issue->isEditable()}
156       {if $nl->criteria->hasFlag('promo')}
157       <tr>
158         <td class="titre">Promotions</td>
159         <td>
160           {include file="include/select_promo.tpl" promo_data=$smarty.request egal1="egal1" egal2="egal2" promo1="promo1" promo2="promo2" edu_type="edu_type"}
161         </td>
162       </tr>
163       {/if}
164       {if $nl->criteria->hasFlag('axid')}
165       <tr>
166         <td class="titre">Matricule AX</td>
167         <td>
168           <textarea name="axid" rows="10" cols="12">{$smarty.request.axid}</textarea>
169           <br />
170           <i>Entrer une liste de matricules AX (un par ligne)</i><br />
171           <input type="checkbox" name="axid_reversed" id="axid_reversed" {if $smarty.request.axid_reversed}checked="checked"{/if} value="1" />
172           Inverser la sélection <i>(sélectionner dans l'intervalle de promotions, à l'exception des matricules indiqués)</i>
173         </td>
174       </tr>
175       {/if}
176     {/if}
177     <tr class='center'>
178       <td colspan='2'>
179         <input type='submit' name='submit' value='Sauver' />
180       </td>
181     </tr>
182   </table>
183 </form>
184
185 <br />
186
187 <table class="bicol" cellpadding="3" cellspacing="0">
188   <tr>
189     <td>
190       Créer un nouvel article&hellip;
191     </td>
192     <td style='vertical-align:middle; border-left: 1px gray solid' class="center">
193       <a href="{$nl->adminPrefix()}/edit/{$issue->id}/new#edit">{icon name=add title="créer"}</a>
194     </td>
195   </tr>
196   {foreach from=$issue->arts item=arts key=cat}
197   <tr>
198     <th>
199       {$issue->category($cat)|default:"[no category]"}
200     </th>
201     <th></th>
202   </tr>
203   {foreach from=$arts item=art}
204   <tr class="{cycle values="impair,pair"}">
205     <td>
206       <pre>{$art->toText('%hash%','%login%')}</pre>
207     </td>
208     <td style="vertical-align: middle; border-left: 1px gray solid; text-align: center">
209       <small><strong>Pos:&nbsp;{$art->pos}</strong></small><br />
210       <a href="{$nl->adminPrefix()}/edit/{$issue->id}/{$art->aid}/edit#edit">
211         {icon name="page_edit" title="Editer"}
212       </a>
213       <br /><br /><br />
214       <a href="{$nl->adminPrefix()}/edit/{$issue->id}/{$art->aid}/delete"
215          onclick="return confirm('Es-tu sûr de vouloir supprimer cet article&nbsp;?')">
216         {icon name="delete" title="Supprimer"}
217       </a>
218     </td>
219   </tr>
220   {/foreach}
221   {/foreach}
222 </table>
223
224 <br />
225
226 <form action="{$nl->adminPrefix()}/edit/{$issue->id(true)}/blacklist_check" method="post">
227   <table class="bicol" cellpadding="3" cellspacing="0">
228     <tr>
229       <th colspan="2">
230         Vérifier les url et adresses emails sur Spamhaus
231       </th>
232     </tr>
233     {if $ips_to_check|@count > 0}
234     {foreach from=$ips_to_check item=ip_list key=title}
235     {foreach from=$ip_list item=domain key=ip}
236     <tr>
237       <td>{$title}</td>
238       <td><a href="{#globals.mail.blacklist_check_url#}{$ip}">{$domain}</a></td>
239     </tr>
240     {assign var=title value=''}
241     {/foreach}
242     {/foreach}
243     {else}
244     <tr class="center">
245       <td colspan="2">
246         <input type="submit" value="Vérifier" />
247       </td>
248     </tr>
249     {/if}
250   </table>
251 </form>
252
253 {else}
254
255 <p>
256 [<a href="{$nl->adminPrefix()}/edit/{$issue->id}">retour</a>]
257 </p>
258
259 <table class='bicol'>
260   <tr><th>Version texte</th></tr>
261   <tr id='text'>
262   <td><pre>{$art->toText()}</pre></td>
263   </tr>
264   <tr><th>Version html</th></tr>
265   <tr id='html'>
266     <td>
267       <div class='nl'>
268         {$art->toHtml()|smarty:nodefaults}
269       </div>
270     </td>
271   </tr>
272 </table>
273
274 <br />
275
276 <form action="{$nl->adminPrefix()}/edit/{$issue->id}/{$art->aid}/edit#edit" method="post">
277   <table class='bicol'>
278     <tr>
279       <th colspan='2'>
280         <a id='edit'></a>Éditer un article
281       </th>
282     </tr>
283     <tr class="impair">
284       <td class='titre'>Sujet</td>
285       <td>
286         <input size='60' type='text' value="{$art->title()}" name='title' />
287       </td>
288     </tr>
289     <tr class="impair">
290       <td class='titre'>Catégorie</td>
291       <td>
292         <select name='cid'>
293           <option value='0'>-- none --</option>
294           {foreach from=$nl->cats item=text key=cid}
295           <option value='{$cid}' {if $art->cid eq $cid}selected="selected"{/if}>{$text}</option>
296           {/foreach}
297         </select>
298       </td>
299     </tr>
300     <tr class="impair">
301       <td class='titre'>Position</td>
302       <td>
303         <input type='text' value='{$art->pos}' name='pos' />
304       </td>
305     </tr>
306     <tr class="pair">
307       <td class='titre'>Contenu</td>
308       <td>
309         <textarea cols="68" rows="10" name='body'>{$art->body()}</textarea>
310       </td>
311     </tr>
312     <tr class="impair">
313       <td class='titre'>Ajouts (emails, contacts, tarifs, site web&hellip;)</td>
314       <td>
315         <textarea cols="68" rows="6" name='append'>{$art->append()}</textarea>
316       </td>
317     </tr>
318     <tr class="pair smaller">
319       <td></td>
320       <td>
321         <a href="wiki_help/notitle" class="popup3">{icon name=information} Voir la documentation du wiki</a>
322       </td>
323     </tr>
324     <tr class='pair'>
325       <td colspan='2' class='center'>
326         <input type='submit' value='visualiser' />
327         <input type='submit' name='save' value='Sauver' />
328       </td>
329     </tr>
330   </table>
331 </form>
332
333 {/if}
334
335
336 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}