migrate evenements.php (partially I guess) and csv export
[platal.git] / templates / xnet / groupe / evenements.tpl
index fbd0fbf..96f3832 100644 (file)
@@ -1,6 +1,6 @@
 {**************************************************************************}
 {*                                                                        *}
-{*  Copyright (C) 2003-2004 Polytechnique.org                             *}
+{*  Copyright (C) 2003-2006 Polytechnique.org                             *}
 {*  http://opensource.polytechnique.org/                                  *}
 {*                                                                        *}
 {*  This program is free software; you can redistribute it and/or modify  *}
@@ -44,7 +44,7 @@ Ev
 
   {else}
 
-  <form action="{$smarty.server.PHP_SELF}" method="post">
+  <form action="{rel}/{$platal->ns}events" method="post">
   {foreach from=$evenements item=e}
   <table class="tiny" cellspacing="0" cellpadding="0">
     <tr {popup caption=$e.intitule" text=$e.descriptif}>
@@ -52,7 +52,7 @@ Ev
         {$e.intitule}
         {if $admin}
         <a href="evt-modif.php?mod=1&amp;eid={$e.eid}"><img src="{rel}/images/profil.png" title="Edition de l'événement" alt="Edition de l'événement" /></a>
-        <a href="evt-modif.php?sup=1&amp;eid={$e.eid}"><img src="{rel}/images/del.png" alt="Suppression de {$e.intitule}" title="Suppression de {$e.intitule}" /></a>
+        <a href="evt-modif.php?sup=1&amp;eid={$e.eid}" onclick="return confirm('Supprimer l\'événement effacera la liste des inscrits et des paiements.\n Es-tu sûr de vouloir supprimer l\'événement ?')"><img src="{rel}/images/del.png" alt="Suppression de {$e.intitule}" title="Suppression de {$e.intitule}" /></a>
         {/if}
       </th>
     </tr>
@@ -74,7 +74,7 @@ Ev
     <tr {popup caption=$e.intitule text=$e.descriptif}>
       <td class="titre">annonceur :</td>
       <td>
-        <a href='https://polytechnique.org/fiche.php?user={$e.alias}' class='popup2'>{$e.prenom} {$e.nom} ({$e.promo})</a>
+        <a href='https://polytechnique.org/profile/{$e.alias}' class='popup2'>{$e.prenom} {$e.nom} ({$e.promo})</a>
       </td>
     </tr>
     {if $admin || $e.show_participants}
@@ -105,15 +105,20 @@ Ev
             {if $e.inscr_open}
               <input type="radio" name="moment{$e.eid}_{$m.item_id}" value="0"
               {if !$m.nb}checked="checked"{/if}/>non
-              <input type="radio" name="moment{$e.eid}_{$m.item_id}" value="1"
-              {if $m.nb eq 1}checked="checked"{/if}/>seul<br />
-              <input type="radio" name="moment{$e.eid}_{$m.item_id}" value="2"
-              {if $m.nb > 1}checked="checked"{/if}/>avec <input size="2" name="personnes{$e.eid}_{$m.item_id}" value="{if $m.nb > 1}{math equation="x - y" x=$m.nb y=1}{else}1{/if}"/> personnes
+              {if $e.noinvite}
+                  <input type="radio" name="moment{$e.eid}_{$m.item_id}" value="1"
+                  {if $m.nb eq 1}checked="checked"{/if}/>oui
+              {else}
+                  <input type="radio" name="moment{$e.eid}_{$m.item_id}" value="1"
+                  {if $m.nb eq 1}checked="checked"{/if}/>seul<br />
+                  <input type="radio" name="moment{$e.eid}_{$m.item_id}" value="2"
+                  {if $m.nb > 1}checked="checked"{/if}/>avec <input size="2" name="personnes{$e.eid}_{$m.item_id}" value="{if $m.nb > 1}{math equation="x - y" x=$m.nb y=1}{else}1{/if}"/> personnes
+              {/if}
             {else}
               {if !$m.nb}
                 Je ne viendrai pas.
               {elseif $m.nb eq 1}
-                Je viendrai seul.
+                Je viendrai{if !$e.noinvite} seul{/if}.
               {else}
                 Je viendrai avec {$m.nb} personne{if $m.nb > 2}s{/if}
               {/if}
@@ -138,7 +143,7 @@ Ev
         <td colspan="2" {if $montant > $e.paid}class="erreur"{/if}>
           Tu dois payer {$montant|replace:'.':','}&nbsp;&euro;{if $e.paid > 0}, et tu as déjà payé {$e.paid|replace:'.':','}&nbsp;&euro;{/if}.
           {if $e.paiement_id && $montant > $e.paid}
-            [<a href="https://www.polytechnique.org/paiement/?ref={$e.paiement_id}&amp;montant={math equation="x - y" x=$montant y=$e.paid}">Payer en ligne</a>]
+            [<a href="https://www.polytechnique.org/payment/{$e.paiement_id}?montant={math equation="x - y" x=$montant y=$e.paid}">Payer en ligne</a>]
           {/if}
         </td>
       </tr>
@@ -149,6 +154,8 @@ Ev
     <p style="text-align:center">
       <input type="submit" value="Valider mes inscriptions" />
     </p>
+  {else}
+    <p>&nbsp;</p>
   {/if}
   {/foreach}