Happy New Year!
[platal.git] / templates / payment / xnet.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2011 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}&nbsp;: Gestion des télépaiements </h1>
24
25 <p class="descr">
26 Voici la liste des paiements en ligne possible pour le groupe {$asso->nom}&nbsp;:
27 </p>
28
29 {foreach from=$titres item=p}
30
31 <fieldset>
32 <legend><a href="{$platal->ns}payment/{$p.id}">{icon name=money title="Télépaiement"}{$p.text}</a></legend>
33
34 {if $event[$p.id]}
35 {assign var='ev' value=$event[$p.id]}
36 <p>
37   {if $p.url}
38   Plus d'informations sur ce télépaiement sont disponibles sur <a href="{$p.url}">cette page</a>.<br />
39   {/if}
40   {if $ev.eid}
41   Ce paiement est associé à l'événement <a href="{$platal->ns}events">{$ev.title}</a>.<br />
42     {if $ev.ins}
43     Tu es inscrit à cet événements.
44       {if $ev.topay > $ev.paid}
45       <a href="{$platal->ns}payment/{$p.id}?montant={math equation="a-b" a=$ev.topay b=$ev.paid}">
46         Tu dois encore payer {math equation="a-b" a=$ev.topay b=$ev.paid}&euro;.
47       </a>
48       {elseif $ev.topay eq $ev.paid}
49       Tu as déjà réglé l'intégralité de ton inscription ({$ev.topay}&euro;).
50       {else}
51       Tu as réglé {$ev.paid}&euro; alors que tu n'en devais que {$ev.topay}&euro;.
52       {/if}
53     {else}
54     <a href="{$platal->ns}events/sub/{$ev.eid}">Tu peux t'inscire à cet événement.</a>
55     {/if}
56   {else}
57     {if !$ev.paid}
58     Tu n'as actuellement rien payé sur ce télépaiement.
59     {else}
60     Tu as déjà payé {$ev.paid}&euro;.
61     {/if}
62   {/if}
63 </p>
64 {/if}
65
66 {if $is_admin && $trans[$p.id]}
67 <p>Liste des personnes ayant payé (pour les administrateurs uniquement)&nbsp;:</p>
68 <table cellpadding="0" cellspacing="0" id="list_{$p.id}" class='bicol'>
69   <tr>
70     <th>
71       {if $order eq 'timestamp'}
72         <a href='{$platal->ns}payment?order={$order}&order_inv={$order_inv}'>
73           <img src="{$platal->baseurl}images/{if !$order_inv}dn{else}up{/if}.png" alt="" title="Tri {if $order_inv}dé{/if}croissant" />
74       {else}
75         <a href='{$platal->ns}payment?order=timestamp'>
76       {/if}Date</a>
77     </th>
78     <th colspan="2">
79       {if $order eq 'nom'}
80         <a href='{$platal->ns}payment?order={$order}&order_inv={$order_inv}'>
81           <img src="{$platal->baseurl}images/{if $order_inv}dn{else}up{/if}.png" alt="" title="Tri {if !$order_inv}dé{/if}croissant" />
82       {else}
83         <a href='{$platal->ns}payment?order=nom'>{/if}
84       NOM Prénom</a>
85     </th>
86     <th>
87       {if $order eq 'promo'}
88         <a href='{$platal->ns}payment?order={$order}&order_inv={$order_inv}'>
89           <img src="{$platal->baseurl}images/{if $order_inv}dn{else}up{/if}.png" alt="" title="Tri {if !$order_inv}dé{/if}croissant" />
90       {else}
91         <a href='{$platal->ns}payment?order=promo'>
92       {/if}Promo</a>
93     </th>
94     <th>
95       {if $order eq 't.comment'}
96         <a href='{$platal->ns}payment?order=comment&order_inv={$order_inv}'>
97           <img src="{$platal->baseurl}images/{if $order_inv}dn{else}up{/if}.png" alt="" title="Tri {if !$order_inv}dé{/if}   siant" />
98       {else}
99         <a href='{$platal->ns}payment?order=comment'>
100       {/if}Commentaire</a>
101     </th>
102     <th>
103       {if $order eq 'amount'}
104         <a href='{$platal->ns}payment?order={$order}&order_inv={$order_inv}'>
105           <img src="{$platal->baseurl}images/{if $order_inv}dn{else}up{/if}.png" alt="" title="Tri {if !$order_inv}dé{/if}croissant" />
106       {else}
107         <a href='{$platal->ns}payment?order=montant'>
108       {/if}Montant</a>
109     </th>
110   </tr>
111   {assign var="somme" value=0}
112   {foreach from=$trans[$p.id] item=p name=people}
113   {if $p.nom neq "somme totale"}
114   <tr>
115     <td class="center">{$p.date|date_format:"%d/%m/%y"}</td>
116     <td>
117       {profile user=$p.user promo=false}
118     </td>
119     <td>
120       <a href="mailto:{$p.user->bestEmail()}">{icon name=email title="email"}</a>
121     </td>
122     <td class="center">{$p.user->promo()}</td>
123     <td>{$p.comment|comment_decode}</td>
124     <td class="right">{$p.amount}</td>
125   </tr>
126   {elseif $smarty.foreach.people.first}
127   <tr>
128     <td colspan="6" class="center">Personne n'a encore payé pour ce télépaiement.</td>
129   </tr>
130   {else}
131   <tr class="pair">
132     <td class="right" colspan="5"><strong>Total </strong></td>
133     <th class="right">{$p.amount}</th>
134   </tr>
135   {/if}
136   {/foreach}
137 </table>
138 {/if}
139 </fieldset>
140
141 {foreachelse}
142
143 <p class="descr">
144 <em>Pas de télépaiement en cours&hellip;</em>
145 </p>
146
147 {/foreach}
148
149 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}