{**************************************************************************}
{* *}
-{* Copyright (C) 2003-2007 Polytechnique.org *}
+{* Copyright (C) 2003-2010 Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{
var state = (box.checked ? 'none' : '');
document.getElementById('promo_titre').style.display = state;
- document.getElementById('promo_min').style.display = state;
- document.getElementById('promo_max').style.display = state;
- document.getElementById('promo_desc').style.display = state;
+ document.getElementById('promo_explanation').style.display = state;
+ document.getElementById('promo_min_tr').style.display = state;
+ document.getElementById('promo_max_tr').style.display = state;
+ document.getElementById('promo_range_tr').style.display = state;
}
{/literal}
</script>
-<h1>{$asso.nom} : Edition d'une annonce</h1>
+<h1>{$asso->nom} : Édition d'une annonce</h1>
{if $art.texte}
<div>
</div>
{/if}
-<form method="post" action="{$platal->ns}announce/{if $new}new{else}edit/{$art.id}{/if}">
+<form method="post" action="{$platal->ns}announce/{if $new}new{else}edit/{$art.id}{/if}" enctype="multipart/form-data">
+{xsrf_token_field}
<div>
<table class="bicol">
<tr>
- <th colspan="2">Editer une annonce</th>
+ <th colspan="2">Éditer une annonce</th>
</tr>
<tr class="pair">
- <td class="titre">Titre :</td>
+ <td class="titre">Titre :</td>
<td><input type="text" name="titre" value="{$art.titre}" size="50" maxlength="200" /></td>
</tr>
<tr>
- <td class="titre">Contenu de l'annonce :</td>
+ <td class="titre">Contenu de l'annonce :</td>
<td>
<small>
- Le contenu est destiné à recevoir la descriptioin de ce qui est annoncé.
- Il faut éviter d'y mettre des adresses mails ou web (surtout si l'annonce est publique),
+ Le contenu est destiné à recevoir la description de ce qui est annoncé.
+ Il faut éviter d'y mettre des adresses emails ou web (surtout si l'annonce est publique),
qui devront être placées dans la section "contacts".
</small>
</td>
{/literal}
</script>
<small>
- Essaie de faire un <strong>texte court</strong>, une annonce ne doit pas excéder 600 caractères soit une dizaine de ligne.
+ Essaie de faire un <strong>texte court</strong>, une annonce ne doit pas excéder 600 caractères soit une dizaine de lignes.
Tu en es déjà à <input type='text' name='texte_count' size="4"/> caractères.
Si tu veux proposer cette annonce pour la Lettre Mensuelle, il faut te limiter à 8 lignes.
</small>
</td>
</tr>
<tr style="border-top: 1px solid gray">
- <td class="titre">Contacts :</td>
+ <td class="titre">Contacts :</td>
<td>
<small>
- La section "contacts" sert à noter les informations telles que les adresses mails de contact, les sites web.
- Elle n'est accessible qu'aux personnes authentifiées. Si l'annonce est attachée à une événement, un lien vers
+ La section "contacts" sert à noter les informations telles que les adresses emails de contact, les sites web.
+ Elle n'est accessible qu'aux personnes authentifiées. Si l'annonce est attachée à un événement, un lien vers
la page d'inscription est automatiquement ajouté.
</small>
</td>
</td>
</tr>
<tr style="border-top: 1px solid gray">
+ <td class="titre">Illustration :</td>
+ <td>
+ {if $art.id && $art.photo}
+ <div style="float: left; text-align: center">
+ <em>Image actuelle</em><br />
+ <img src="{$platal->ns}announce/photo/{$art.id}" alt="Image actuelle" /><br />
+ <input type="submit" name="valid" value="Pas d'image" />
+ <input type="hidden" name="photo" value="1" />
+ </div>
+ {/if}
+ {if $upload && $upload->exists()}
+ <div style="float: right; text-align: center">
+ <em>Nouvelle image</em><br />
+ <img src="{$platal->ns}announce/photo" alt="Nouvelle Image" /><br />
+ <input type="submit" name="valid" value="Supprimer l'image" />
+ </div>
+ {/if}
+ <div style="clear: both">
+ Choisir un fichier : <input type="file" name="image" id="image" /><br />
+ Indiquer une adresse : <input type="text" name="image_url" id="image_url" value="" />
+ </div>
+ </td>
+ </tr>
+ <tr style="border-top: 1px solid gray">
<td colspan="2" class="center">
<a href="wiki_help/notitle" class="popup3">
- {icon name=information title="Syntaxe wiki"} Voir la liste des marqueurs de mise en forme autorisés
+ {icon name=information title="Syntaxe wiki"} Voir la liste des marqueurs de mise en forme autorisés.
</a>
</td>
</tr>
<table class="tinybicol">
<tr>
- <td class="titre">Date de péremption :</td>
+ <td class="titre">Date de péremption :</td>
<td>
- {valid_date name="peremption" value=$art.peremption}
+ {valid_date name="expiration" value=$art.expiration}
</td>
</tr>
{if $events}
<tr>
- <td class="titre">Attacher à un événement :</td>
+ <td class="titre">Attacher à un événement :</td>
<td>
<select name="event">
<option value="" {if !$art.event}selected="selected"{/if}>-- Aucun --</option>
{iterate item=evt from=$events}
- <option value="{$evt.short_name|default:$evt.eid}"
+ <option value="{$evt.short_name|default:$evt.eid}"
{if $art.event eq $evt.short_name|default:$evt.eid}selected="selected"{/if}>
{$evt.intitule}
</option>
</tr>
{/if}
<tr>
- <td class="titre">Visibilité :</td>
+ <td class="titre">Visibilité :</td>
<td>
- <input type="checkbox" name="public" {if $art.public}checked="checked"{/if} onchange="visibilityChange(this)" />
- Rendre cette annonce publique
+ <label><input type="checkbox" name="public" {if $art.public}checked="checked"{/if} onchange="visibilityChange(this)" />
+ Rendre cette annonce publique.</label>
</td>
</tr>
<tr id="promo_titre" {if $art.public}style="display: none"{/if}>
- <th colspan="2">Promotions cibles</th>
- </tr>
- <tr id="promo_min" {if $art.public}style="display: none"{/if}>
- <td class="titre">Promotion minimale :</td>
- <td>
- <input type="text" size="4" maxlength="4" name="promo_min" value="{$art.promo_min|default:0}" />
- incluse* (ex : 1980)
- </td>
- </tr>
- <tr id="promo_max" {if $art.public}style="display: none"{/if}>
- <td class="titre">Promotion maximale :</td>
- <td>
- <input type="text" size="4" maxlength="4" name="promo_max" value="{$art.promo_max|default:0}" />
- incluse* (ex : 2000)
- </td>
- </tr>
- <tr class="pair" id="promo_desc" {if $art.public}style="display: none"{/if}>
- <td colspan="2">
- <small>* 0 signifie qu'il n'y a pas de limite</small>
- </td>
- </tr>
+ <th colspan="2">Promotions d'entrée cibles</th>
+ </tr>
+ <tr id="promo_explanation" {if $art.public}style="display: none"{/if}>
+ <td colspan="2"><span class="smaller">{icon name=information} par exemple 2004 pour les X2004</span></td>
+ </tr>
+ {include file="include/field.promo.tpl" promo_min=$art.promo_min promo_max=$art.promo_max}
+ {if $art.public}
+ <script type="text/javascript">//<![CDATA[
+ document.getElementById('promo_min_tr').style.display = 'none';
+ document.getElementById('promo_max_tr').style.display = 'none';
+ document.getElementById('promo_range_tr').style.display = 'none';
+ //]]></script>
+ {/if}
{if $new}
<tr>
<th colspan="2">Demandes de publication</th>
</tr>
<tr>
<td colspan="2">
- <input type="checkbox" name="xorg" {if $art.xorg}checked="checked"{/if} />
- sur la page d'accueil de Polytechnique.org
+ <label><input type="checkbox" name="xorg" {if $art.xorg}checked="checked"{/if} />
+ sur la page d'accueil de Polytechnique.org</label>
</td>
</tr>
<tr>
<td colspan="2">
- <input type="checkbox" name="nl" {if $art.nl}checked="checked"{/if} />
- dans la Lettre Mensuelle de Polytechnique.org
+ <label><input type="checkbox" name="nl" {if $art.nl}checked="checked"{/if} />
+ dans la Lettre Mensuelle de Polytechnique.org</label>
</td>
</tr>
<tr class="pair">
<td colspan="2">
<small>Les demandes de publication sont soumises à validation par l'équipe
- de Polytechnique.org</small>
+ de Polytechnique.org.</small>
</td>
</tr>
{/if}
{/if}
<input type="submit" name="valid" value="Visualiser" /><br />
{if $art.texte}
- <input type="submit" name="valid" value="Enregistrer" />
+ <input type="submit" name="valid" value="Enregistrer" />
{if !$new}
<input type="submit" name="valid" value="Annuler" />
{/if}