Add a announce system on X.net
[platal.git] / templates / xnet / groupe / announce-edit.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2006 Polytechnique.org                             *}
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>{$asso.nom} : Edition d'une annonce</h1>
24
25 {if $art.texte}
26 <div>
27 {include file="xnet/groupe/form.announce.tpl" admin=true}
28 <br />
29 </div>
30 {/if}
31
32 <form method="post" action="{$platal->ns}announce/{if $new}new{else}edit/{$art.id}{/if}">
33 <div>
34   <table class="bicol">
35     <tr>
36       <th colspan="2">Editer une annonce</th>
37     </tr>
38     <tr class="pair">
39       <td class="titre">Titre :</td>
40       <td><input type="text" name="titre" value="{$art.titre}" size="50" maxlength="200" /></td>
41     </tr>
42     <tr>
43       <td class="titre">Contenu de l'annonce :</td>
44       <td>
45         <small>
46           Le contenu est destiné à recevoir la descriptioin de ce qui est annoncé.
47           Il faut éviter d'y mettre des adresses mails ou web (surtout si l'annonce est publique),
48           qui devront être placées dans la section "contacts".
49         </small>
50       </td>
51     </tr>
52     <tr>
53       <td colspan="2">
54         <textarea name="texte" rows="10" cols="60" onfocus="update_texte_count(this.form)">{$art.texte}</textarea>
55         <br />
56         <script type="text/javascript">
57           var form_propose_texte = false;
58           {literal}
59           function update_texte_count(f) {
60             if (!form_propose_texte && f) form_propose_texte = f;
61             form_propose_texte.texte_count.value=form_propose_texte.texte.value.length;
62             setTimeout("update_texte_count(0)", 100);
63           }
64           {/literal}
65         </script>
66         <small>
67           Essaie de faire un <strong>texte court</strong>, une annonce ne doit pas excéder 600 caractères soit une dizaine de ligne.
68           Tu en es déjà à <input type='text' name='texte_count' size="4"/> caractères.
69           Si tu veux proposer cette annonce pour la Lettre Mensuelle, il faut te limiter à 8 lignes.
70         </small>
71       </td>
72     </tr>
73     <tr style="border-top: 1px solid gray">
74       <td class="titre">Contacts :</td>
75       <td>
76         <small>
77           La section "contacts" sert à noter les informations telles que les adresses mails de contact, les sites web.
78           Elle n'est accessible qu'aux personnes authentifiées. Si l'annonce est attachée à une événement, un lien vers
79           la page d'inscription est automatiquement ajouté.
80         </small>
81       </td>
82     </tr>
83     <tr>
84       <td colspan="2">
85         <textarea cols="60" rows="6" name='contacts'>{$art.contacts}</textarea>
86       </td>
87     </tr>
88   </table>
89   <br />
90
91   <table class="tinybicol">
92     <tr>
93       <th colspan="2">Promotions cibles</th>
94     </tr>
95     <tr>
96       <td class="titre">Promotion minimale :</td>
97       <td>
98         <input type="text" size="4" maxlength="4" name="promo_min" value="{$art.promo_min|default:0}" />
99         incluse*  (ex : 1980)
100       </td>
101     </tr>
102     <tr>
103       <td class="titre">Promotion minimale :</td>
104       <td>
105         <input type="text" size="4" maxlength="4" name="promo_max" value="{$art.promo_max|default:0}" />
106         incluse*  (ex : 2000)
107       </td>
108     </tr>
109     <tr class="pair">
110       <td colspan="2">
111         <small>* 0 signifie qu'il n'y a pas de limite</small>
112       </td>
113     </tr>
114     <tr>
115       <th colspan="2">Options</th>
116     </tr>
117     <tr>
118       <td class="titre">Date de péremption :</td>
119       <td>
120         <select name="peremption">
121           {$select|smarty:nodefaults}
122         </select>
123       </td>
124     </tr>
125     {if $events}
126     <tr>
127       <td class="titre">Attacher à un événement :</td>
128       <td>
129         <select name="event">
130           <option value="" {if !$art.event}selected="selected"{/if}>-- Aucun --</option>
131           {iterate item=evt from=$events}
132           <option value="{$evt.short_name|default:$evt.eid}" 
133             {if $art.event eq $evt.short_name|default:$evt.eid}selected="selected"{/if}>
134             {$evt.intitule}
135           </option>
136           {/iterate}
137         </select>
138       </td>
139     </tr>
140     {/if}
141     <tr> 
142       <td class="titre">Visibilité :</td>
143       <td>
144         <input type="checkbox" name="public" {if $art.public}checked="checked"{/if} />
145         Rendre cette annonce publique
146       </td>
147     </tr>
148     {if $new}
149     <tr>
150       <th colspan="2">Demandes de publication</th>
151     </tr>
152     <tr>
153       <td colspan="2">
154         <input type="checkbox" name="xorg" {if $art.xorg}checked="checked"{/if} />
155         sur la page d'accueil de Polytechnique.org
156       </td>
157     </tr>
158     <tr>
159       <td colspan="2">
160         <input type="checkbox" name="nl" {if $art.nl}checked="checked"{/if} />
161         dans la Lettre Mensuelle de Polytechnique.org
162       </td>
163     </tr>
164     <tr class="pair">
165       <td colspan="2">
166         <small>Les demandes de publication sont soumises à validation par l'équipe
167         de Polytechnique.org</small>
168       </td>
169     </tr>
170     {/if}
171   </table>
172
173   <div class="center">
174     {if $art.id}
175     <input type="hidden" name="id" value="{$art.id}" />
176     {/if}
177     <input type="submit" name="valid" value="Visualiser" /><br />
178     {if $art.texte}
179     <input type="submit" name="valid" value="Enregistrer" /> 
180     {if !$new}
181     <input type="submit" name="valid" value="Annuler" />
182     {/if}
183     {/if}
184   </div>
185 </div>
186 </form>
187
188 {* vim:set et sw=2 sts=2 sws=2: *}