Commit | Line | Data |
---|---|---|
24bcf50c | 1 | {**************************************************************************} |
2 | {* *} | |
5e1513f6 | 3 | {* Copyright (C) 2003-2011 Polytechnique.org *} |
24bcf50c | 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 | ||
2a557a09 | 23 | <script type="text/javascript"> |
24 | {literal} | |
25 | function visibilityChange(box) | |
26 | { | |
dc2073c3 | 27 | var state = (box.checked ? 'none' : ''); |
2a557a09 | 28 | document.getElementById('promo_titre').style.display = state; |
5a9ad4b0 | 29 | document.getElementById('promo_explanation').style.display = state; |
05cb05c0 | 30 | document.getElementById('promo_min_tr').style.display = state; |
31 | document.getElementById('promo_max_tr').style.display = state; | |
32 | document.getElementById('promo_range_tr').style.display = state; | |
2a557a09 | 33 | } |
34 | {/literal} | |
35 | </script> | |
34ade5a6 | 36 | <h1>{$asso->nom} : Édition d'une annonce</h1> |
24bcf50c | 37 | |
38 | {if $art.texte} | |
39 | <div> | |
892083ef | 40 | {include file="xnetgrp/form.announce.tpl" admin=true} |
24bcf50c | 41 | <br /> |
42 | </div> | |
43 | {/if} | |
44 | ||
ff95a302 | 45 | <form method="post" action="{$platal->ns}announce/{if $new}new{else}edit/{$art.id}{/if}" enctype="multipart/form-data"> |
e7fdf9dd | 46 | {xsrf_token_field} |
24bcf50c | 47 | <div> |
48 | <table class="bicol"> | |
49 | <tr> | |
77af6562 | 50 | <th colspan="2">Éditer une annonce</th> |
24bcf50c | 51 | </tr> |
52 | <tr class="pair"> | |
e8439508 | 53 | <td class="titre">Titre :</td> |
24bcf50c | 54 | <td><input type="text" name="titre" value="{$art.titre}" size="50" maxlength="200" /></td> |
55 | </tr> | |
56 | <tr> | |
e8439508 | 57 | <td class="titre">Contenu de l'annonce :</td> |
24bcf50c | 58 | <td> |
59 | <small> | |
661e78f7 | 60 | Le contenu est destiné à recevoir la description de ce qui est annoncé. |
faefdbb7 | 61 | Il faut éviter d'y mettre des adresses emails ou web (surtout si l'annonce est publique), |
a7de4ef7 | 62 | qui devront être placées dans la section "contacts". |
24bcf50c | 63 | </small> |
64 | </td> | |
65 | </tr> | |
66 | <tr> | |
67 | <td colspan="2"> | |
68 | <textarea name="texte" rows="10" cols="60" onfocus="update_texte_count(this.form)">{$art.texte}</textarea> | |
69 | <br /> | |
70 | <script type="text/javascript"> | |
71 | var form_propose_texte = false; | |
72 | {literal} | |
73 | function update_texte_count(f) { | |
74 | if (!form_propose_texte && f) form_propose_texte = f; | |
75 | form_propose_texte.texte_count.value=form_propose_texte.texte.value.length; | |
76 | setTimeout("update_texte_count(0)", 100); | |
77 | } | |
78 | {/literal} | |
79 | </script> | |
80 | <small> | |
77af6562 | 81 | Essaie de faire un <strong>texte court</strong>, une annonce ne doit pas excéder 600 caractères soit une dizaine de lignes. |
a7de4ef7 | 82 | Tu en es déjà à <input type='text' name='texte_count' size="4"/> caractères. |
83 | Si tu veux proposer cette annonce pour la Lettre Mensuelle, il faut te limiter à 8 lignes. | |
24bcf50c | 84 | </small> |
85 | </td> | |
86 | </tr> | |
87 | <tr style="border-top: 1px solid gray"> | |
e8439508 | 88 | <td class="titre">Contacts :</td> |
24bcf50c | 89 | <td> |
90 | <small> | |
faefdbb7 | 91 | La section "contacts" sert à noter les informations telles que les adresses emails de contact, les sites web. |
484f2fc4 | 92 | Elle n'est accessible qu'aux personnes authentifiées. Si l'annonce est attachée à un événement, un lien vers |
a7de4ef7 | 93 | la page d'inscription est automatiquement ajouté. |
24bcf50c | 94 | </small> |
95 | </td> | |
96 | </tr> | |
97 | <tr> | |
98 | <td colspan="2"> | |
99 | <textarea cols="60" rows="6" name='contacts'>{$art.contacts}</textarea> | |
100 | </td> | |
101 | </tr> | |
72b2f8bb | 102 | <tr style="border-top: 1px solid gray"> |
77af6562 | 103 | <td class="titre">Illustration :</td> |
ff95a302 | 104 | <td> |
2f8677c2 | 105 | {if $art.id && $art.photo} |
ff95a302 FB |
106 | <div style="float: left; text-align: center"> |
107 | <em>Image actuelle</em><br /> | |
108 | <img src="{$platal->ns}announce/photo/{$art.id}" alt="Image actuelle" /><br /> | |
109 | <input type="submit" name="valid" value="Pas d'image" /> | |
2f8677c2 | 110 | <input type="hidden" name="photo" value="1" /> |
ff95a302 FB |
111 | </div> |
112 | {/if} | |
2f8677c2 | 113 | {if $upload && $upload->exists()} |
ff95a302 FB |
114 | <div style="float: right; text-align: center"> |
115 | <em>Nouvelle image</em><br /> | |
116 | <img src="{$platal->ns}announce/photo" alt="Nouvelle Image" /><br /> | |
117 | <input type="submit" name="valid" value="Supprimer l'image" /> | |
118 | </div> | |
119 | {/if} | |
120 | <div style="clear: both"> | |
121 | Choisir un fichier : <input type="file" name="image" id="image" /><br /> | |
122 | Indiquer une adresse : <input type="text" name="image_url" id="image_url" value="" /> | |
123 | </div> | |
124 | </td> | |
125 | </tr> | |
126 | <tr style="border-top: 1px solid gray"> | |
72b2f8bb | 127 | <td colspan="2" class="center"> |
128 | <a href="wiki_help/notitle" class="popup3"> | |
77af6562 | 129 | {icon name=information title="Syntaxe wiki"} Voir la liste des marqueurs de mise en forme autorisés. |
72b2f8bb | 130 | </a> |
131 | </td> | |
132 | </tr> | |
24bcf50c | 133 | </table> |
134 | <br /> | |
135 | ||
136 | <table class="tinybicol"> | |
137 | <tr> | |
e8439508 | 138 | <td class="titre">Date de péremption :</td> |
24bcf50c | 139 | <td> |
b58e5ac2 | 140 | {valid_date name="expiration" value=$art.expiration} |
24bcf50c | 141 | </td> |
142 | </tr> | |
143 | {if $events} | |
144 | <tr> | |
e8439508 | 145 | <td class="titre">Attacher à un événement :</td> |
24bcf50c | 146 | <td> |
147 | <select name="event"> | |
148 | <option value="" {if !$art.event}selected="selected"{/if}>-- Aucun --</option> | |
149 | {iterate item=evt from=$events} | |
ff95a302 | 150 | <option value="{$evt.short_name|default:$evt.eid}" |
24bcf50c | 151 | {if $art.event eq $evt.short_name|default:$evt.eid}selected="selected"{/if}> |
152 | {$evt.intitule} | |
153 | </option> | |
154 | {/iterate} | |
155 | </select> | |
156 | </td> | |
157 | </tr> | |
158 | {/if} | |
2a557a09 | 159 | <tr> |
e8439508 | 160 | <td class="titre">Visibilité :</td> |
24bcf50c | 161 | <td> |
a44f405e SJ |
162 | <label><input type="checkbox" name="public" {if $art.public}checked="checked"{/if} onchange="visibilityChange(this)" /> |
163 | Rendre cette annonce publique.</label> | |
24bcf50c | 164 | </td> |
165 | </tr> | |
2a557a09 | 166 | <tr id="promo_titre" {if $art.public}style="display: none"{/if}> |
5a9ad4b0 SJ |
167 | <th colspan="2">Promotions d'entrée cibles</th> |
168 | </tr> | |
169 | <tr id="promo_explanation" {if $art.public}style="display: none"{/if}> | |
170 | <td colspan="2"><span class="smaller">{icon name=information} par exemple 2004 pour les X2004</span></td> | |
2a557a09 | 171 | </tr> |
05cb05c0 | 172 | {include file="include/field.promo.tpl" promo_min=$art.promo_min promo_max=$art.promo_max} |
173 | {if $art.public} | |
174 | <script type="text/javascript">//<![CDATA[ | |
175 | document.getElementById('promo_min_tr').style.display = 'none'; | |
176 | document.getElementById('promo_max_tr').style.display = 'none'; | |
177 | document.getElementById('promo_range_tr').style.display = 'none'; | |
178 | //]]></script> | |
179 | {/if} | |
24bcf50c | 180 | {if $new} |
181 | <tr> | |
182 | <th colspan="2">Demandes de publication</th> | |
183 | </tr> | |
184 | <tr> | |
185 | <td colspan="2"> | |
a44f405e SJ |
186 | <label><input type="checkbox" name="xorg" {if $art.xorg}checked="checked"{/if} /> |
187 | sur la page d'accueil de Polytechnique.org</label> | |
24bcf50c | 188 | </td> |
189 | </tr> | |
190 | <tr> | |
191 | <td colspan="2"> | |
a44f405e SJ |
192 | <label><input type="checkbox" name="nl" {if $art.nl}checked="checked"{/if} /> |
193 | dans la Lettre Mensuelle de Polytechnique.org</label> | |
24bcf50c | 194 | </td> |
195 | </tr> | |
196 | <tr class="pair"> | |
197 | <td colspan="2"> | |
a7de4ef7 | 198 | <small>Les demandes de publication sont soumises à validation par l'équipe |
77af6562 | 199 | de Polytechnique.org.</small> |
24bcf50c | 200 | </td> |
201 | </tr> | |
202 | {/if} | |
203 | </table> | |
204 | ||
205 | <div class="center"> | |
206 | {if $art.id} | |
207 | <input type="hidden" name="id" value="{$art.id}" /> | |
208 | {/if} | |
209 | <input type="submit" name="valid" value="Visualiser" /><br /> | |
210 | {if $art.texte} | |
ff95a302 | 211 | <input type="submit" name="valid" value="Enregistrer" /> |
24bcf50c | 212 | {if !$new} |
213 | <input type="submit" name="valid" value="Annuler" /> | |
214 | {/if} | |
215 | {/if} | |
216 | </div> | |
217 | </div> | |
218 | </form> | |
219 | ||
a7de4ef7 | 220 | {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} |