Commit | Line | Data |
---|---|---|
0337d704 | 1 | {**************************************************************************} |
2 | {* *} | |
5e1513f6 | 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> | |
24 | Lettre de Polytechnique.org de {$nl->_date|date_format:"%B %Y"} | |
25 | </h1> | |
26 | ||
27 | {if !$art} | |
28 | ||
29 | <p> | |
86f0a6af | 30 | [<a href="admin/newsletter">liste</a>] |
ed76a506 | 31 | [<a href="nl/show/{$nl->id()}">visualiser</a>] |
0337d704 | 32 | </p> |
33 | ||
4882f4a5 | 34 | <form action='admin/newsletter/edit/{$nl->id(true)}/update' method='post'> |
0337d704 | 35 | <table class="bicol" cellpadding="3" cellspacing="0"> |
36 | <tr> | |
37 | <th colspan='2'> | |
a7de4ef7 | 38 | Propriétés de la newsletter |
0337d704 | 39 | </th> |
40 | </tr> | |
41 | <tr> | |
42 | <td class='titre'> | |
fbd95de7 | 43 | ID |
44 | </td> | |
45 | <td> | |
46 | {$nl->_id} | |
47 | </td> | |
48 | </tr> | |
49 | <tr> | |
50 | <td class='titre'> | |
ed76a506 | 51 | Nom |
52 | </td> | |
53 | <td> | |
54 | <input type='text' size='16' name='shortname' value="{$nl->_shortname}" /> | |
e8439508 | 55 | <span class="smaller">(Ex : 2006-06 pour la NL de juin 2006)</span> |
ed76a506 | 56 | </td> |
57 | </tr> | |
58 | <tr> | |
59 | <td class='titre'> | |
faefdbb7 | 60 | Titre de l'email |
8269d2d6 | 61 | </td> |
62 | <td> | |
63 | <input type='text' size='60' name='title_mail' value="{$nl->title(true)}" /> | |
64 | </td> | |
65 | </tr> | |
66 | <tr> | |
67 | <td class='titre'> | |
0337d704 | 68 | Titre |
69 | </td> | |
70 | <td> | |
71 | <input type='text' size='60' name='title' value="{$nl->title()}" /> | |
72 | </td> | |
73 | </tr> | |
74 | <tr> | |
75 | <td class='titre'> | |
76 | Date d'envoi | |
77 | </td> | |
78 | <td> | |
79 | <input type='text' size='60' name='date' value="{$nl->_date}" /> | |
80 | </td> | |
81 | </tr> | |
82 | <tr> | |
83 | <td class='titre'> | |
84 | Intro de la lettre | |
85 | </td> | |
86 | <td> | |
87 | <textarea name='head' cols='60' rows='6'>{$nl->head()}</textarea> | |
88 | </td> | |
89 | </tr> | |
90 | <tr class='center'> | |
91 | <td colspan='2'> | |
86f0a6af | 92 | <input type='submit' value='sauver' /> |
0337d704 | 93 | </td> |
94 | </tr> | |
95 | </table> | |
96 | </form> | |
97 | ||
98 | <br /> | |
99 | ||
100 | <table class="bicol" cellpadding="3" cellspacing="0"> | |
101 | <tr> | |
102 | <td> | |
6e828e47 | 103 | Créer un nouvel article… |
0337d704 | 104 | </td> |
36fbd4c4 FB |
105 | <td style='vertical-align:middle; border-left: 1px gray solid' class="center"> |
106 | <a href="admin/newsletter/edit/{$nl->_id}/new#edit">{icon name=add title="créer"}</a> | |
0337d704 | 107 | </td> |
108 | </tr> | |
109 | {foreach from=$nl->_arts item=arts key=cat} | |
110 | <tr> | |
111 | <th> | |
112 | {$nl->_cats[$cat]|default:"[no cat]"} | |
113 | </th> | |
114 | <th></th> | |
115 | </tr> | |
116 | {foreach from=$arts item=art} | |
117 | <tr class="{cycle values="impair,pair"}"> | |
118 | <td> | |
aacc771b | 119 | <pre>{$art->toText('%hash%','%login%')}</pre> |
0337d704 | 120 | </td> |
7e3f1cfa SJ |
121 | <td style="vertical-align: middle; border-left: 1px gray solid; text-align: center"> |
122 | <small><strong>Pos: {$art->_pos}</strong></small><br /> | |
123 | <a href="admin/newsletter/edit/{$nl->_id}/{$art->_aid}/edit#edit"> | |
124 | {icon name="page_edit" title="Editer"} | |
125 | </a> | |
126 | <br /><br /><br /> | |
127 | <a href="admin/newsletter/edit/{$nl->_id}/{$art->_aid}/delete" | |
6bb2f79a | 128 | onclick="return confirm('Es-tu sûr de vouloir supprimer cet article ?')"> |
7e3f1cfa SJ |
129 | {icon name="delete" title="Supprimer"} |
130 | </a> | |
0337d704 | 131 | </td> |
132 | </tr> | |
133 | {/foreach} | |
134 | {/foreach} | |
135 | </table> | |
136 | ||
9e2a6a32 SJ |
137 | <br /> |
138 | ||
139 | <form action="admin/newsletter/edit/{$nl->id(true)}/blacklist_check" method="post"> | |
140 | <table class="bicol" cellpadding="3" cellspacing="0"> | |
141 | <tr> | |
142 | <th colspan="2"> | |
143 | Vérifier les url et adresses emails sur Spamhaus | |
144 | </th> | |
145 | </tr> | |
146 | {if $ips_to_check|@count > 0} | |
147 | {foreach from=$ips_to_check item=ip_list key=title} | |
148 | {foreach from=$ip_list item=domain key=ip} | |
149 | <tr> | |
150 | <td>{$title}</td> | |
151 | <td><a href="{#globals.mail.blacklist_check_url#}{$ip}">{$domain}</a></td> | |
152 | </tr> | |
153 | {assign var=title value=''} | |
154 | {/foreach} | |
155 | {/foreach} | |
156 | {else} | |
157 | <tr class="center"> | |
158 | <td colspan="2"> | |
159 | <input type="submit" value="Vérifier" /> | |
160 | </td> | |
161 | </tr> | |
162 | {/if} | |
163 | </table> | |
164 | </form> | |
165 | ||
0337d704 | 166 | {else} |
167 | ||
168 | <p> | |
86f0a6af | 169 | [<a href="admin/newsletter/edit/{$nl->_id}">retour</a>] |
0337d704 | 170 | </p> |
171 | ||
0337d704 | 172 | <table class='bicol'> |
173 | <tr><th>Version texte</th></tr> | |
174 | <tr id='text'> | |
175 | <td><pre>{$art->toText()}</pre></td> | |
176 | </tr> | |
177 | <tr><th>Version html</th></tr> | |
178 | <tr id='html'> | |
179 | <td> | |
180 | <div class='nl'> | |
181 | {$art->toHtml()|smarty:nodefaults} | |
182 | </div> | |
183 | </td> | |
184 | </tr> | |
185 | </table> | |
186 | ||
187 | <br /> | |
188 | ||
86f0a6af | 189 | <form action="admin/newsletter/edit/{$nl->_id}/{$art->_aid}/edit#edit" method="post"> |
0337d704 | 190 | <table class='bicol'> |
191 | <tr> | |
192 | <th colspan='2'> | |
661e78f7 | 193 | <a id='edit'></a>Éditer un article |
0337d704 | 194 | </th> |
195 | </tr> | |
196 | <tr class="impair"> | |
197 | <td class='titre'>Sujet</td> | |
198 | <td> | |
199 | <input size='60' type='text' value="{$art->title()}" name='title' /> | |
200 | </td> | |
201 | </tr> | |
202 | <tr class="impair"> | |
a7de4ef7 | 203 | <td class='titre'>Catégorie</td> |
0337d704 | 204 | <td> |
205 | <select name='cid'> | |
206 | <option value='0'>-- none --</option> | |
207 | {foreach from=$nl->_cats item=text key=cid} | |
208 | <option value='{$cid}' {if $art->_cid eq $cid}selected="selected"{/if}>{$text}</option> | |
209 | {/foreach} | |
210 | </select> | |
211 | </td> | |
212 | </tr> | |
213 | <tr class="impair"> | |
214 | <td class='titre'>Position</td> | |
215 | <td> | |
216 | <input type='text' value='{$art->_pos}' name='pos' /> | |
217 | </td> | |
218 | </tr> | |
219 | <tr class="pair"> | |
220 | <td class='titre'>Contenu</td> | |
221 | <td> | |
222 | <textarea cols="68" rows="10" name='body'>{$art->body()}</textarea> | |
223 | </td> | |
224 | </tr> | |
225 | <tr class="impair"> | |
6e828e47 | 226 | <td class='titre'>Ajouts (emails, contacts, tarifs, site web…)</td> |
0337d704 | 227 | <td> |
228 | <textarea cols="68" rows="6" name='append'>{$art->append()}</textarea> | |
229 | </td> | |
230 | </tr> | |
3ad44e08 | 231 | <tr class="pair smaller"> |
232 | <td></td> | |
233 | <td> | |
234 | <a href="wiki_help/notitle" class="popup3">{icon name=information} Voir la documentation du wiki</a> | |
235 | </td> | |
236 | </tr> | |
0337d704 | 237 | <tr class='pair'> |
238 | <td colspan='2' class='center'> | |
239 | <input type='submit' value='visualiser' /> | |
240 | <input type='submit' name='save' value='Sauver' /> | |
241 | </td> | |
242 | </tr> | |
243 | </table> | |
244 | </form> | |
245 | ||
246 | {/if} | |
247 | ||
248 | ||
a7de4ef7 | 249 | {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} |