code from amapei
This commit is contained in:
@@ -0,0 +1,260 @@
|
||||
::use 'design.mtt'::
|
||||
<div class="col-md-8">
|
||||
<h2>::_("Last orders")::</h2>
|
||||
|
||||
::if constOrders.length>0::
|
||||
<div class="article">
|
||||
|
||||
<!-- CONSTANT ORDERS -->
|
||||
|
||||
<h3>::_("CSA Contracts")::</h3>
|
||||
|
||||
::foreach c constOrders::
|
||||
|
||||
<h4>::c.contract.name::</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 price per unit")::</a></th>
|
||||
<th>::_("Sub-total")::</th>
|
||||
<th>::_("Fees")::</th>
|
||||
<th>::_("Total")::</th>
|
||||
<th>::_("Paid")::</th>
|
||||
</tr>
|
||||
::set total = 0::
|
||||
::foreach m c.orders::
|
||||
<tr>
|
||||
<td>
|
||||
::raw m.smartQt::
|
||||
</td>
|
||||
<td>
|
||||
<a href="#" onclick="_.overlay('/shop/productInfo/::m.productId::','::m.productName::')">
|
||||
<img src="::m.productImage::" style="width:32px;height:32px;" />
|
||||
::m.productName::
|
||||
</a>
|
||||
::if m.userName2 != null::
|
||||
<br /><span class="glyphicon glyphicon-refresh"></span> ::_("Order alternated with")::
|
||||
::if user.id == m.userId::
|
||||
::m.userName2::
|
||||
::else::
|
||||
::m.userName::
|
||||
::end::
|
||||
::end::
|
||||
|
||||
</td>
|
||||
<td>
|
||||
::formatNum(m.productPrice):: ::currency()::
|
||||
</td>
|
||||
<td>
|
||||
::formatNum(m.subTotal):: ::currency()::
|
||||
</td>
|
||||
<td>
|
||||
<!-- frais -->
|
||||
::if m.percentageValue!=null::
|
||||
<a href="#" data-toggle="tooltip" data-placement="top" title="::m.percentageName:: : ::m.percentageValue:: %">
|
||||
::formatNum(m.fees):: ::currency()::
|
||||
</a>
|
||||
::end::
|
||||
</td>
|
||||
<td>
|
||||
<!-- total -->
|
||||
::formatNum(m.total):: ::currency()::
|
||||
::set total = total + m.total::
|
||||
</td>
|
||||
<td>
|
||||
::if m.paid==true::
|
||||
<span style="color:#00AA00;">::_("Paid")::</span>
|
||||
::else::
|
||||
<span style="color:#DD0000;">::_("Unpaid")::</span>
|
||||
::end::
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
::end::
|
||||
<tr>
|
||||
<td colspan="7" class="text-right">
|
||||
<b>Total :
|
||||
::formatNum(total):: ::currency()::</b>
|
||||
|
||||
::set d = c.contract.getDistribs(false,null).length::
|
||||
( soit ::formatNum(d*total):: ::currency():: pour ::d:: livraisons )
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
::end::
|
||||
|
||||
</div>
|
||||
::end::
|
||||
|
||||
<!-- VARYING ORDERS -->
|
||||
::if count(varOrders)>0::
|
||||
<div class="article">
|
||||
|
||||
::foreach d varOrders::
|
||||
<h4>::_("Order delivered on"):: ::hDate(d.date)::</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 price per unit")::</a></th>
|
||||
<th>::_("Sub-total")::</th>
|
||||
<th>::_("Fees")::</th>
|
||||
<th>::_("Total")::</th>
|
||||
<th>::_("Paid")::</th>
|
||||
</tr>
|
||||
::set total = 0::
|
||||
::foreach o d.orders::
|
||||
<tr>
|
||||
<td>
|
||||
::raw o.smartQt::
|
||||
</td>
|
||||
<td>
|
||||
<a href="#" onclick="_.overlay('/shop/productInfo/::o.productId::','::o.productName::')">
|
||||
<img src="::o.productImage::" style="width:32px;height:32px;" />
|
||||
::o.productName::
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
::formatNum(o.productPrice):: ::currency()::
|
||||
</td>
|
||||
<td>
|
||||
::formatNum(o.subTotal):: ::currency()::
|
||||
</td>
|
||||
<td>
|
||||
$$nullSafe(::formatNum(o.fees)::)
|
||||
</td>
|
||||
<td>
|
||||
::formatNum(o.total):: ::currency()::
|
||||
::set total = total + o.total::
|
||||
</td>
|
||||
<td>
|
||||
::if o.paid==true::
|
||||
<span style="color:#00AA00;">::_("Paid")::</span>
|
||||
::else::
|
||||
<span style="color:#DD0000;">::_("Unpaid")::</span>
|
||||
::end::
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
::end::
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
::if !user._amap.hasPayments()::
|
||||
$$edit(Modifier cette commande,/contract/editOrderByDate/::d.date::)
|
||||
::end::
|
||||
|
||||
</td>
|
||||
<td>TOTAL</td>
|
||||
<td><b>::formatNum(total):: ::currency()::</b></td>
|
||||
</tr>
|
||||
</table>
|
||||
::end::
|
||||
</div>
|
||||
::end::
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<h3>::_("Profile")::</h3>
|
||||
<div class="article">
|
||||
|
||||
<p>
|
||||
$$contact(::user::)
|
||||
</p>
|
||||
|
||||
|
||||
<div class="pull-right">
|
||||
<a href="/account/quit?token=::token::" class="btn btn-default btn-sm" $$confirm(::_("Do you really want to quit this group ? You won't be a member anymore: you won't receive any new message and won't be able to see your previous orders in this group.")::)>
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
::_("Leave this group")::
|
||||
</a>
|
||||
</div>
|
||||
|
||||
$$edit(::_("Edit")::,/account/edit)
|
||||
|
||||
</div>
|
||||
|
||||
::if user.getAmap().hasPayments()::
|
||||
<h3>::_("Payments")::</h3>
|
||||
<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="/account/payments" class="btn btn-default btn-small">
|
||||
<i class="fa fa-credit-card" aria-hidden="true"></i>
|
||||
::_("Payments details")::
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
::end::
|
||||
|
||||
|
||||
::if user.isAmapManager()::
|
||||
<h3>::_("Tutorials")::</h3>
|
||||
<div class="article">
|
||||
<table class="table">
|
||||
|
||||
::foreach t tutos::
|
||||
<tr>
|
||||
<td>::t.name::</td>
|
||||
<td>
|
||||
::if t.completion==null::
|
||||
<a href="/contract/?startTuto=::t.key::" class="btn btn-default btn-xs">
|
||||
<span class="glyphicon glyphicon-play"></span> ::_("Start")::
|
||||
</a>
|
||||
::else::
|
||||
|
||||
<a href="/contract/?stopTuto=::t.key::" class="btn btn-primary btn-xs">
|
||||
<span class="glyphicon glyphicon-remove"></span> ::_("Stop")::
|
||||
</a>
|
||||
::end::
|
||||
</td>
|
||||
</tr>
|
||||
::end::
|
||||
|
||||
</table>
|
||||
|
||||
::if stopTuto::
|
||||
<div id="stopTuto" data-toggle="popover" title='::_("Tutorial stopped")::' data-placement="left" data-content="::_("You'll be able to restart it here.")::" ></div>
|
||||
<script>
|
||||
$(function(){
|
||||
setTimeout(function() { $("#stopTuto").popover("show"); }, 1000);
|
||||
});
|
||||
</script>
|
||||
::end::
|
||||
</div>
|
||||
::end::
|
||||
|
||||
<h3>::_("Language")::</h3>
|
||||
<div class="article">
|
||||
::_("Display the interface in another language"):: (beta)
|
||||
:
|
||||
<ul>
|
||||
|
||||
::raw langLinks::
|
||||
|
||||
</ul>
|
||||
<p>
|
||||
::_("Current language is")::
|
||||
<b>
|
||||
::langText::
|
||||
</b>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,37 @@
|
||||
::use 'design.mtt'::
|
||||
|
||||
<div class="col-md-12"><h2>::_("Choose a type of contract:")::</h2></div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="article">
|
||||
|
||||
<div style="text-align:center;margin-bottom:12px;">
|
||||
<a href="/contract/insert/0" class="btn btn-default btn-lg">::raw _("Create a <b>CSA</b> contract")::</a>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
::_("It is a contract with a duration of one year or for one season. Products are always the same at each delivery")::
|
||||
</p>
|
||||
<p>
|
||||
<i>::raw _("Example: there is a contract for vegetables that is 1 year long. Jean takes a basket that costs 10€ per delivery, and Brigitte takes a basket that costs 15€ per delivery.")::</i>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="article">
|
||||
|
||||
<div style="text-align:center;margin-bottom:12px;">
|
||||
<a href="/contract/insert/1" class="btn btn-default btn-lg">::raw _("Create a contract with <b>variable orders</b>")::</a>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
::_("It is a contract in which members can change their orders at each delivery. There is a different order for each delivery.")::
|
||||
</p>
|
||||
<p>
|
||||
<i>::raw _("Example: Jean orders a basket that costs 10€ for the first delivery, then nothing for the second delivery, then a basket for 20€ etc.")::</i>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,139 @@
|
||||
::use 'design.mtt'::
|
||||
<div id="content" class="col-md-8">
|
||||
<div class="article">
|
||||
<h2>::_("Order"):: ::c.name::</h2>
|
||||
|
||||
::if distribution!=null::
|
||||
::_("For the delivery of the"):: <b>::hDate(distribution.date)::</b>
|
||||
::end::
|
||||
|
||||
<p>
|
||||
::raw _("As long as orders are open, you can come back on this page and modify your order.<br/>You can check any time your current orders on the following page <a href='/contract'>my account</a>.")::
|
||||
</p>
|
||||
|
||||
<form name="order" id="order" method="POST" action="">
|
||||
<input type="hidden" name="token" value="::token::"/>
|
||||
|
||||
::if distribution!=null::
|
||||
<input type="hidden" name="distribution" value="::distribution.id::"/>
|
||||
::end::
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<td></td>
|
||||
<th>::_("Product")::</th>
|
||||
<th>::_("Price")::</th>
|
||||
::foreach d userOrders::
|
||||
::if d.distrib==null::
|
||||
<th>::_("Qty")::</th>
|
||||
::else::
|
||||
<th>::dDate(d.distrib.date)::</th>
|
||||
::end::
|
||||
::end::
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
::if userOrders.length>0::
|
||||
|
||||
::foreach uo userOrders[0].datas::
|
||||
<tr>
|
||||
<td>
|
||||
<img src="::uo.product.getImage()::" style="width:32px;height:32px;" />
|
||||
</td>
|
||||
<td>
|
||||
<span ::cond uo.product.organic:: title ="Agriculture biologique" data-toggle="tooltip" data-placement="bottom">
|
||||
<img src="/img/AB.png"/>
|
||||
</span>
|
||||
<a href="#" onclick="_.overlay('/shop/productInfo/::uo.product.id::','::escapeJS(uo.product.getName())::')">
|
||||
::uo.product.getName()::
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
::set price = uo.product.price + uo.product._contract.computeFees(uo.product.price)::
|
||||
::formatNum(price):: ::currency()::
|
||||
</td>
|
||||
|
||||
|
||||
::set i = repeat.uo.index::
|
||||
|
||||
::foreach d userOrders::
|
||||
<td>
|
||||
|
||||
::set o = d.datas[i]::
|
||||
|
||||
::if o.order==null::
|
||||
::set q = ""::
|
||||
::else::
|
||||
::set q = o.order.quantity::
|
||||
::end::
|
||||
|
||||
|
||||
::if d.distrib==null::
|
||||
<!-- contrat amap-->
|
||||
<input type="text" class="form-control" name="::"d-p"+o.product.id::" id="product::o.product.id::" value="::q::" />
|
||||
::else::
|
||||
<input type="text" class="form-control" name="::"d"+d.distrib.id+"-p"+o.product.id::" id="product::o.product.id::" value="::q::" />
|
||||
::end::
|
||||
|
||||
|
||||
</td>
|
||||
::end::
|
||||
|
||||
</tr>
|
||||
::end::
|
||||
|
||||
::else::
|
||||
<tr>
|
||||
<td colspan="4">::_("There is currently no open order")::</td>
|
||||
</tr>
|
||||
::end::
|
||||
|
||||
<tr>
|
||||
|
||||
<th colspan="3" class="text-right">Total</th>
|
||||
|
||||
::foreach d userOrders::
|
||||
<th>
|
||||
|
||||
::set total=0::
|
||||
::foreach o d.datas::
|
||||
|
||||
::if o.order!=null::
|
||||
::set q = o.order.quantity::
|
||||
::set price = o.product.price + o.product._contract.computeFees(o.product.price)::
|
||||
|
||||
::set total = total+(q*price)::
|
||||
|
||||
::end::
|
||||
|
||||
::end::
|
||||
|
||||
::formatNum(total):: ::currency()::
|
||||
</th>
|
||||
|
||||
|
||||
::end::
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<i>::_("Tip: to remove an order please key-in the quantity 0")::</i><br/><br/>
|
||||
|
||||
<input type="submit" class="btn btn-primary" value="::_("Validate the order")::" name="submit" id="submit" />
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="article">
|
||||
::_("Supplier:"):: <b>::c._vendor.name::</b>
|
||||
<br/>
|
||||
<br/>
|
||||
::_("Contact in charge:"):: $$contact(::c._contact::)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,137 @@
|
||||
::use 'design.mtt'::
|
||||
<div id="content" class="col-md-8">
|
||||
<div class="article">
|
||||
<h2>::_("Order"):: ::c.name::</h2>
|
||||
|
||||
<!--::if distribution!=null::
|
||||
::_("For the delivery of the"):: <b>::hDate(distribution.date)::</b>
|
||||
::end::
|
||||
<hr/>-->
|
||||
<p>
|
||||
::raw _("Key-in here your orders in advance for this supplier.<br/>You can check your current orders any time on the following page <a href=\"/contract\">my account</a>.<br/>Tip: to remove an order please key-in the quantity 0")::
|
||||
</p>
|
||||
|
||||
<form name="order" id="order" method="POST" action="">
|
||||
<input type="hidden" name="token" value="::token::"/>
|
||||
|
||||
<!--::if distribution!=null::
|
||||
<input type="hidden" name="distribution" value="::distribution.id::"/>
|
||||
::end::-->
|
||||
|
||||
<table class="table table-bordered table-striped" style="background:white;" >
|
||||
<tr>
|
||||
<td></td>
|
||||
<th>::_("Product")::</th>
|
||||
<th>::_("Price")::</th>
|
||||
::foreach d userOrders::
|
||||
::if d.distrib==null::
|
||||
<th>::_("Qty")::</th>
|
||||
::else::
|
||||
<th class="text-center">::dDate(d.distrib.date)::</th>
|
||||
::end::
|
||||
::end::
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
::if userOrders.length>0::
|
||||
|
||||
::foreach uo userOrders[0].datas::
|
||||
<tr>
|
||||
<td>
|
||||
<img src="::uo.product.getImage()::" style="width:32px;height:32px;" />
|
||||
</td>
|
||||
<td>
|
||||
<span ::cond uo.product.organic:: title ="Agriculture biologique" data-toggle="tooltip" data-placement="bottom">
|
||||
<img src="/img/AB.png"/>
|
||||
</span>
|
||||
<a href="#" onclick="_.overlay('/shop/productInfo/::uo.product.id::','::escapeJS(uo.product.getName())::')">
|
||||
::uo.product.getName()::
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
::set price = uo.product.price + uo.product._contract.computeFees(uo.product.price)::
|
||||
::formatNum(price):: ::currency()::
|
||||
</td>
|
||||
|
||||
|
||||
::set i = repeat.uo.index::
|
||||
|
||||
::foreach d userOrders::
|
||||
<td class="text-center">
|
||||
|
||||
::set o = d.datas[i]::
|
||||
|
||||
::if o.order==null::
|
||||
::if d.distrib==null::
|
||||
<!-- contrat amap-->
|
||||
<input type="text" class="form-control" name="::"d-p"+o.product.id::" id="product::o.product.id::" value="" />
|
||||
::else::
|
||||
<input type="text" class="form-control" name="::"d"+d.distrib.id+"-p"+o.product.id::" id="product::o.product.id::" value="" />
|
||||
::end::
|
||||
::else::
|
||||
::o.order.quantity::
|
||||
::end::
|
||||
|
||||
</td>
|
||||
::end::
|
||||
|
||||
</tr>
|
||||
::end::
|
||||
|
||||
::else::
|
||||
<tr>
|
||||
<td colspan="4">::_("There is currently no open order")::</td>
|
||||
</tr>
|
||||
::end::
|
||||
|
||||
<tr>
|
||||
|
||||
<th colspan="3" class="text-right">Total</th>
|
||||
|
||||
::foreach d userOrders::
|
||||
<th>
|
||||
|
||||
::set total=0::
|
||||
::foreach o d.datas::
|
||||
|
||||
::if o.order!=null::
|
||||
::set q = o.order.quantity::
|
||||
::set price = o.product.price + o.product._contract.computeFees(o.product.price)::
|
||||
|
||||
::set total = total+(q*price)::
|
||||
|
||||
::end::
|
||||
|
||||
::end::
|
||||
|
||||
::formatNum(total):: ::currency()::
|
||||
</th>
|
||||
|
||||
|
||||
::end::
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<input type="submit" class="btn btn-primary" value="::_("Validate the order")::" name="submit" id="submit" />
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="article">
|
||||
<p>
|
||||
::_("Supplier:"):: <b>::c._vendor.name::</b>
|
||||
</p>
|
||||
<p>
|
||||
::_("Contact in charge:"):: $$contact(::c._contact::)
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,75 @@
|
||||
::use 'design.mtt'::
|
||||
<div id="content" class="col-md-8">
|
||||
<div class="article">
|
||||
<h2>
|
||||
::__("Modify the order delivered on ::date::",{date:hDate(date)})::
|
||||
</h2>
|
||||
|
||||
<p>
|
||||
::raw _("You can modify here an existing order. If you would like to remove a product, just key-in the quantity 0.<br/>You may not be able to modify all elements as the order could be closed for some suppliers")::
|
||||
</p>
|
||||
|
||||
<form name="order" id="order" method="POST" action="">
|
||||
<input type="hidden" name="token" value="::token::"/>
|
||||
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
|
||||
<th>::_("Product")::</th>
|
||||
<th>::_("U.P.")::</th>
|
||||
<th>::_("Sub-total")::</th>
|
||||
<th>::_("Fees")::</th>
|
||||
<th>::_("Total")::</th>
|
||||
<th>::_("Quantity")::</th>
|
||||
</tr>
|
||||
::set total = 0::
|
||||
::foreach o orders::
|
||||
<tr>
|
||||
<td>
|
||||
<a href="#" onclick="_.overlay('/shop/productInfo/::o.productId::')">
|
||||
<img src="::o.productImage::" style="width:32px;height:32px;" />
|
||||
::o.quantity:: x ::o.productName::
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
::formatNum(o.productPrice):: ::currency()::
|
||||
</td>
|
||||
<td>
|
||||
::formatNum(o.subTotal):: ::currency()::
|
||||
</td>
|
||||
<td>
|
||||
$$nullSafe(::formatNum(o.fees)::)
|
||||
</td>
|
||||
<td>
|
||||
::formatNum(o.total):: ::currency()::
|
||||
</td>
|
||||
<td>
|
||||
::if o.canModify::
|
||||
<input type="text" class="form-control" name="product::o.productId::" id="product::o.productId::" value="::o.quantity::" />
|
||||
::else::
|
||||
<span style="color:#AAA">::_("Order closed or already paid")::</span>
|
||||
::end::
|
||||
</td>
|
||||
|
||||
::set total = total + o.total::
|
||||
</tr>
|
||||
::end::
|
||||
|
||||
<tr>
|
||||
<th colspan="3"></th>
|
||||
<th>::_("TOTAL")::</th>
|
||||
<th>::roundTo(total,2)::::currency()::</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<input type="submit" class="btn btn-primary" value="::_("Update the order")::" name="submit" id="submit" />
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,137 @@
|
||||
::use 'design.mtt'::
|
||||
<div class="col-md-9">
|
||||
<div class="article">
|
||||
|
||||
<h2>::c.name::</h2>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
::if c.description!=null::
|
||||
::raw nl2br(c.description)::
|
||||
::end::
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
||||
<div class="row">
|
||||
::foreach p c.getProducts(true)::
|
||||
<div class="col-md-4" id="product::p.id::">
|
||||
<table class="product">
|
||||
<tr>
|
||||
<td style="vertical-align:top;">
|
||||
<a onclick="_.overlay('/shop/productInfo/::p.id::','::escapeJS(p.getName())::')" >
|
||||
<!--<img src="::p.getImage()::" style="width:64px;height:64px;" /> -->
|
||||
<div style="background-image:url('::p.getImage()::')" class="productImg"/>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<h4>
|
||||
<a onclick="_.overlay('/shop/productInfo/::p.id::','::escapeJS(p.getName())::')" href="#">::p.getName()::</a>
|
||||
</h4>
|
||||
<span class="price">::formatNum(p.getPrice()):: ::currency()::</span>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
::end::
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
||||
<div class="row">
|
||||
::set vendor = c._vendor::
|
||||
<div class="col-md-3" ::cond vendor._image!=null::>
|
||||
|
||||
<img src="::file(vendor._image)::" class="img-thumbnail" />
|
||||
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
|
||||
<h4>::vendor.name::</h4>
|
||||
|
||||
<b>::vendor.city::</b> (::vendor.zipCode::)
|
||||
|
||||
<p ::cond vendor.desc!=null:: style="font-size: 13px;">
|
||||
::raw nl2br(vendor.desc)::
|
||||
</p>
|
||||
|
||||
::if vendor.linkUrl!=null::
|
||||
<p>
|
||||
::if vendor.linkText!=null::
|
||||
<a href="::vendor.linkUrl::" target="_blank" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-chevron-right"></span> ::vendor.linkText::</a>
|
||||
::else::
|
||||
<a href="::vendor.linkUrl::" target="_blank" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-chevron-right"></span> ::_("Read more")::</a>
|
||||
::end::
|
||||
</p>
|
||||
::end::
|
||||
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<h4>::_("Coordinator")::</h4>
|
||||
::if c._contact!=null::
|
||||
<b>::c._contact.firstName:: ::c._contact.lastName::</b><br/>
|
||||
<span ::cond c._contact.email!=null::><span class="glyphicon glyphicon-envelope"></span> <a href="mailto: ::c._contact.email::">::c._contact.email::</a><br/></span>
|
||||
<span ::cond c._contact.phone!=null::><span class="glyphicon glyphicon-phone-alt"></span> ::c._contact.phone::<br/></span>
|
||||
::end::
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
|
||||
|
||||
<div class="article">
|
||||
<h3>::_("Next distributions")::</h3>
|
||||
|
||||
::set distribs = c.getDistribs(true,null)::
|
||||
<ul style="max-height:600px;overflow-y:auto;">
|
||||
::foreach d distribs::
|
||||
<li>
|
||||
|
||||
<b>::dDate(d.date)::</b>
|
||||
<br/>::d._place.name::
|
||||
|
||||
<p ::cond d.canOrderNow()::>
|
||||
::if user._amap.hasShopMode()::
|
||||
<a href="/shop/::d._place.id::/::d.date.toString().substr(0,10)::" class="btn btn-primary"><span class="glyphicon glyphicon-chevron-right"></span> ::_("Order")::</a>
|
||||
::end::
|
||||
</p>
|
||||
</li>
|
||||
::end::
|
||||
</ul>
|
||||
|
||||
::if distribs.length==0::
|
||||
<p>
|
||||
::_("No planned distributions.")::
|
||||
</p>
|
||||
::else::
|
||||
<p ::cond !user._amap.hasShopMode()::>
|
||||
<a href="/contract/order/::c.id::" class="btn btn-primary"><span class="glyphicon glyphicon-chevron-right"></span> ::_("Order")::</a>
|
||||
</p>
|
||||
::end::
|
||||
|
||||
|
||||
<hr/>
|
||||
<p>
|
||||
<a style="font-size:12px;" href='/contract'>::_("You can check your previous orders in 'my account' section")::</a>
|
||||
</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
::end::
|
||||
Reference in New Issue
Block a user