Fusion: strip leading particules from names when comparing them
[platal.git] / templates / newsletter / submit.tpl
index 192914a..53f00bd 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2004 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2014 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
 {*                                                                        *}
 {**************************************************************************}
 
+<h1>Proposer un article pour la prochaine Lettre mensuelle</h1>
 
-<h1>
-  Proposer un article à sur la prochaine Lettre mensuelle
-</h1>
-
-
-{if $submited}
+{if t($submited)}
 
 <p>
-ton article a bien été pris en compte.
+Ton article a bien été pris en compte.
 </p>
 
 <p>
-Nous te recontacterons éventuellement (certainement vers la fin du mois) si nous avons des
-renseignements à te demander à son sujet !
+Nous te recontacterons éventuellement (certainement vers la fin du mois) si nous avons des
+renseignements à te demander à son sujet&nbsp;!
 </p>
 
 {else}
 
 
-{if $art}
+{if t($art)}
 
 {if !$art->check()}
 <p class='erreur'>
-article trop long !<br />
-il faut te limiter à 8 lignes de 68 caractères.
+L'article que tu as proposé est trop long&nbsp;!<br />
+Il te faut te limiter à 8 lignes de 68 caractères.
 </p>
 {/if}
 
-<form action="{$smarty.server.PHP_SELF}" method='post'>
-  <table class='tinybicol'>
+<form action="nl/submit" method='post'>
+  <table class='bicol'>
     <tr><th>Version texte</th></tr>
     <tr id='text'>
     <td><pre>{$art->toText()}</pre></td>
     </tr>
-    {if $art->check()}
     <tr><th>Version html</th></tr>
     <tr id='html'>
       <td>
@@ -64,13 +59,14 @@ il faut te limiter 
         </div>
       </td>
     </tr>
+    {if $art->check()}
     <tr>
       <th>Soumettre</th>
     </tr>
     <tr>
       <td>
-        Si tu es content de ton article, tu peux le soumetre.
-        Sinon, tu peux continuer à l'éditer en dessous
+        Si tu es content de ton article, tu peux le soumettre.
+        Sinon, tu peux continuer à l'éditer en dessous.
       </td>
     </tr>
     <tr>
@@ -78,7 +74,7 @@ il faut te limiter 
         <input type='hidden' value="{$smarty.request.title}" name='title' />
         <input type='hidden' value="{$art->body()}" name="body" />
         <input type='hidden' value="{$art->append()}" name='append' />
-        <input type='submit' name='valid' value='soumettre' />
+        <input type='submit' name='valid' value='Soumettre' />
       </td>
     </tr>
     {/if}
@@ -89,46 +85,58 @@ il faut te limiter 
 
 {/if}
 
-<p>
-Il faut absolument que ton article fasse moins de 8 lignes (non vides) de 68 caractères.
-</p>
+<h2>Proposer un article</h2>
 
 <p>
-Les contacts, prix, adresses mail utiles, liens web, ...  sont en sus, et sont à placer dans la case "Ajouts"
+Tu peux <a href='nl/submit#conseils'>lire les conseils de rédaction</a> avant de proposer ton article.
 </p>
-
-<form action="{$smarty.server.PHP_SELF}" method='post'>
-  <table class="bicol" cellpadding="3" cellspacing="0" summary="liste des NL">
+<form action="nl/submit" method='post'>
+  <table class="bicol" cellpadding="3" cellspacing="0" summary="proposer un article">
     <tr>
-      <th colspan='2'>proposer un article</th>
+      <th colspan='2'>Proposer un article</th>
     </tr>
     <tr class="impair">
-      <td class='titre'>Sujet</td>
+        <td class='titre'>Sujet</td>
       <td>
-        <input size='60' type='text' value='{$smarty.request.title|escape}' name='title' />
+        <input size='60' maxlength='60' type='text' value='{$smarty.request.title}' name='title' />
       </td>
     </tr>
     <tr class="pair">
       <td class='titre'>Contenu</td>
       <td>
-        <textarea cols="68" rows="10" name='body'>{if $art}{$art->body()}{/if}</textarea>
+        <textarea onchange="{literal}$.post('nl/remaining/', {'body': this.value}, function(data) {$('#remaining').html(data)}){/literal}"
+                  onkeyup="{literal}$.post('nl/remaining/', {'body': this.value}, function(data) {$('#remaining').html(data)}){/literal}"
+                  cols="68" rows="8" name="body" >{if t($art)}{$art->body()}{/if}</textarea>
       </td>
     </tr>
+    <tr class="pair">
+      <td id="remaining" class="center" colspan="2"></td>
+    </tr>
     <tr class="impair">
-      <td class='titre'>Ajouts (emails, contacts, tarifs, site web, ...)</td>
+      <td class='titre'>Ajouts (emails, contacts, tarifs, site web&hellip;)</td>
       <td>
-        <textarea cols="68" rows="6" name='append'>{if $art}{$art->append()}{/if}</textarea>
+        <textarea cols="68" rows="3" name='append'>{if t($art)}{$art->append()}{/if}</textarea>
+      </td>
+    </tr>
+    <tr class="pair smaller">
+      <td></td>
+      <td>
+        <a href="wiki_help/notitle" class="popup3">
+          {icon name=information title="Syntaxe wiki"} Voir les marqueurs de mise en forme autorisés
+        </a>
       </td>
     </tr>
     <tr class='pair'>
       <td colspan='2' class='center'>
-        <input type='submit' name='see' value='visualiser' />
+        <input type='submit' name='see' value='Visualiser' />
       </td>
     </tr>
   </table>
 </form>
 
-{/if}
+<a id='conseils'></a>
+{include wiki=Xorg.LettreMensuelle}
 
+{/if}
 
-{* vim:set et sw=2 sts=2 sws=2: *}
+{* vim:set et sw=2 sts=2 sws=2 fenc=utf-8: *}