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