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