Happy New Year!
[platal.git] / templates / payment / xnet.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2014 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}">{icon name=money title="Télépaiement"}{$p.text}</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énement.
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>
83   Liste des personnes ayant payé (pour les administrateurs uniquement)&nbsp;:<br />
84   {include file="include/csv.tpl" url="`$platal->ns`payment/csv/`$p.id`.csv"}
85 </p>
86 <table cellpadding="0" cellspacing="0" id="list_{$p.id}" class='bicol'>
87   <tr>
88     <th>
89       {if $order eq 'timestamp' && $order_id eq $p.id}
90         <a href='{$platal->ns}payment?order={$order}&amp;order_inv={$order_inv}&amp;order_id={$p.id}'>
91           <img src="{$platal->baseurl}images/{if !$order_inv}dn{else}up{/if}.png" alt="" title="Tri {if $order_inv}dé{/if}croissant" />
92       {else}
93         <a href='{$platal->ns}payment?order=timestamp&amp;order_id={$p.id}'>
94       {/if}Date</a>
95     </th>
96     <th colspan="2">
97       {if $order eq 'directory_name' && $order_id eq $p.id}
98         <a href='{$platal->ns}payment?order={$order}&amp;order_inv={$order_inv}&amp;order_id={$p.id}'>
99           <img src="{$platal->baseurl}images/{if $order_inv}dn{else}up{/if}.png" alt="" title="Tri {if !$order_inv}dé{/if}croissant" />
100       {else}
101         <a href='{$platal->ns}payment?order=directory_name&amp;order_id={$p.id}'>{/if}
102       NOM Prénom</a>
103     </th>
104     <th>
105       {if $order eq 'promo' && $order_id eq $p.id}
106         <a href='{$platal->ns}payment?order={$order}&amp;order_inv={$order_inv}&amp;order_id={$p.id}'>
107           <img src="{$platal->baseurl}images/{if $order_inv}dn{else}up{/if}.png" alt="" title="Tri {if !$order_inv}dé{/if}croissant" />
108       {else}
109         <a href='{$platal->ns}payment?order=promo&amp;order_id={$p.id}'>
110       {/if}Promo</a>
111     </th>
112     <th>
113       {if $order eq 'comment' && $order_id eq $p.id}
114         <a href='{$platal->ns}payment?order=comment&amp;order_inv={$order_inv}&amp;order_id={$p.id}'>
115           <img src="{$platal->baseurl}images/{if $order_inv}dn{else}up{/if}.png" alt="" title="Tri {if !$order_inv}dé{/if}   siant" />
116       {else}
117         <a href='{$platal->ns}payment?order=comment&amp;order_id={$p.id}'>
118       {/if}Commentaire</a>
119     </th>
120     <th>
121       {if $order eq 'amount' && $order_id eq $p.id}
122         <a href='{$platal->ns}payment?order={$order}&amp;order_inv={$order_inv}&amp;order_id={$p.id}'>
123           <img src="{$platal->baseurl}images/{if $order_inv}dn{else}up{/if}.png" alt="" title="Tri {if !$order_inv}dé{/if}croissant" />
124       {else}
125         <a href='{$platal->ns}payment?order=amount&amp;order_id={$p.id}'>
126       {/if}Montant</a>
127     </th>
128   </tr>
129   {assign var="somme" value=0}
130   {foreach from=$trans[$p.id] item=p name=people}
131   {if !t($p.limit)}
132   <tr>
133     <td class="center">{if $p.date eq 0}-{else}{$p.date|date_format:"%d/%m/%y"}{/if}</td>
134     <td>
135       {profile user=$p.user promo=false}
136     </td>
137     <td>
138       <a href="mailto:{$p.user->bestEmail()}">{icon name=email title="email"}</a>
139     </td>
140     <td class="center">{$p.user->promo()}</td>
141     <td>{$p.comment|comment_decode}</td>
142     <td class="right">{$p.amount|replace:'.':','} &euro;</td>
143   </tr>
144   {elseif $smarty.foreach.people.first}
145   <tr>
146     <td colspan="6" class="center">Personne n'a encore payé pour ce télépaiement.</td>
147   </tr>
148   {else}
149   <tr class="pair">
150     <td class="right" colspan="5"><strong>Total </strong></td>
151     <th class="right">{$p.amount|replace:'.':','} &euro;</th>
152   </tr>
153   {/if}
154   {/foreach}
155 </table>
156 {/if}
157 </fieldset>
158
159 {foreachelse}
160
161 <p class="descr">
162 <em>Pas de télépaiement en cours&hellip;</em>
163 </p>
164
165 {/foreach}
166
167 {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}