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