From: Anne Limoges Date: Wed, 19 Dec 2012 14:57:31 +0000 (+0100) Subject: Add job infos in xnetevents .csv ; Rewording in xnetevents. X-Git-Tag: xorg/1.1.7~22 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=5dcca1b1937f57562b59e3ae41a61557c48632a6;p=platal.git Add job infos in xnetevents .csv ; Rewording in xnetevents. --- diff --git a/modules/xnetevents.php b/modules/xnetevents.php index f99a4b6..20e3b76 100644 --- a/modules/xnetevents.php +++ b/modules/xnetevents.php @@ -222,7 +222,7 @@ class XnetEventsModule extends PLModule $page->trigError("Tu dois choisir un nombre d'invités correct !"); return; } - $subs[$j] = 1 + $pers[$j]; + $subs[$j] = $pers[$j]; } } @@ -308,6 +308,9 @@ class XnetEventsModule extends PLModule $participants = get_event_participants($evt, $item_id, $tri); $title = 'Nom;Prénom;Promotion'; + if ($admin) { + $title .=';Société;Poste'; + } if ($all) { foreach ($evt['moments'] as $moment) { $title .= ';' . $moment['titre']; @@ -321,13 +324,18 @@ class XnetEventsModule extends PLModule $title .= 'Payé'; } else { $title .= ';Nombre'; - } + } echo utf8_decode($title) . "\n"; if ($participants) { foreach ($participants as $participant) { $user = $participant['user']; $line = $user->lastName() . ';' . $user->firstName() . ';' . $user->promo(); + if ($admin && $user->hasProfile()) { + $line .= ';' . $user->profile()->getMainJob()->company->name . ';' . $user->profile()->getMainJob()->description; + } else { + $line .= ';;'; + } if ($all) { foreach ($evt['moments'] as $moment) { $line .= ';' . $participant[$moment['item_id']]; @@ -495,7 +503,7 @@ class XnetEventsModule extends PLModule // request for a new payment if (Post::v('paiement_id') == -1 && $money_defaut >= 0) { $p = new PayReq(S::user(), - Post::v('intitule')." - ".$globals->asso('nom'), + $globals->asso('nom')." - ".Post::v('intitule'), Post::v('site'), $money_defaut, Post::v('confirmation'), 0, 999, $globals->asso('id'), $eid, Post::v('payment_public') == 'yes'); diff --git a/modules/xnetevents/xnetevents.inc.php b/modules/xnetevents/xnetevents.inc.php index 608bf42..fdc46c0 100644 --- a/modules/xnetevents/xnetevents.inc.php +++ b/modules/xnetevents/xnetevents.inc.php @@ -140,7 +140,7 @@ function get_event_participants(&$evt, $item_id, array $tri = array(), $limit = $evt['topay'] = 0; $evt['paid'] = 0; foreach ($tab as $uid=>&$u) { - $u['adminpaid'] = $u['paid']; + $u['adminpaid'] = (float)$u['paid']; $u['montant'] = 0; if ($money && $pay_id) { $montant = XDB::fetchOneCell('SELECT SUM(amount) diff --git a/templates/payment/payment.tpl b/templates/payment/payment.tpl index d926a91..5f036c0 100644 --- a/templates/payment/payment.tpl +++ b/templates/payment/payment.tpl @@ -48,6 +48,12 @@ {$comment} {/if} +{if $meth->id == 1} + + Remarque pour les utilisateurs de Paypal + Merci de cliquer sur "revenir au site marchant" à la fin de la transaction, sinon celle-ci n'apparaitra pas sur polytechnique.net. + +{/if}   diff --git a/templates/xnetevents/index.tpl b/templates/xnetevents/index.tpl index f08f09f..a4b6a01 100644 --- a/templates/xnetevents/index.tpl +++ b/templates/xnetevents/index.tpl @@ -132,10 +132,8 @@ {foreach from=$e.moments item=m} {if !$m.nb} Tu ne viendras pas - {elseif $m.nb eq 1} - Tu viendras seul {else} - Tu viendras avec {$m.nb-1} personne{if $m.nb > 2}s{/if} + Tu as inscrit {$m.nb} personne{if $m.nb > 1}s{/if} {/if} à {$m.titre}.
{/foreach} {/if} diff --git a/templates/xnetevents/subscribe.tpl b/templates/xnetevents/subscribe.tpl index 8146bbd..c7d96f1 100644 --- a/templates/xnetevents/subscribe.tpl +++ b/templates/xnetevents/subscribe.tpl @@ -69,20 +69,16 @@ {else} -
- + {if $m.nb > 0}checked="checked"{/if}/>J'inscris + {/if} {else} {if !$m.nb} Je ne viendrai pas. - {elseif $m.nb eq 1} - Je viendrai{if !$event.noinvite} seul{/if}. {else} - Je viendrai moi et {$m.nb} invité{if $m.nb > 2}s{/if}. + J'ai inscrit {$m.nb} personne{if $m.nb > 1}s{/if}. {/if} {/if}