You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

223 lines
6.1 KiB

::use 'design.mtt'::
<div class="col-md-4">
<h2>::_("Contact informations")::</h2>
<div class="article">
<div style="font-weight:bold;font-size:120%;">
::member.firstName:: ::member.lastName::
::if member.firstName2!=null && member.lastName2!=null::
& ::member.firstName2:: ::member.lastName2::
::end::
</div>
$$nullSafe(::member.address1::)<br/>
$$nullSafe(::member.address2::)<br/>
$$nullSafe(::member.zipCode::)
$$nullSafe(::member.city::)<br/>
<br/>
::if member.phone!=null::
::_("Téléphone"):: : ::member.phone::<br/>
::end::
::if member.email!=null::
::_("E-mail"):: : <a href="mailto: ::member.email::">::member.email::</a><br/>
::end::
::if member.email2!=null::
::_("E-mail"):: : <a href="mailto: ::member.email2::">::member.email2::</a><br/>
::end::
<hr/>
<p style="font-size:11px;">
::_("Last login"):: :
::if member.ldate!=null::
::member.ldate.toString()::
::else::
<b>::_("This member never logged in")::</b>
::end::
<br/>
::_("Registred since"):: :
::if member.cdate!=null::
::member.cdate.toString()::
::else::
???
::end::
<br/>
::if member.pass==""::
<div class="alert alert-danger">::_("This member has not set a password"):: </div>
::end::
</p>
<p>
$$edit(::_("Edit")::,/member/edit/::member.id::)
$$delete(::_("Remove from group")::,/member/delete/::member.id::?token=::token::)
<a href="/member/movetowl/::member.id::" class="btn btn-default btn-sm">::_("Put on waiting list")::</a>
<a onclick="_.overlay('/member/lastMessages/::member.id::','Message reçus')" class="btn btn-default btn-sm">
<span class="glyphicon glyphicon-envelope" aria-hidden="true"></span>
::_("Received messages")::</a>
::if !member.isFullyRegistred()::
<a href="/member/inviteMember/::member.id::?token=::token::" class="btn btn-default btn-sm">
<span class="glyphicon glyphicon-envelope" aria-hidden="true"></span>
::_("Send an invitation")::</a>
::end::
</p>
<p ::cond canLoginAs::>
<a href="/member/loginas/::member.id::/::userAmap._amap.id::" class="btn btn-danger btn-xs">::_("Log in as this member")::</a>
</p>
</div>
::if user._amap.hasMembership()::
<h2>::_("Membership fee")::</h2>
<div class="article">
::if userAmap.hasValidMembership()::
$$bool(true) ::_("Membership up to date")::
::else::
$$bool(false) ::_("Membership to renew")::
::end::
::_("for the period||full sentence : Membership up to date for the period 2017-2018"):: <b>::user._amap.getPeriodName(null)::</b>
<br/>
<a href="/membership/::member.id::" class="btn btn-default btn-sm">::_("Manage membership fees")::</a>
</div>
::end::
</div>
<div class="col-md-8">
<h2>::_("Current orders")::</h2>
<div class="article">
::set o = userContracts::
::if o.constOrders.length>0::
<h4>::_("CSA contracts")::</h4>
<table class="table table-bordered table-condensed" >
<tr>
<th>::_("Qty||short version for quantity")::</th>
<th>::_("Product")::</th>
<th>::_("Price")::</th>
<th>::_("Contract")::</th>
</tr>
::foreach p o.constOrders::
<tr>
<td>::raw p.smartQt::</td>
<td>::p.productName::
::if p.userId2 != null::
<br /><span class="glyphicon glyphicon-refresh"></span> ::_("Order alternated with")::
::if member.id == p.userId::
<a href="/member/view/::p.userId2::">::p.userName2::</a>
::else::
<a href="/member/view/::p.userId::">::p.userName::</a>
::end::
::end::
</td>
<td>::p.subTotal:: ::currency()::</td>
<td>
<a href="/contract/view/::p.contractId::">::p.contractName::</a>
</td>
</tr>
::end::
</table>
::end::
::if count(o.varOrders)>0::
::foreach d o.varOrders.keys()::
<h4>::__("Order for ::date::",{date:d})::</h4>
<table class="table table-bordered table-condensed" >
<tr>
<th>::_("Qty||short version for quantity")::</th>
<th>::_("Product")::</th>
<th><a href="#" data-toggle="tooltip" data-placement="top" title="::_('Unit price including taxes')::">::_("U.P||short version of unit price")::</a></th>
<th>::_("Sub-total")::</th>
<th>::_("Fees")::</th>
<th>::_("Total")::</th>
<th>::_("Contract")::</th>
</tr>
::set total = 0::
::foreach p o.varOrders.get(d)::
<tr>
<td>::raw p.smartQt::</td>
<td>::p.productName::</td>
<td>::p.productPrice::&nbsp;::currency()::</td>
<td>::p.subTotal::&nbsp;::currency()::</td>
<td>
<!-- frais -->
::if p.percentageValue!=null::
<a href="#" data-toggle="tooltip" data-placement="top" title="::p.percentageName:: : ::p.percentageValue:: %">
::formatNum(p.fees)::&nbsp;::currency()::
</a>
::end::
</td>
<td>
<!-- total -->
::formatNum(p.total)::&nbsp;::currency()::
::set total = total + p.total::
</td>
<td>
<a href="/contract/view/::p.contractId::">::p.contractName::</a>
</td>
</tr>
::end::
<tr>
<td colspan="4"></td>
<td>::_("TOTAL")::</td>
<td><b>::formatNum(total)::&nbsp;::currency()::</b></td>
</tr>
</table>
::end::
::end::
</div>
</div>
<div ::cond user.getAmap().hasPayments():: class="col-md-8">
<div class="article">
<span style="font-size:1.3em;">
::_("Balance"):: :
::if userAmap.balance<0::
::set color = "C00"::
::else::
::set color = "0C0"::
::end::
<span style="color:#::color::;">
::userAmap.balance:: ::currency()::
</span>
</span>
<span style="margin-left:30px;">
<a href="/member/payments/::member.id::" class="btn btn-default btn-small">
<i class="fa fa-credit-card" aria-hidden="true"></i>
::_("Payments details")::
</a>
</span>
</div>
</div>
<div class="col-md-4" ::cond userAmap.rights!=null && userAmap._rights!=null::>
<h3>::_("Rights")::</h3>
<div class="article">
<ul>
::foreach r userAmap._rights::
<li>::userAmap.getRightName(r)::</li>
::end::
</ul>
</div>
</div>
::end::