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