| 1 | {**************************************************************************} |
| 2 | {* *} |
| 3 | {* Copyright (C) 2003-2010 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 | <script type="text/javascript"> |
| 24 | {literal} |
| 25 | function visibilityChange(box) |
| 26 | { |
| 27 | var state = (box.checked ? 'none' : ''); |
| 28 | document.getElementById('promo_titre').style.display = state; |
| 29 | document.getElementById('promo_explanation').style.display = state; |
| 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; |
| 33 | } |
| 34 | {/literal} |
| 35 | </script> |
| 36 | <h1>{$asso->nom} : Édition d'une annonce</h1> |
| 37 | |
| 38 | {if $art.texte} |
| 39 | <div> |
| 40 | {include file="xnetgrp/form.announce.tpl" admin=true} |
| 41 | <br /> |
| 42 | </div> |
| 43 | {/if} |
| 44 | |
| 45 | <form method="post" action="{$platal->ns}announce/{if $new}new{else}edit/{$art.id}{/if}" enctype="multipart/form-data"> |
| 46 | {xsrf_token_field} |
| 47 | <div> |
| 48 | <table class="bicol"> |
| 49 | <tr> |
| 50 | <th colspan="2">Éditer une annonce</th> |
| 51 | </tr> |
| 52 | <tr class="pair"> |
| 53 | <td class="titre">Titre :</td> |
| 54 | <td><input type="text" name="titre" value="{$art.titre}" size="50" maxlength="200" /></td> |
| 55 | </tr> |
| 56 | <tr> |
| 57 | <td class="titre">Contenu de l'annonce :</td> |
| 58 | <td> |
| 59 | <small> |
| 60 | Le contenu est destiné à recevoir la description de ce qui est annoncé. |
| 61 | Il faut éviter d'y mettre des adresses emails ou web (surtout si l'annonce est publique), |
| 62 | qui devront être placées dans la section "contacts". |
| 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> |
| 81 | Essaie de faire un <strong>texte court</strong>, une annonce ne doit pas excéder 600 caractères soit une dizaine de lignes. |
| 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. |
| 84 | </small> |
| 85 | </td> |
| 86 | </tr> |
| 87 | <tr style="border-top: 1px solid gray"> |
| 88 | <td class="titre">Contacts :</td> |
| 89 | <td> |
| 90 | <small> |
| 91 | La section "contacts" sert à noter les informations telles que les adresses emails de contact, les sites web. |
| 92 | Elle n'est accessible qu'aux personnes authentifiées. Si l'annonce est attachée à un événement, un lien vers |
| 93 | la page d'inscription est automatiquement ajouté. |
| 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> |
| 102 | <tr style="border-top: 1px solid gray"> |
| 103 | <td class="titre">Illustration :</td> |
| 104 | <td> |
| 105 | {if $art.id && $art.photo} |
| 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" /> |
| 110 | <input type="hidden" name="photo" value="1" /> |
| 111 | </div> |
| 112 | {/if} |
| 113 | {if $upload && $upload->exists()} |
| 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"> |
| 127 | <td colspan="2" class="center"> |
| 128 | <a href="wiki_help/notitle" class="popup3"> |
| 129 | {icon name=information title="Syntaxe wiki"} Voir la liste des marqueurs de mise en forme autorisés. |
| 130 | </a> |
| 131 | </td> |
| 132 | </tr> |
| 133 | </table> |
| 134 | <br /> |
| 135 | |
| 136 | <table class="tinybicol"> |
| 137 | <tr> |
| 138 | <td class="titre">Date de péremption :</td> |
| 139 | <td> |
| 140 | {valid_date name="expiration" value=$art.expiration} |
| 141 | </td> |
| 142 | </tr> |
| 143 | {if $events} |
| 144 | <tr> |
| 145 | <td class="titre">Attacher à un événement :</td> |
| 146 | <td> |
| 147 | <select name="event"> |
| 148 | <option value="" {if !$art.event}selected="selected"{/if}>-- Aucun --</option> |
| 149 | {iterate item=evt from=$events} |
| 150 | <option value="{$evt.short_name|default:$evt.eid}" |
| 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} |
| 159 | <tr> |
| 160 | <td class="titre">Visibilité :</td> |
| 161 | <td> |
| 162 | <label><input type="checkbox" name="public" {if $art.public}checked="checked"{/if} onchange="visibilityChange(this)" /> |
| 163 | Rendre cette annonce publique.</label> |
| 164 | </td> |
| 165 | </tr> |
| 166 | <tr id="promo_titre" {if $art.public}style="display: none"{/if}> |
| 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> |
| 171 | </tr> |
| 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} |
| 180 | {if $new} |
| 181 | <tr> |
| 182 | <th colspan="2">Demandes de publication</th> |
| 183 | </tr> |
| 184 | <tr> |
| 185 | <td colspan="2"> |
| 186 | <label><input type="checkbox" name="xorg" {if $art.xorg}checked="checked"{/if} /> |
| 187 | sur la page d'accueil de Polytechnique.org</label> |
| 188 | </td> |
| 189 | </tr> |
| 190 | <tr> |
| 191 | <td colspan="2"> |
| 192 | <label><input type="checkbox" name="nl" {if $art.nl}checked="checked"{/if} /> |
| 193 | dans la Lettre Mensuelle de Polytechnique.org</label> |
| 194 | </td> |
| 195 | </tr> |
| 196 | <tr class="pair"> |
| 197 | <td colspan="2"> |
| 198 | <small>Les demandes de publication sont soumises à validation par l'équipe |
| 199 | de Polytechnique.org.</small> |
| 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} |
| 211 | <input type="submit" name="valid" value="Enregistrer" /> |
| 212 | {if !$new} |
| 213 | <input type="submit" name="valid" value="Annuler" /> |
| 214 | {/if} |
| 215 | {/if} |
| 216 | </div> |
| 217 | </div> |
| 218 | </form> |
| 219 | |
| 220 | {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} |