migration d'admin
[platal.git] / templates / admin / newsletter_edit.tpl
CommitLineData
0337d704 1{**************************************************************************}
2{* *}
50a40a33 3{* Copyright (C) 2003-2006 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>]
7b2413f6 31[<a href="nl/show/{$nl->_id}">visualiser</a>]
0337d704 32</p>
33
86f0a6af 34<form action='admin/newsletter/edit/{$nl->_id}/update' method='post'>
0337d704 35 <table class="bicol" cellpadding="3" cellspacing="0">
36 <tr>
37 <th colspan='2'>
38 Propriétés de la newsletter
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'>
0337d704 51 Titre
52 </td>
53 <td>
54 <input type='text' size='60' name='title' value="{$nl->title()}" />
55 </td>
56 </tr>
57 <tr>
58 <td class='titre'>
59 Date d'envoi
60 </td>
61 <td>
62 <input type='text' size='60' name='date' value="{$nl->_date}" />
63 </td>
64 </tr>
65 <tr>
66 <td class='titre'>
67 Intro de la lettre
68 </td>
69 <td>
70 <textarea name='head' cols='60' rows='6'>{$nl->head()}</textarea>
71 </td>
72 </tr>
73 <tr class='center'>
74 <td colspan='2'>
86f0a6af 75 <input type='submit' value='sauver' />
0337d704 76 </td>
77 </tr>
78 </table>
79</form>
80
81<br />
82
83<table class="bicol" cellpadding="3" cellspacing="0">
84 <tr>
85 <td>
86 Créer un nouvel article ...
87 </td>
88 <td style='vertical-align:middle; border-left: 1px gray solid'>
86f0a6af 89 [<a href="admin/newsletter/edit/{$nl->_id}/new#edit">créer</a>]
0337d704 90 </td>
91 </tr>
92 {foreach from=$nl->_arts item=arts key=cat}
93 <tr>
94 <th>
95 {$nl->_cats[$cat]|default:"[no cat]"}
96 </th>
97 <th></th>
98 </tr>
99 {foreach from=$arts item=art}
100 <tr class="{cycle values="impair,pair"}">
101 <td>
102 <pre>{$art->toText($smarty.session.prenom,$smarty.session.nom,$smarty.session.femme)|smarty:nodefaults}</pre>
103 </td>
104 <td style='vertical-align:middle; border-left: 1px gray solid'>
105 <strong>Pos: {$art->_pos}</strong><br />
86f0a6af 106 [<a href="admin/newsletter/edit/{$nl->_id}/{$art->_aid}/edit#edit">edit</a>]<br />
107 [<a href="admin/newsletter/edit/{$nl->_id}/{$art->_aid}/delete">delete</a>]
0337d704 108 </td>
109 </tr>
110 {/foreach}
111 {/foreach}
112</table>
113
114{else}
115
116<p>
86f0a6af 117[<a href="admin/newsletter/edit/{$nl->_id}">retour</a>]
0337d704 118</p>
119
120{if !$art->check()}<p class='erreur'>article trop long !</p>{/if}
121<table class='bicol'>
122 <tr><th>Version texte</th></tr>
123 <tr id='text'>
124 <td><pre>{$art->toText()}</pre></td>
125 </tr>
126 <tr><th>Version html</th></tr>
127 <tr id='html'>
128 <td>
129 <div class='nl'>
130 {$art->toHtml()|smarty:nodefaults}
131 </div>
132 </td>
133 </tr>
134</table>
135
136<br />
137
86f0a6af 138<form action="admin/newsletter/edit/{$nl->_id}/{$art->_aid}/edit#edit" method="post">
0337d704 139 <table class='bicol'>
140 <tr>
141 <th colspan='2'>
142 <a id='edit'></a>Editer un article
0337d704 143 </th>
144 </tr>
145 <tr class="impair">
146 <td class='titre'>Sujet</td>
147 <td>
148 <input size='60' type='text' value="{$art->title()}" name='title' />
149 </td>
150 </tr>
151 <tr class="impair">
152 <td class='titre'>Catégorie</td>
153 <td>
154 <select name='cid'>
155 <option value='0'>-- none --</option>
156 {foreach from=$nl->_cats item=text key=cid}
157 <option value='{$cid}' {if $art->_cid eq $cid}selected="selected"{/if}>{$text}</option>
158 {/foreach}
159 </select>
160 </td>
161 </tr>
162 <tr class="impair">
163 <td class='titre'>Position</td>
164 <td>
165 <input type='text' value='{$art->_pos}' name='pos' />
166 </td>
167 </tr>
168 <tr class="pair">
169 <td class='titre'>Contenu</td>
170 <td>
171 <textarea cols="68" rows="10" name='body'>{$art->body()}</textarea>
172 </td>
173 </tr>
174 <tr class="impair">
175 <td class='titre'>Ajouts (emails, contacts, tarifs, site web, ...)</td>
176 <td>
177 <textarea cols="68" rows="6" name='append'>{$art->append()}</textarea>
178 </td>
179 </tr>
180 <tr class='pair'>
181 <td colspan='2' class='center'>
182 <input type='submit' value='visualiser' />
183 <input type='submit' name='save' value='Sauver' />
184 </td>
185 </tr>
186 </table>
187</form>
188
189{/if}
190
191
192{* vim:set et sw=2 sts=2 sws=2: *}