code from amapei
This commit is contained in:
@@ -0,0 +1 @@
|
||||
This is where the compiled templates are.
|
||||
@@ -0,0 +1,105 @@
|
||||
::use 'design.mtt'::
|
||||
|
||||
<div class="col-md-3">
|
||||
<h2>Coordonnées</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::
|
||||
Tel : ::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::
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-9">
|
||||
<h2>::_("Payments")::</h2>
|
||||
<div class="article">
|
||||
<table class="table table-condensed">
|
||||
|
||||
<!-- total -->
|
||||
<tr style="font-size:1.3em;">
|
||||
<td colspan="2"></td>
|
||||
<td class="text-right">::_("Balance"):: :</td>
|
||||
::if balance<0::
|
||||
::set color = "C00"::
|
||||
::else::
|
||||
::set color = "0C0"::
|
||||
::end::
|
||||
<td style="color:#::color::;">
|
||||
::if balance<0::
|
||||
-
|
||||
::end::
|
||||
</td>
|
||||
<td style="color:#::color::;">
|
||||
::Math.abs(balance):: ::currency()::
|
||||
</td>
|
||||
<td colspan="2">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
::foreach t rb.current()::
|
||||
<tr>
|
||||
$$operation(::t::)
|
||||
</tr>
|
||||
::end::
|
||||
|
||||
<tr >
|
||||
<th colspan="5" class="text-center">
|
||||
<ul class="pagination">
|
||||
::if rb.paginationStartPage != 1::
|
||||
<li>
|
||||
<a href="?page=::rb.paginationStartPage-1::">
|
||||
<span class="glyphicon glyphicon-backward"></span>
|
||||
</a>
|
||||
</li>
|
||||
::end::
|
||||
::foreach i loopList(rb.paginationStartPage,rb.paginationEndPage)::
|
||||
::if rb.page==i::
|
||||
<li class="active" ><a href="?page=::i::">::i::</a></li>
|
||||
::else::
|
||||
<li><a href="?page=::i::">::i::</a></li>
|
||||
::end::
|
||||
::end::
|
||||
::if rb.paginationEndPage < rb.pages + 1::
|
||||
<li>
|
||||
<a href="?page=::rb.paginationEndPage::">
|
||||
<span class="glyphicon glyphicon-forward"></span>
|
||||
</a>
|
||||
</li>
|
||||
::end::
|
||||
</ul>
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,53 @@
|
||||
::use 'admin/design.mtt'::
|
||||
|
||||
<div id="content" class="col-md-8">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<h1>H1 Title</h1>
|
||||
<h2>H2 Title</h2>
|
||||
<h3>H3 Title</h3>
|
||||
<h4>H4 Title</h4>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<h2>
|
||||
Titre H2
|
||||
</h2>
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
||||
Donec ullamcorper venenatis augue, vitae tempor quam viverra at.
|
||||
Sed faucibus ipsum sit amet turpis consectetur finibus. Nulla facilisi.
|
||||
Vivamus consequat vestibulum blandit. Nunc laoreet tellus ac lorem commodo hendrerit.
|
||||
</p>
|
||||
<p>
|
||||
Nulla gravida, libero et scelerisque convallis, nibh nisi ultrices nulla, sed faucibus sapien augue et turpis.
|
||||
Nunc quis tempor dolor. Duis elementum nisl eu dolor malesuada convallis.
|
||||
Sed id tellus euismod, eleifend neque ac, iaculis odio. Cras euismod odio quis elit elementum rhoncus.
|
||||
Mauris in elementum ex, ut scelerisque leo. Suspendisse viverra mi non neque vulputate, in fermentum sapien sodales.
|
||||
Sed in laoreet ante. Suspendisse non velit sit amet lectus consequat ornare sit amet quis ipsum.
|
||||
</p>
|
||||
|
||||
|
||||
<div class="well text-center">
|
||||
Nulla gravida, libero et scelerisque convallis, nibh nisi ultrices nulla, sed faucibus sapien augue et turpis.
|
||||
Nunc quis tempor dolor. Duis elementum nisl eu dolor malesuada convallis.
|
||||
<br/>
|
||||
<a href="#" class="btn btn-primary">Big Button</a>
|
||||
<a href="#" class="btn btn-default">Big Button</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">Panel heading without title</div>
|
||||
<div class="panel-body">
|
||||
Panel content
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
::end::
|
||||
@@ -0,0 +1,10 @@
|
||||
::use 'admin/design.mtt'::
|
||||
|
||||
|
||||
<h3>Console d'administration de Cagette.net</h3>
|
||||
<p>
|
||||
::hDate(now)::
|
||||
</p>
|
||||
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,36 @@
|
||||
::use 'design.mtt'::
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="panel panel-warning">
|
||||
|
||||
<div class="panel-heading">
|
||||
<span class="panel-title"><a href="/admin">Administration</a></span>
|
||||
</div>
|
||||
|
||||
<ul class="nav nav-tabs nav-stacked" >
|
||||
<li><a href="/db">Base de données</a> </li>
|
||||
<li><a href="/admin/taxo">Dictionnaire de produits</a> </li>
|
||||
<li><a href="/admin/errors">Errors</a> </li>
|
||||
<li><a href="/admin/smtp">Conf. Email</a> </li>
|
||||
<li><a href="/admin/emails">Emails</a> </li>
|
||||
<!--<li><a href="/admin/plugins">Plugins</a> </li>-->
|
||||
::if nav!=null::
|
||||
::foreach i nav::
|
||||
<li><a href="::i.link::">::i.name::</a> </li>
|
||||
::end::
|
||||
::end::
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-9">
|
||||
<div class="article">
|
||||
::raw __content__::
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,50 @@
|
||||
::use 'admin/design.mtt'::
|
||||
<div class="span12">
|
||||
<div class="article">
|
||||
<h1>Emails</h1>
|
||||
|
||||
<p>::_("Emails are temporarily stored in a buffer, waiting to be sent by the cron")::</p>
|
||||
<p>
|
||||
<h3>::num:: unsent emails</h3>
|
||||
</p>
|
||||
|
||||
::set url = "/admin/emails"::
|
||||
|
||||
$$browse(::browser::,::url::)
|
||||
|
||||
<table class="table table-bordered table-striped table-condensed table-hover">
|
||||
<tr>
|
||||
<th>id</th>
|
||||
<th>date</th>
|
||||
<th>tries</th>
|
||||
<th>title</th>
|
||||
<th>html</th>
|
||||
<th>status</th>
|
||||
</tr>
|
||||
<tr ::repeat e browser.current()::>
|
||||
<td>::e.id::</td>
|
||||
<td>::e.cdate::</td>
|
||||
::if(e.tries==0)::
|
||||
<td class="warning">::e.tries::</td>
|
||||
::else::
|
||||
<td class="danger">::e.tries::</td>
|
||||
::end::
|
||||
|
||||
<td>::e.title::</td>
|
||||
<td>
|
||||
::if e.htmlBody != null::
|
||||
<a href="#" onclick="$(this).next().toggle(); return false;">[show]</a>
|
||||
<div style="display:none;">
|
||||
::raw e.htmlBody::
|
||||
</div>
|
||||
::end::
|
||||
</td>
|
||||
<td>::e.rawStatus::</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
$$browse(::browser::,::url::)
|
||||
</div>
|
||||
</div>
|
||||
::end::
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
::use 'admin/design.mtt'::
|
||||
<div class="span12">
|
||||
<div class="article">
|
||||
<h1>Errors</h1>
|
||||
|
||||
<div class="box">
|
||||
<form action="/admin/errors" method="GET">
|
||||
User :
|
||||
<input type="text" name="user" class="tid_userSearch" tid_optional="1" ::attr tid_value if(u!=null) u.name+"/"+u.id::/><br/>
|
||||
|
||||
Error :
|
||||
<input type="text" name="like" value="::like::" /><br/>
|
||||
|
||||
<input type="submit" value="Search" class="btn btn-default btn-sm"/>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="box">
|
||||
Date serveur : ::now::<br/>
|
||||
|
||||
<a href="/admin/errors?empty=1" class="btn btn-default btn-sm" $$confirm()>Vider la table</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript" src="/js/rgraph/RGraph.common.core.js" ></script>
|
||||
<script type="text/javascript" src="/js/rgraph/RGraph.bar.js" ></script>
|
||||
<canvas id="graph" width="900" height="150">[No canvas support]</canvas>
|
||||
<script>
|
||||
window.onload = function ()
|
||||
{
|
||||
|
||||
var datas = [];
|
||||
var labels = [];
|
||||
::foreach e errorsStats::
|
||||
datas.push(::e.c::);
|
||||
labels.push( '::e.day::' );
|
||||
::end::
|
||||
|
||||
var bar = new RGraph.Bar('graph', datas);
|
||||
bar.Set('chart.labels', labels);
|
||||
bar.Set('chart.colors', ['#C00']);
|
||||
bar.Set('chart.title', 'Last errors');
|
||||
bar.Set('chart.labels.above', true);
|
||||
bar.Set('chart.background.barcolor1', 'white');
|
||||
bar.Set('chart.background.barcolor2', 'white');
|
||||
bar.Set('chart.background.grid', true);
|
||||
bar.Set('chart.gutter.left', 60);
|
||||
bar.Set('chart.gutter.bottom', 40);
|
||||
bar.Set('chart.text.angle', 45);
|
||||
bar.Draw();
|
||||
}
|
||||
</script>
|
||||
|
||||
::set url = "/admin/errors"::
|
||||
|
||||
$$browse(::browser::,::url::)
|
||||
<table class="table table-bordered table-striped table-condensed table-hover">
|
||||
<tr>
|
||||
<th>id</th>
|
||||
<th>date</th>
|
||||
<th>Error</th>
|
||||
<th>infos</th>
|
||||
<th>user id</th>
|
||||
<th>URL</th>
|
||||
</tr>
|
||||
<tr ::repeat r browser.current()::>
|
||||
<td>::r.id::</td>
|
||||
<td>::r.date::</td>
|
||||
|
||||
::set e = r.error.split('Called')::
|
||||
<td>
|
||||
::e.shift()::
|
||||
::if e.length > 0::
|
||||
<a href="#" onclick="$(this).next().toggle(); return false;">[stack]</a>
|
||||
<div style="display:none;">
|
||||
<pre>Called::e.join("Called")::</pre>
|
||||
</div>
|
||||
::end::
|
||||
</td>
|
||||
<td>
|
||||
<a href="#" onclick="$(this).next().toggle(); return false;">[infos]</a>
|
||||
<div style="display:none;">
|
||||
<b>IP: </b>::r.ip::<br/>
|
||||
<b>User-Agent: </b>::r.userAgent::
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<span ::cond r.uid!=null::>
|
||||
<a href="/p/hosted/user/::r.uid::">::r._user.getName()::</a>
|
||||
</span>
|
||||
</td>
|
||||
<td>::r.url::</td>
|
||||
</tr>
|
||||
</table>
|
||||
$$browse(::browser::,::url::)
|
||||
</div>
|
||||
</div>
|
||||
::end::
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
::use 'admin/design.mtt'::
|
||||
|
||||
|
||||
<h3>::key::</h3>
|
||||
<p>
|
||||
Du ::hDate(from):: au ::hDate(to)::<br/>
|
||||
Total : <b>::total::</b><br/>
|
||||
Moyenne : <b>::averageValue::</b>
|
||||
|
||||
</p>
|
||||
<p>
|
||||
<script type="text/javascript" src="/js/rgraph/RGraph.common.core.js" ></script>
|
||||
<script type="text/javascript" src="/js/rgraph/RGraph.bar.js" ></script>
|
||||
<canvas id="graph" width="900" height="150">[No canvas support]</canvas>
|
||||
<script>
|
||||
window.onload = function ()
|
||||
{
|
||||
|
||||
var datas = [];
|
||||
var labels = [];
|
||||
::foreach d data::
|
||||
datas.push(::d.value::);
|
||||
labels.push( '::d.date.toString().substr(0,10)::' );
|
||||
::end::
|
||||
|
||||
var bar = new RGraph.Bar('graph', datas);
|
||||
bar.Set('chart.labels', labels);
|
||||
bar.Set('chart.colors', ['#CC0']);
|
||||
bar.Set('chart.title', '::key::');
|
||||
bar.Set('chart.labels.above', true);
|
||||
bar.Set('chart.background.barcolor1', 'white');
|
||||
bar.Set('chart.background.barcolor2', 'white');
|
||||
bar.Set('chart.background.grid', true);
|
||||
bar.Set('chart.gutter.left', 60);
|
||||
bar.Set('chart.gutter.bottom', 40);
|
||||
bar.Set('chart.text.angle', 45);
|
||||
bar.Draw();
|
||||
}
|
||||
</script>
|
||||
|
||||
</p>
|
||||
<p>
|
||||
|
||||
<table class="table table-bordered table-striped">
|
||||
::foreach d data::
|
||||
<tr>
|
||||
<td>::hDate(d.date)::</td>
|
||||
<td>::d.value::</td>
|
||||
</tr>
|
||||
::end::
|
||||
</table>
|
||||
|
||||
</p>
|
||||
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,33 @@
|
||||
::use 'admin/design.mtt'::
|
||||
|
||||
<h2>Plugins</h2>
|
||||
<p>
|
||||
L'installation des plugins se fait sur la machine de développement.
|
||||
</p>
|
||||
|
||||
|
||||
<table class="table table-bordered">
|
||||
::foreach p plugins::
|
||||
<tr>
|
||||
<th>Nom</th>
|
||||
<th>Installé</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>::p.name::</td>
|
||||
<td>
|
||||
::set i = p.isInstalled()::
|
||||
$$bool(::i::)
|
||||
|
||||
::if i==false::
|
||||
<a href="/admin/plugins/install/::p.getName()::" class="btn btn-default">Installer</a>
|
||||
::end::
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
::end::
|
||||
|
||||
</table>
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,31 @@
|
||||
::use 'admin/design.mtt'::
|
||||
|
||||
<h2>Dictionnaire de produits</h2>
|
||||
|
||||
<p>
|
||||
Cagette.net inclut maintenant un dictionnaire de produits qui permet d'identifier
|
||||
facilement les produits que vous saisissez.
|
||||
</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
::foreach c categ::
|
||||
|
||||
<img src="/img/taxo/cat::c.id::.png" style="float:right;width:100px;border:1px solid #666;" />
|
||||
|
||||
<h4>#::c.id:: <a href="/db/TxpCategory/edit/::c.id::" target="_blank">::c.name::</a></h4>
|
||||
::foreach sc c.getSubCategories()::
|
||||
<p style="margin-left:12px;">
|
||||
<b><a href="/db/TxpSubCategory/edit/::sc.id::" target="_blank">::sc.name::</a></b>
|
||||
<br/>
|
||||
::foreach p sc.getProducts()::
|
||||
<a href="/db/TxpProduct/edit/::p.id::" target="_blank">::p.name::</a>,
|
||||
::end::
|
||||
|
||||
</p>
|
||||
::end::
|
||||
::end::
|
||||
|
||||
|
||||
::end::
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
::use 'design.mtt'::
|
||||
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="block">
|
||||
|
||||
<h4>
|
||||
::user._amap.name::
|
||||
</h4>
|
||||
|
||||
::if user._amap._image!=null::
|
||||
::if user._amap.extUrl!=null && user._amap.extUrl!=""::
|
||||
<a href="::user._amap.extUrl::"><img src="::file(user._amap._image)::" style="margin:auto;display: block;width: 100%;" class="thumbnail" /><br/></a>
|
||||
::else::
|
||||
<img src="::file(user._amap._image)::" style="margin:auto;display: block;width: 100%;" class="thumbnail" /><br/>
|
||||
::end::
|
||||
::end::
|
||||
|
||||
::raw nl2br(user.getAmap().txtIntro)::
|
||||
<br/>
|
||||
::if user.isAmapManager()::
|
||||
$$edit(::_("Edit")::,amap/edit)
|
||||
::end::
|
||||
|
||||
</div>
|
||||
|
||||
<div class="block">
|
||||
<b>::_("Main contact"):: :</b><br/>
|
||||
$$contact(::user.getAmap()._contact::)
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-9">
|
||||
<div class="row">
|
||||
|
||||
::foreach c contracts::
|
||||
<div class="col-md-12">
|
||||
<div class="article">
|
||||
<div class="row">
|
||||
<div class="col-md-3 text-center">
|
||||
<div ::cond c._vendor._image!=null:: style="background-image:url('::file(c._vendor._image)::');width:100px;height:100px;" class="productImg"/>
|
||||
<p>
|
||||
<b>::c._vendor.name::</b><br/>
|
||||
::c._vendor.city:: (::c._vendor.zipCode::)
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<h4><a href="/contract/view/::c.id::">::c.name::</a></h4>
|
||||
|
||||
<div style="font-size:0;">
|
||||
::foreach p c.getProductsPreview(5)::
|
||||
<div data-toggle="tooltip" data-placement="top" title="::p.name::" style="background-image:url('::p.getImage()::')" class="productImg"/>
|
||||
::end::
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
::if c._contact!=null::
|
||||
<b>::_("Coordinator"):: :</b>
|
||||
<br/>
|
||||
$$contact(::c._contact::)
|
||||
::end::
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
::end::
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,32 @@
|
||||
::use 'amapadmin/design.mtt'::
|
||||
|
||||
|
||||
<h2>::_("Choose a logo")::</h2>
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<form action="" method="POST" enctype="multipart/form-data">
|
||||
<input name="image" type="file" class="btn btn-default"/>
|
||||
|
||||
<br/>
|
||||
::_("Format : JPG, GIF or PNG"):: <br/>
|
||||
<br/>
|
||||
|
||||
<input type="submit" value="::_("Send")::" class="btn btn-primary" />
|
||||
</form>
|
||||
<br/>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6" ::cond image!=null:: >
|
||||
|
||||
<img src="::file(image)::" class="img-thumbnail" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,50 @@
|
||||
::use 'amapadmin/design.mtt'::
|
||||
|
||||
<h3>::user._amap.name::</h3>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<p>
|
||||
<strong>::membersNum::</strong> ::_("members")::.<br/>
|
||||
<strong>::contractsNum::</strong> ::_("contracts in progress")::.<br/>
|
||||
|
||||
<hr/>
|
||||
|
||||
$$edit(::_("Edit properties")::,/amap/edit)
|
||||
|
||||
<a href="/amapadmin/addimage/" class="btn btn-default btn-sm"> <span class="glyphicon glyphicon-picture"></span> ::_("Choose a logo")::</a>
|
||||
</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
<p>
|
||||
::raw _("Your group has a public page, You can use it as a micro-website.<br/>Copy-paste the address of this page and share it !")::
|
||||
<br/>
|
||||
</p>
|
||||
|
||||
|
||||
<p class="linkToShare">
|
||||
<a href="http://::HOST::/group/::user._amap.id::">
|
||||
http://::HOST::/group/::user._amap.id::
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/group/::user._amap.id::" class="btn btn-default"><span class="glyphicon glyphicon-chevron-right"></span> ::_("Display")::</a>
|
||||
</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
::if user._amap._image!=null::
|
||||
<img src="::file(user._amap._image)::" style="width: 100%;" class="thumbnail" />
|
||||
::end::
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,39 @@
|
||||
::use 'design.mtt'::
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="panel panel-warning">
|
||||
<div class="panel-heading">
|
||||
<span class="panel-title"><a href="/amapadmin">::_("My group")::</a></span>
|
||||
</div>
|
||||
|
||||
<ul id="subnav" class="nav nav-tabs nav-stacked" >
|
||||
|
||||
<li><a href="/amapadmin/rights/">::_("Access rights")::</a></li>
|
||||
<li><a href="/amapadmin/vatRates/">::_("VAT rates")::</a></li>
|
||||
<li><a href="/amapadmin/categories/">::_("Categories")::</a></li>
|
||||
<li><a href="/amapadmin/currency/">::_("Currency")::</a></li>
|
||||
::if nav!=null::
|
||||
|
||||
::foreach i nav::
|
||||
<li><a href="::i.link::">::i.name::</a> </li>
|
||||
::end::
|
||||
|
||||
::end::
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-9">
|
||||
<div class="article">
|
||||
::raw __content__::
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,40 @@
|
||||
::use 'amapadmin/design.mtt'::
|
||||
|
||||
<h3>::_("Management of rights and access")::</h3>
|
||||
|
||||
$$insert(::_("Add a right")::,/amapadmin/editRight)
|
||||
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th>::_("Name")::</th>
|
||||
<th>::_("Rights")::</th>
|
||||
<th>::_("Actions")::</th>
|
||||
|
||||
</tr>
|
||||
::foreach u users::
|
||||
<tr>
|
||||
<td>
|
||||
::u._user.getName()::
|
||||
</td>
|
||||
<td>
|
||||
<ul ::cond u._rights!=null::>
|
||||
::foreach r u._rights::
|
||||
<li>::u.getRightName(r)::</li>
|
||||
::end::
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
$$insert(::_("Modify")::,/amapadmin/editRight/::u.userId::)
|
||||
</td>
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
::end::
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,129 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html lang="::LANG::">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" xml:lang="::LANG::" lang="::LANG::" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>
|
||||
::if pageTitle!=null::
|
||||
::pageTitle::
|
||||
::else::
|
||||
::NAME::
|
||||
::end::
|
||||
</title>
|
||||
|
||||
<!-- Cagette CSS -->
|
||||
<link rel="stylesheet" type="text/css" href="/css/::getVariable('css')::/style.css"/>
|
||||
<!--
|
||||
<link rel="stylesheet" type="text/css" href="/css/::getVariable('css')::/shop.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="/css/::getVariable('css')::/map.css"/>-->
|
||||
|
||||
<!-- JQUERY -->
|
||||
<script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- BOOTSTRAP -->
|
||||
<link rel="stylesheet" href="/css/bootstrap.min.css" />
|
||||
|
||||
<!-- bootstrap datepicker -->
|
||||
<script type="text/javascript" src="/bower_components/moment/min/moment.min.js"></script>
|
||||
<script type="text/javascript" src="/bower_components/moment/locale/fr.js"></script>
|
||||
<script type="text/javascript" src="/bower_components/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js"></script>
|
||||
<link rel="stylesheet" href="/bower_components/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css" />
|
||||
|
||||
<!-- Leaflet CSS -->
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.1/dist/leaflet.css"
|
||||
integrity="sha512-Rksm5RenBEKSKFjgI3a41vrjkw4EVPlJ3+OiI65vTjIdo9brlAacEuKOiQ5OFh7cOI1bkDwLqdLw3Zg0cRJAAQ=="
|
||||
crossorigin=""/>
|
||||
|
||||
<!-- typeahead
|
||||
<script type="text/javascript" src="/bower_components/typeahead.js/dist/typeahead.jquery.js"></script> -->
|
||||
|
||||
<!-- font awesome -->
|
||||
<script src="https://use.fontawesome.com/97d97e0dab.js"></script>
|
||||
|
||||
<!-- polyfill for IE11 : Object.assign() doesnt exists in IE11 , error in libs.js -->
|
||||
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
|
||||
|
||||
<!-- Haxe JS + libs bundled with browserify -->
|
||||
<script type="text/javascript" src="/js/::getVariable('js')::/libs.js"></script>
|
||||
<script type="text/javascript" src="/js/::getVariable('js')::/app.js"></script>
|
||||
</head>
|
||||
|
||||
::if container==null:: ::set container="container":: ::end::
|
||||
<body class="::container::">
|
||||
|
||||
::if DEBUG::
|
||||
<div style="position: absolute;background: #666;padding: 8px;left: 0;color: #FF0;">DEBUG ::session.lang::</div>
|
||||
::end::
|
||||
|
||||
::if HOST.substr(0,3)=="pp."::
|
||||
<div style="position: absolute;background: #F60;padding: 8px;left: 0;color: #FF0;">PREPROD</div>
|
||||
::end::
|
||||
|
||||
<!-- Modal window -->
|
||||
<div class="modal" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h2 class="modal-title" id="myModalLabel"></h2>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
...
|
||||
</div>
|
||||
<div class="modal-footer" style="clear:both;">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">
|
||||
<span class='glyphicon glyphicon-remove'></span> ::_("Close")::
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
::raw __content__::
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
//Google Analytics
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-17932663-2']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
|
||||
|
||||
|
||||
$(function () {
|
||||
//enable BS3 Tooltips & popovers
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
$('[data-toggle="popover"]').popover();
|
||||
|
||||
//init lang in js App
|
||||
_.LANG = "::session.lang::";
|
||||
|
||||
//tutorials
|
||||
::if tuto!=null::
|
||||
_.getTuto("::tuto.name::",::tuto.step::);
|
||||
::end::
|
||||
|
||||
_.antiDoubleClick();
|
||||
|
||||
})
|
||||
|
||||
//tracking 24x7
|
||||
var rumMOKey='1d36c37d438ba069db210c73cb74308d';
|
||||
(function(){
|
||||
if(window.performance && window.performance.timing && window.performance.navigation) {
|
||||
var site24x7_rum_beacon=document.createElement('script');
|
||||
site24x7_rum_beacon.async=true;
|
||||
site24x7_rum_beacon.setAttribute('src','//static.site24x7rum.com/beacon/site24x7rum-min.js?appKey='+rumMOKey);
|
||||
document.getElementsByTagName('head')[0].appendChild(site24x7_rum_beacon);
|
||||
}
|
||||
})(window)
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,11 @@
|
||||
<!-- used by the connector plugin -->
|
||||
<!-- the modal window html is already in the default design -->
|
||||
<script>
|
||||
$("#myModal").find(".modal-body").html("::raw html::").removeClass("modal-lg");
|
||||
$("#myModal").find(".modal-title").html("::raw title::");
|
||||
::if btn!=null::
|
||||
$("#myModal").find(".modal-footer").html("::raw btn::");
|
||||
::end::
|
||||
$("#myModal").modal();
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,12 @@
|
||||
<div class="block">
|
||||
::if user!=null::
|
||||
::_("Hello"):: ::user.getName()::<br/>
|
||||
|
||||
<a href="/user/logout" class="btn btn-default btn-sm">::_("Log out")::</a>
|
||||
::else::
|
||||
|
||||
::raw _("You already have an account?<br/>
|
||||
Click here to log in")::<br/>
|
||||
<a href="/user/login" class="btn btn-default btn-sm btn-primary">::_("Log in")::</a>
|
||||
::end::
|
||||
</div>
|
||||
@@ -0,0 +1,48 @@
|
||||
::use 'amapadmin/design.mtt'::
|
||||
|
||||
<h2>::_("Categories")::</h2>
|
||||
|
||||
<p>
|
||||
::raw _("Categories allow to sort your products per category, for example \"vegetables, meet, backery, etc.\"<br/> It is possible to create many groups of categories in order to sort products as we wish.")::
|
||||
</p>
|
||||
<p ::cond groups.length==0 ::>
|
||||
::_("You currently have no category. Would you like to create the list of categories by default ?")::
|
||||
<a href="/amapadmin/categories/generate" class="btn btn-default">::_("Create the list of default categories")::</a>
|
||||
</p>
|
||||
|
||||
::foreach g groups::
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th>
|
||||
Groupe "::g.name::"
|
||||
</th>
|
||||
<th>
|
||||
<a href="/amapadmin/categories/editGroup/::g.id::" class="btn btn-default btn-xs">::_("Modify group")::</a>
|
||||
<a href="/amapadmin/categories/deleteGroup/::g.id::?token=::token::" class="btn btn-default btn-xs" $$confirm()>::_("Remove group")::</a>
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
::foreach c g.getCategories()::
|
||||
<tr>
|
||||
<td>
|
||||
<span class="tag" style="background: ::c.getColor()::;">::c.name::</span>
|
||||
</td>
|
||||
<td>
|
||||
<a href="/amapadmin/categories/edit/::c.id::" class="btn btn-default btn-xs">::_("Modify")::</a>
|
||||
<a href="/amapadmin/categories/delete/::c.id::?token=::token::" class="btn btn-default btn-xs" $$confirm() >::_("Remove")::</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
::end::
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/amapadmin/categories/insert/::g.id::" class="btn btn-default btn-xs">::_("Add a category in this group")::</a>
|
||||
</td>
|
||||
<td></td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
::end::
|
||||
|
||||
<a href="/amapadmin/categories/insertGroup" class="btn btn-default">::_("Add a group")::</a>
|
||||
::end::
|
||||
@@ -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::
|
||||
@@ -0,0 +1,56 @@
|
||||
::use 'design.mtt'::
|
||||
|
||||
<!--
|
||||
<style>
|
||||
.calDiv{
|
||||
width:14.28%;
|
||||
background:grey;
|
||||
padding:2px;
|
||||
height:50px;
|
||||
border:solid 1px black;
|
||||
display:inline-block;
|
||||
}
|
||||
</style>
|
||||
<div class="col-md-12">
|
||||
<div class="article">
|
||||
|
||||
<h2>::_("Calendar")::</h2>
|
||||
|
||||
<div class="calDiv"></div><div class="calDiv"></div><div class="calDiv"></div><div class="calDiv"></div><div class="calDiv"></div><div class="calDiv"></div><div class="calDiv"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
-->
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="article">
|
||||
|
||||
<h2>Calendrier</h2>
|
||||
|
||||
<div style="-webkit-column-count: 3;-moz-column-count: 3;column-count: 3;">
|
||||
|
||||
::foreach c calendar::
|
||||
|
||||
::if c.d.getTime() < now::
|
||||
::set col="0.3"::
|
||||
::else::
|
||||
::set col="1"::
|
||||
::end::
|
||||
|
||||
<div style="opacity: ::col::;margin-bottom:8px;">
|
||||
|
||||
::hDate(c.d)::<br/>
|
||||
::foreach e c.events::
|
||||
<div style="margin-left:16px;margin-right:16px;width:12px;height:8px;display:inline-block;background: ::intToHex(e.color,6)::;"></div><b> ::e.name:: </b><br/>
|
||||
::end::
|
||||
</div>
|
||||
|
||||
::end::
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,57 @@
|
||||
::use 'design.mtt'::
|
||||
::set c = contract::
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="block">
|
||||
<ul>
|
||||
<li><a href="/contractAdmin/products/::c.id::">::_("Products")::</a></li>
|
||||
<li><a href="/contractAdmin/distributions/::c.id::">::_("Deliveries")::</a></li>
|
||||
<li><a href="/contractAdmin/orders/::c.id::">::_("Orders")::</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-9">
|
||||
<div class="article">
|
||||
|
||||
<span class="title" style="margin-bottom: 18px;display: block;">::c.name:: - ::c._vendor.name::</span>
|
||||
|
||||
<div class="container">
|
||||
<div class="span4">
|
||||
<b>Produits</b>
|
||||
<table class="table">
|
||||
::foreach p c.getProducts()::
|
||||
<tr>
|
||||
<td>::p.name::</td>
|
||||
<td>$$edit(modifier,/product/edit/::p.id::)</td>
|
||||
</tr>
|
||||
::end::
|
||||
</table>
|
||||
$$insert(Nouveau produit,/product/insert)
|
||||
|
||||
</div>
|
||||
|
||||
<div class="span4">
|
||||
<b>::_("Deliveries")::</b>
|
||||
<table class="table">
|
||||
::foreach d c.getDistribs()::
|
||||
<tr>
|
||||
<td>::d.date.toString()::</td>
|
||||
<td>$$edit(modifier,/distribution/edit/::d.id::) </td>
|
||||
</tr>
|
||||
::end::
|
||||
</table>
|
||||
$$insert(Nouvelle livraison,/distribution/insert)
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,149 @@
|
||||
::use 'design.mtt'::
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
<!-- Distributions to validate -->
|
||||
<div class="article text-center" ::cond multidistribs.length>0:: style="max-height:400px;overflow-y: auto;">
|
||||
<h2>::_("Distributions to validate")::</h2>
|
||||
|
||||
<p>::_("You need to validate these distributions which took place recently")::</p>
|
||||
|
||||
::foreach m multidistribs::
|
||||
<p>
|
||||
::if(!m.isConfirmed())::
|
||||
<a href="/distribution/validate/::m.getDate().toString().substr(0,10)::/::m.getPlace().id::" class="btn btn-primary">
|
||||
::dDate(m.getDate())::, ::m.getPlace().name::
|
||||
</a>
|
||||
::if (isAdmin)::
|
||||
<a href="/distribution/autovalidate/::m.getDate().toString().substr(0,10)::/::m.getPlace().id::" class="btn btn-danger">Admin : Autovalidate</a>
|
||||
::end::
|
||||
::elseif(isAdmin)::
|
||||
<a class="btn btn-default disabled">
|
||||
<span class="glyphicon glyphicon-ok"></span> ::dDate(m.getDate())::, ::m.getPlace().name::
|
||||
</a>
|
||||
<a href="/distribution/unvalidate/::m.getDate().toString().substr(0,10)::/::m.getPlace().id::" class="btn btn-danger">Admin : Unvalidate</a>
|
||||
::end::
|
||||
</p>
|
||||
::end::
|
||||
|
||||
</div>
|
||||
|
||||
<div class="article" id="contracts">
|
||||
<h2>
|
||||
::if getParam("old")::
|
||||
::_("Old contracts")::
|
||||
::else::
|
||||
::_("Contracts")::
|
||||
::end::
|
||||
</h2>
|
||||
<table class="table">
|
||||
::foreach c contracts::
|
||||
::if c.endDate!=null && c.endDate.getTime() < Date.now().getTime()::
|
||||
::set class = "disabled"::
|
||||
::elseif c.startDate!=null && c.startDate.getTime() > Date.now().getTime()::
|
||||
::set class = "disabled"::
|
||||
::else::
|
||||
::set class = ""::
|
||||
::end::
|
||||
<tr class="::class::" >
|
||||
<td>
|
||||
::if c._vendor._image!=null::
|
||||
<div class="productImg" style="background-image:url('::file(c._vendor._image)::');width:48px;height:48px;" ></div>
|
||||
::end::
|
||||
</td>
|
||||
<td>::c._vendor.name::</td>
|
||||
<td>
|
||||
<b>::c.name::</b>
|
||||
</td>
|
||||
<td style="font-size:0.9em;">
|
||||
du ::hDate(c.startDate)::<br/>
|
||||
au ::hDate(c.endDate)::
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<div class="btn-group" role="group">
|
||||
$$edit(::_("Manage")::,/contractAdmin/view/::c.id::)
|
||||
|
||||
::if user.canManageAllContracts()::
|
||||
$$delete(::_("Del.||short version of delete")::,/contract/delete/::c.id::?token=::token::)
|
||||
::end::
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
::end::
|
||||
</table>
|
||||
|
||||
|
||||
::if user.canManageAllContracts()::
|
||||
$$insert(::_("New contract")::,/contract/insert/)
|
||||
::end::
|
||||
<a href="/contractAdmin?old=1" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-folder-close"></span> ::_("Old contracts")::</a>
|
||||
<a href="/contractAdmin/calendar" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-calendar"></span> ::_("Calendar")::</a>
|
||||
<div class="dropdown" style="display:inline-block;">
|
||||
<button class="btn btn-default btn-sm dropdown-toggle btn-noAntiDoubleClick" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
||||
::_("Global orders view")::
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
|
||||
<li><a href="/contractAdmin/ordersByDate"><span class="glyphicon glyphicon-list"></span> ::_("Same day")::</a></li>
|
||||
<li><a href="/contractAdmin/ordersByTimeFrame"><span class="glyphicon glyphicon-list"></span> ::_("Timeframe")::</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="article" id="vendors">
|
||||
<h2>::_("Farmers")::</h2>
|
||||
<table class="table">
|
||||
::foreach v vendors::
|
||||
<tr>
|
||||
<td>
|
||||
::if v._image!=null::
|
||||
<div class="productImg" style="background-image:url('::file(v._image)::');width:48px;height:48px;"></div>
|
||||
::end::
|
||||
</td>
|
||||
<td><b>::v.name::</b></td>
|
||||
<td>
|
||||
<div class="btn-group" role="group">
|
||||
$$edit(::_("Edit")::,/vendor/edit/::v.id::)
|
||||
<a href="/vendor/addImage/::v.id::" class="btn btn-default btn-sm"> <span class="glyphicon glyphicon-picture"></span> ::_("Picture")::</a>
|
||||
::if user.isAmapManager():: $$delete(,/vendor/delete/::v.id::?token=::token::) ::end::
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
::end::
|
||||
</table>
|
||||
$$insert(::_("New farmer")::,/vendor/insert/)
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="article" id="places">
|
||||
|
||||
<h2>::_("Delivery places")::</h2>
|
||||
<table class="table">
|
||||
::foreach p places::
|
||||
<tr>
|
||||
<td><b>::p.name::</b></td>
|
||||
<td>
|
||||
$$edit(::_("Edit")::,/place/edit/::p.id::)
|
||||
::if user.isAmapManager():: $$delete(::_("Del.||short version for delete")::,/place/delete/::p.id::?token=::token::) ::end::
|
||||
</td>
|
||||
</tr>
|
||||
::end::
|
||||
</table>
|
||||
$$insert(::_("New delivery place")::,/place/insert/)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,82 @@
|
||||
::use 'contractadmin/design.mtt'::
|
||||
|
||||
<h2>::_("Distributions")::</h2>
|
||||
|
||||
<table class="table">
|
||||
::foreach d deliveries::
|
||||
|
||||
::if d.date!=null && d.date.getTime() < Date.now().getTime()::
|
||||
::set style = "opacity:0.5;"::
|
||||
::else::
|
||||
::set style = ""::
|
||||
::end::
|
||||
<tr style="::style::" >
|
||||
|
||||
<td>
|
||||
::if d.distributionCycleId!=null::
|
||||
<img src="/img/icons/arrow_refresh.png" style="opacity:0.5;" />
|
||||
::end::
|
||||
|
||||
::set da = getDate(d.date)::
|
||||
|
||||
::if d.end!=null::
|
||||
|
||||
::set e = getDate(d.end)::
|
||||
::end::
|
||||
|
||||
::da.dow:: ::da.d:: ::da.m:: de ::da.h+":"+da.i::
|
||||
|
||||
::if d.end!=null::
|
||||
à ::e.h+":"+e.i::
|
||||
::end::
|
||||
</td>
|
||||
<td>
|
||||
::d._place.name::
|
||||
</td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
$$edit(::_("Edit")::,/distribution/edit/::d.id::)
|
||||
$$delete(::_("Delete")::,/distribution/delete/::d.id::)
|
||||
<a href="/distribution/list/::d.id::" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-print"></span> ::_("Distribution list")::</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
::end::
|
||||
</table>
|
||||
|
||||
|
||||
<table ::cond cycles.length>0:: class="table">
|
||||
<tr>
|
||||
<th>::_("Distribution cycle")::</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
::foreach c cycles::
|
||||
<tr>
|
||||
<td><b>
|
||||
::switch c.cycleType::
|
||||
::case:: ::_("Weekly")::
|
||||
::case:: ::_("Monthly")::
|
||||
::case:: ::_("Every 2 weeks")::
|
||||
::case:: ::_("Every 3 weeks")::
|
||||
::end::
|
||||
</b>
|
||||
: Du ::hDate(c.startDate):: au ::hDate(c.endDate)::
|
||||
</td>
|
||||
<td>
|
||||
$$delete(::_("Del.")::,::"/distribution/deleteCycle/"+c.id::)
|
||||
</td>
|
||||
</tr>
|
||||
::end::
|
||||
</table>
|
||||
|
||||
$$insert(::_("One time distribution")::,/distribution/insert/::c.id::)
|
||||
$$insert(::_("Distribution cycle")::,/distribution/insertCycle/::c.id::)
|
||||
|
||||
<a href="/contractAdmin/distributionp/::c.id::" class="btn btn-default btn-sm">
|
||||
<span class="glyphicon glyphicon-user"></span> ::_("Distributions engagement")::
|
||||
</a>
|
||||
<a href="/contractAdmin/distributions/::c.id::?old=1" class="btn btn-default btn-sm">
|
||||
::_("Old distributions")::
|
||||
</a>
|
||||
::end::
|
||||
@@ -0,0 +1,44 @@
|
||||
::use 'design.mtt'::
|
||||
|
||||
<div class="col-md-12">
|
||||
<h2>::c.name:: - ::c._vendor.name::</h2>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="article">
|
||||
<ul id="subnav" class="nav nav-pills nav-stacked">
|
||||
<li id="default" ::attr class if(nav[1]=="view") 'active'::>
|
||||
<a href="/contractAdmin/view/::c.id::">::_("Summary")::</a></li>
|
||||
<li id="edit">
|
||||
<a href="/contract/edit/::c.id::">::_("Edit contract")::</a></li>
|
||||
<li id="products" ::attr class if(nav[1]=="products") 'active'::>
|
||||
<a href="/contractAdmin/products/::c.id::">::_("Products")::</a></li>
|
||||
<li id="deliveries" ::attr class if(nav[1]=="distributions") 'active'::>
|
||||
<a href="/contractAdmin/distributions/::c.id::">::_("Distributions")::</a></li>
|
||||
<li id="orders" ::attr class if(nav[1]=="orders") 'active'::>
|
||||
<a href="/contractAdmin/orders/::c.id::">::_("Orders")::</a></li>
|
||||
<li id="stats">
|
||||
<a href="/contractAdmin/stats/::c.id::">::_("Stats")::</a></li>
|
||||
::if navbar!=null::
|
||||
<hr/>
|
||||
::foreach i navbar::
|
||||
<li ::attr class if(nav[1]==i.id) 'active'::>
|
||||
<a href="::i.link::">
|
||||
<span ::cond i.icon:: class="glyphicon glyphicon-::i.icon::" ></span>
|
||||
::i.name::</a>
|
||||
</li>
|
||||
::end::
|
||||
|
||||
::end::
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-9">
|
||||
<div class="article">
|
||||
::raw __content__::
|
||||
</div>
|
||||
</div>
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,60 @@
|
||||
::use 'contractadmin/design.mtt'::
|
||||
<h2>::_("Participate to deliveries")::</h2>
|
||||
|
||||
<div>
|
||||
::_("This page allows to see if members have participated to deliveries enough.")::
|
||||
</div>
|
||||
|
||||
<div style="margin:16px 0 16px 0;text-align:center;" class="alert-warning">
|
||||
<strong>::raw __("::distribs:: deliveries requiring ::distributorNum:: person(s)",{distribs:distribs,distributorNum:distributorNum})::,<br/>
|
||||
::users:: ::_("person(s) using this contract"):: <br/>
|
||||
= ::num:: ::_("participations to deliveries to do per family.")::</strong>
|
||||
</div>
|
||||
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th class="col-md-5">::_("Suscriber")::</th>
|
||||
<th class="col-md-5">::raw _("Number of attendances to deliveries")::</th>
|
||||
<th class="col-md-2"></th>
|
||||
</tr>
|
||||
|
||||
::foreach p participations::
|
||||
<tr>
|
||||
<td>
|
||||
::p.user.getCoupleName()::
|
||||
</td>
|
||||
<td>
|
||||
::p.count::
|
||||
</td>
|
||||
<td>
|
||||
::if p.count>=numRounded::
|
||||
<img src="/img/icons/accept.png" /> OK
|
||||
::else::
|
||||
<img src="/img/icons/stop.png" /> ::_("Insufficient")::
|
||||
::end::
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
::end::
|
||||
</table>
|
||||
|
||||
::if(extParticipations.length>0)::
|
||||
<hr/>
|
||||
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th class="col-md-5">::_("Member without order in this contract")::</th>
|
||||
<th class="col-md-5">::raw _("Number of attendances to deliveries")::</th>
|
||||
<th class="col-md-2"></th>
|
||||
</tr>
|
||||
::foreach p extParticipations::
|
||||
<tr>
|
||||
<td>::p.user.getCoupleName()::</td>
|
||||
<td>::p.count::</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
::end::
|
||||
</table>
|
||||
::end::
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,148 @@
|
||||
::use 'contractadmin/design.mtt'::
|
||||
|
||||
|
||||
::if u==null::
|
||||
<h3>::_("Key-in an order")::</h3>
|
||||
::else::
|
||||
<h3>::_("Key-in an order for"):: ::u.getCoupleName()::</h3>
|
||||
::end::
|
||||
|
||||
::if distribution!=null::
|
||||
<p>::_("For the delivery of the"):: <b>::hDate(distribution.date)::</b></p>
|
||||
::end::
|
||||
|
||||
<form name="order" id="order" method="POST" action="" class="form-horizontal">
|
||||
<input type="hidden" name="token" value="::token::"/>
|
||||
::if distribution!=null::
|
||||
<input type="hidden" name="distribution" value="::distribution.id::" />
|
||||
::end::
|
||||
|
||||
::if u==null ::
|
||||
<div class="form-group">
|
||||
<label for="user" class="control-label col-md-2 text-left">::_("Member:")::</label>
|
||||
<div class="col-md-10">
|
||||
<select name="user" id="user" class="form-control">
|
||||
::foreach uu users::
|
||||
<option value="::uu.value::">::uu.label::</option>
|
||||
::end::
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
::end::
|
||||
|
||||
<br/>
|
||||
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>::_("Product")::</th>
|
||||
<th>::_("Price")::</th>
|
||||
<th>::_("Quantity")::</th>
|
||||
<th ::cond !user._amap.hasPayments()::>::_("Status")::</th>
|
||||
::if distribution==null::<th>::_("Alternately with :")::</th>::end::
|
||||
</tr>
|
||||
::set total = 0::
|
||||
::foreach uo userOrders::
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
::if uo.product.active==false::
|
||||
<img src="::uo.product.getImage()::" style="width:32px;height:32px;opacity:0.3;" />
|
||||
::else::
|
||||
<img src="::uo.product.getImage()::" style="width:32px;height:32px;" />
|
||||
::end::
|
||||
</td>
|
||||
<td>
|
||||
::if uo.product.active==false::
|
||||
<span style="color:#AAA;">::uo.product.getName():: ::_("(inactive)")::</span>
|
||||
::else::
|
||||
::uo.product.getName()::
|
||||
::end::
|
||||
|
||||
</td>
|
||||
<td>
|
||||
::formatNum(uo.product.price):: ::currency()::
|
||||
</td>
|
||||
<td>
|
||||
::if uo.order==null::
|
||||
::set q = 0::
|
||||
::else::
|
||||
::set q = uo.order.quantity::
|
||||
::end::
|
||||
|
||||
::set total = total+(q*uo.product.price)::
|
||||
<input type="text" class="form-control input-sm" name="product::uo.product.id::" id="product::uo.product.id::" value="::q::" />
|
||||
</td>
|
||||
|
||||
<!-- "paid" checkbox only if payments are not enabled -->
|
||||
<td class="paid" ::cond !user._amap.hasPayments()::>
|
||||
::_("Paid:")::
|
||||
::if uo.order!=null::
|
||||
<input type="checkbox" name="paid::uo.product.id::" value="1" ::attr checked (uo.order.paid==true ):: />
|
||||
::else::
|
||||
<input type="checkbox" name="paid::uo.product.id::" value="1" />
|
||||
::end::
|
||||
|
||||
</td>
|
||||
<td ::cond distribution==null::>
|
||||
|
||||
<select name="user2::uo.product.id::" class="form-control input-sm" style="width:150px;display:inline-block;">
|
||||
<option value="0">-</option>
|
||||
::foreach uu users::
|
||||
<option value="::uu.value::" ::attr selected (uo.order!=null && uo.order._user2!=null && uo.order._user2.id==uu.value)::>::uu.label::</option>
|
||||
::end::
|
||||
</select>
|
||||
|
||||
<input data-toggle="tooltip" title="::_("Reverse the alternation")::" type="checkbox" name="invert::uo.product.id::" value="1" ::attr checked (uo.order!=null && uo.order.hasInvertSharedOrder()==true ):: />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
::end::
|
||||
|
||||
::set extra = 0::
|
||||
|
||||
::if c.hasPercentageOnOrders()::
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>::_("Total order")::</th>
|
||||
<th>::total::::currency()::</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td>::c.percentageName:: (::c.percentageValue::%)</td>
|
||||
::set extra = total*(c.percentageValue/100)::
|
||||
<td>::extra::::currency()::</td>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
::end::
|
||||
|
||||
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>::_("Total")::</th>
|
||||
<th>::total+extra::::currency()::</th>
|
||||
<th></th>
|
||||
<th ::cond !user._amap.hasPayments()::>
|
||||
<a href="#" id="checkButton">::_("Check all")::</a>
|
||||
<script language="javascript">
|
||||
var globalCheck = true;
|
||||
var checkEverything = function(e){
|
||||
var boxes = $("td.paid :checkbox");
|
||||
boxes.attr("checked",globalCheck);
|
||||
globalCheck=!globalCheck;
|
||||
e.preventDefault();
|
||||
};
|
||||
$("#checkButton").click(checkEverything);
|
||||
</script>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<input type="submit" class="btn btn-primary" value="::_("Validate the order")::" name="submit" id="submit" />
|
||||
|
||||
</form>
|
||||
::end::
|
||||
@@ -0,0 +1,214 @@
|
||||
::use 'contractadmin/design.mtt'::
|
||||
|
||||
<h3>::_("Orders")::</h3>
|
||||
|
||||
::if distribution!=null::
|
||||
::_("Delivery of the"):: <b>::hDate(distribution.date)::</b>
|
||||
::end::
|
||||
|
||||
<div id="orderBox"></div><!-- for react -->
|
||||
|
||||
<div style="margin:8px 0;">
|
||||
|
||||
::if distribution!=null::
|
||||
<a href="/contractAdmin/edit/::c.id::?d=::distribution.id::" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-plus-sign"></span> ::_("New order")::</a>
|
||||
::else::
|
||||
<a href="/contractAdmin/edit/::c.id::" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-plus-sign"></span> ::_("New order")::</a>
|
||||
::end::
|
||||
|
||||
::if distribution!=null::
|
||||
$$export(/contractAdmin/orders/::c.id::?csv=1&d=::distribution.id::)
|
||||
<a href="/contractAdmin/ordersByProduct/::c.id::?d=::distribution.id::" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-list"></span>
|
||||
::_("Summary by products")::
|
||||
</a>
|
||||
|
||||
<div class="dropdown" style="display:inline-block;">
|
||||
<button class="btn btn-default btn-sm dropdown-toggle btn-noAntiDoubleClick" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="glyphicon glyphicon-print"></span> ::_("Attendance sheet")::
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
|
||||
<li><a href="/distribution/list/::distribution.id::"> ::_("Standard")::</a></li>
|
||||
<li><a href="/distribution/listByProductUser/::distribution.id::"> ::_("By Product-User")::</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
::else::
|
||||
$$export(/contractAdmin/orders/::c.id::?csv=1)
|
||||
<a href="/contractAdmin/ordersByProduct/::c.id::" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-list"></span>
|
||||
::_("Summary by products")::</a>
|
||||
::end::
|
||||
</div>
|
||||
|
||||
::if disabledProducts > 0::
|
||||
$$alert( ::raw __("Be careful, there are <b>::disabledProducts::</b> order(s) containing <b>disabled products</b>.",{disabledProducts:disabledProducts}):: )
|
||||
::end::
|
||||
|
||||
|
||||
<style>
|
||||
td.userRow{
|
||||
font-size:120%;
|
||||
color:#e7e7e7;
|
||||
}
|
||||
td.userRow a{ color:white; }
|
||||
</style>
|
||||
|
||||
::set total = 0::
|
||||
::set totalAdh = 0::
|
||||
<table class="table table-bordered table-hover table-condensed" style="width:100%;">
|
||||
::set name = ""::
|
||||
::set name2 = ""::
|
||||
|
||||
::foreach m orders::
|
||||
|
||||
::if m.userName != name || m.userName2 != name2::
|
||||
<tr style="background-color:#666;">
|
||||
|
||||
<td colspan="7" style="font-size:120%;color:#e7e7e7;">
|
||||
|
||||
::if distribution!=null::
|
||||
::set basket = getBasket(m.userId,distribution._place.id,distribution.date)::
|
||||
<div class="basketNumber" ::cond basket!=null:: >
|
||||
<i class="fa fa-shopping-basket" aria-hidden="true"></i> N°::basket.num::
|
||||
</div>
|
||||
::end::
|
||||
|
||||
::m.userName::
|
||||
::if m.userName2!=null::
|
||||
<span class="glyphicon glyphicon-refresh"></span> ::_("alternated with"):: ::m.userName2::
|
||||
::end::
|
||||
|
||||
::set name = m.userName ::
|
||||
::set name2 = m.userName2 ::
|
||||
::set totalAdh = totalAdh+1::
|
||||
</td>
|
||||
<td>
|
||||
<!--
|
||||
::if distribution!=null::
|
||||
<a href="/contractAdmin/edit/::c.id::/::m.userId::?d=::distribution.id::" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-edit"></span>
|
||||
::_("Edit")::</a>
|
||||
::else::
|
||||
<a href="/contractAdmin/edit/::c.id::/::m.userId::" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-edit"></span>
|
||||
::_("Edit")::</a>
|
||||
::end::
|
||||
-->
|
||||
|
||||
|
||||
::if distribution!=null::
|
||||
<a class="btn btn-default btn-xs"
|
||||
onclick="_.initOrderBox(::m.userId::,::distribution.id::,::distribution._contract.id::,::distribution._contract.type::,'::escapeJS(hDate(distribution.date))::','::escapeJS(distribution._place.toString())::','::escapeJS(m.userName)::','::user.getAmap().currency::',::user.getAmap().hasPayments()::,'/contractAdmin/orders/::c.id::?d=::distribution.id::')">
|
||||
<span class="glyphicon glyphicon-edit"></span>
|
||||
::_("Edit")::
|
||||
</a>
|
||||
::else::
|
||||
<a class="btn btn-default btn-xs"
|
||||
onclick="_.initOrderBox(::m.userId::, null, ::c.id::,::c.type::, null, null, '::escapeJS(m.userName)::','::user.getAmap().currency::',::user.getAmap().hasPayments()::,'/contractAdmin/orders/::c.id::')">
|
||||
<span class="glyphicon glyphicon-edit"></span>
|
||||
::_("Edit")::
|
||||
</a>
|
||||
::end::
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th>::_("Prod. ID")::</th>
|
||||
<th>::_("Qty")::</th>
|
||||
<th>::_("Product")::</th>
|
||||
<th><a href="#" data-toggle="tooltip" data-placement="top" title="::_("Unit price including taxes")::">::_("U.P||price per unit")::</a></th>
|
||||
<th>::_("Sub-total")::</th>
|
||||
<th>::_("Fees")::</th>
|
||||
<th>::_("Total")::</th>
|
||||
<th>::_("Paid")::</th>
|
||||
</tr>
|
||||
::end::
|
||||
|
||||
|
||||
::if m.disabled==true::
|
||||
::set class="danger"::
|
||||
::else::
|
||||
::set class=""::
|
||||
::end::
|
||||
<tr class="::class::">
|
||||
<td class="ref">
|
||||
$$nullSafe(::m.productRef::)
|
||||
</td>
|
||||
<td>
|
||||
::if(m.quantity==0 && m.canceled)::
|
||||
<span style="color:#AAA">::_("Canceled")::</span>
|
||||
::else::
|
||||
::raw m.smartQt::
|
||||
::end::
|
||||
</td>
|
||||
|
||||
<td>
|
||||
::m.productName::
|
||||
</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.canceled && m.quantity!=0::
|
||||
::if m.paid==true::
|
||||
<span style="color:#00AA00;">::_("Paid")::</span>
|
||||
::else::
|
||||
<span style="color:#DD0000;">::_("Not paid")::</span>
|
||||
::end::
|
||||
::end::
|
||||
|
||||
::if(m.quantity==0)::
|
||||
|
||||
::if distribution==null::
|
||||
<a href="/contractAdmin/orders/::c.id::?delete=::m.id::&token=::token::" $$confirm(::__("Do you really want to delete this order row for the product \"::productName::\" ?",{productName:m.productName})::) class="btn btn-danger btn-xs" >
|
||||
<span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
|
||||
::_("Delete")::
|
||||
</a>
|
||||
::else::
|
||||
<a href="/contractAdmin/orders/::c.id::?d=::distribution.id::&delete=::m.id::&token=::token::" $$confirm(::__("Do you really want to delete this order row for the product \"::productName::\" ?",{productName:m.productName})::) class="btn btn-danger btn-xs" >
|
||||
<span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
|
||||
::_("Delete")::
|
||||
</a>
|
||||
::end::
|
||||
|
||||
::end::
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
::end::
|
||||
|
||||
|
||||
|
||||
<tr style="background:#DDD;">
|
||||
|
||||
<th colspan="6">::_("Total")::</th>
|
||||
<th>::formatNum(total):: ::currency()::</th>
|
||||
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
<div style="margin-top:18px;margin-bottom:18px;">
|
||||
::raw __("<b>::totalAdh::</b> member(s) in this distribution.",{totalAdh:totalAdh})::
|
||||
</div>
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,172 @@
|
||||
::use 'design.mtt'::
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="article">
|
||||
|
||||
<div class="text-center">
|
||||
<h3>
|
||||
Distribution du ::hDate(date)::
|
||||
</h3>
|
||||
<h4><span class="glyphicon glyphicon-map-marker"></span>::place::</h4>
|
||||
<br/>
|
||||
<!--::if(confirmed)::
|
||||
::_("Validated")::
|
||||
::else::
|
||||
::_("Not validated")::
|
||||
::end::-->
|
||||
</div>
|
||||
|
||||
<div class="text-center">
|
||||
<a href="/distribution/listByDate/::date.toString().substr(0,10)::/::place.id::/csv" class="btn btn-default btn-sm"> <span class="glyphicon glyphicon-list-alt"></span> ::_("CSV Export"):: </a>
|
||||
<a href="/distribution/listByDate/::date.toString().substr(0,10)::/::place.id::" class="btn btn-default btn-sm"> <span class="glyphicon glyphicon-print"></span> ::_("Attendance sheet"):: </a>
|
||||
|
||||
::if ctotal::
|
||||
<a href="/contractAdmin/ordersByDate/::date.toString().substr(0,10)::/::place.id::" class="btn btn-default btn-sm">::_("Totals per member")::</a>
|
||||
::else::
|
||||
<a href="/contractAdmin/ordersByDate/::date.toString().substr(0,10)::/::place.id::?ctotal=1" class="btn btn-default btn-sm">::_("Sub-totals per contract")::</a>
|
||||
::end::
|
||||
|
||||
<a href="/contractAdmin/vendorsByDate/::date.toString().substr(0,10)::/::place.id::" class="btn btn-default btn-sm">::_("Totals per supplier")::</a>
|
||||
</div>
|
||||
|
||||
|
||||
<hr/>
|
||||
|
||||
<table class="table table-bordered table-hover table-condensed" style="width:100%;">
|
||||
|
||||
::set total = 0:: <!-- big total -->
|
||||
::set subtotal = 0:: <!-- total per user -->
|
||||
::set contractTotal = 0:: <!-- total per contract -->
|
||||
|
||||
::foreach m orders::
|
||||
|
||||
::set i = repeat.m.index::
|
||||
|
||||
<!-- name change -->
|
||||
::if orders[i-1]==null || m.userName != orders[i-1].userName || m.userName2 != orders[i-1].userName2::
|
||||
|
||||
<tr style="background-color:#666;">
|
||||
<td colspan="9" style="font-size:120%;color:#e7e7e7;">
|
||||
|
||||
::set basket = getBasket(m.userId,place.id,date)::
|
||||
|
||||
<div class="basketNumber" ::cond basket!=null:: >
|
||||
<i class="fa fa-shopping-basket" aria-hidden="true"></i> ::_("Num"):: ::basket.num::
|
||||
</div>
|
||||
|
||||
::m.userName::
|
||||
::if m.userName2!=null::
|
||||
<span class="glyphicon glyphicon-refresh"></span> ::_("alternately with"):: ::m.userName2::
|
||||
::end::
|
||||
::set contractTotal = 0::
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>::_("Contract")::</th>
|
||||
<th>::_("Qty")::</th>
|
||||
<th>::_("Ref")::</th>
|
||||
<th>::_("Product")::</th>
|
||||
<th><a href="#" data-toggle="tooltip" data-placement="top" title="::_("Unit price incl. VAT")::">::_("U.P.")::</a></th>
|
||||
<th>::_("Sub-total")::</th>
|
||||
<th>::_("Fees")::</th>
|
||||
<th>::_("Total")::</th>
|
||||
<th>::_("Paid")::</th>
|
||||
</tr>
|
||||
|
||||
::end::
|
||||
|
||||
<!-- 1 order line -->
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/contractAdmin/view/::m.contractId::">
|
||||
::short(m.contractName,40)::
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
::if(m.quantity==0 && m.canceled)::
|
||||
<span style="color:#AAA">::_("Canceled")::</span>
|
||||
::else::
|
||||
::raw m.smartQt::
|
||||
::end::
|
||||
</td>
|
||||
<td class="ref">
|
||||
$$nullSafe(::m.productRef::)
|
||||
</td>
|
||||
<td>
|
||||
::short(m.productName,40)::
|
||||
</td>
|
||||
<td>
|
||||
::formatNum(m.productPrice):: ::currency()::
|
||||
</td>
|
||||
<td>
|
||||
::formatNum(m.subTotal):: ::currency()::
|
||||
</td>
|
||||
<td>
|
||||
<!-- fees -->
|
||||
::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::
|
||||
::set subtotal = subtotal + m.total::
|
||||
::set contractTotal = contractTotal + m.total::
|
||||
</td>
|
||||
<td>
|
||||
::if m.paid==true::
|
||||
<span style="color:#00AA00;">::_("Paid")::</span>
|
||||
::else::
|
||||
<span style="color:#DD0000;">::_("Not paid")::</span>
|
||||
::end::
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<!-- contract total -->
|
||||
::if ctotal && (orders[i+1]==null || m.contractName != orders[i+1].contractName || m.userName != orders[i+1].userName )::
|
||||
|
||||
<tr style="background:#DDD;">
|
||||
<th colspan="7" class="text-right">Total ::m.contractName::</th>
|
||||
<th>::formatNum(contractTotal):: ::currency()::</th>
|
||||
<th></th>
|
||||
::set contractTotal = 0::
|
||||
</tr>
|
||||
::end::
|
||||
|
||||
<!-- member total -->
|
||||
::if (orders[i+1]==null || m.userName != orders[i+1].userName) ::
|
||||
|
||||
::if subtotal!=0::
|
||||
<tr style="border-top:2px solid #AAA;">
|
||||
<th colspan="7" class="text-right">::_("Total member")::</th>
|
||||
<th>::formatNum(subtotal):: ::currency()::</th>
|
||||
<th></th>
|
||||
::set subtotal = 0::
|
||||
</tr>
|
||||
::end::
|
||||
::end::
|
||||
|
||||
<!-- end orders loop -->
|
||||
::end::
|
||||
|
||||
<!-- big total -->
|
||||
<tr style="background:#CCC;font-size:1.3em;">
|
||||
<th colspan="7" class="text-right">::_("Total of all orders:"):: </th>
|
||||
<th>::formatNum(total):: ::currency()::</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,70 @@
|
||||
::use 'contractadmin/design.mtt'::
|
||||
|
||||
<h3>::_("Summary table per product")::</h3>
|
||||
|
||||
::if distribution!=null::
|
||||
<p>
|
||||
::set date = hDate(distribution.date)::
|
||||
::raw __("Delivery of the <b>::date::</b>",{date:date})::
|
||||
</p>
|
||||
::end::
|
||||
|
||||
<p>
|
||||
::_("Be careful, if the price of the product was modified during the sale, every order of a member is taken into account with the price as it was at the time of the creation of the order")::
|
||||
</p>
|
||||
::set total = 0::
|
||||
<table class="table table-bordered table-hover" style="width:100%;">
|
||||
<tr>
|
||||
<th>::_("Weight/Vol.")::</th>
|
||||
<th>::_("Quantities")::</th>
|
||||
<th>::_("Product")::</th>
|
||||
<th>::_("Reference")::</th>
|
||||
<th>::_("Unit Price incl. VAT")::</th>
|
||||
<th>::_("Total")::</th>
|
||||
</tr>
|
||||
|
||||
::foreach m orders::
|
||||
<tr>
|
||||
<td>
|
||||
::raw m.weightOrVolume::
|
||||
</td>
|
||||
<td>
|
||||
::formatNum(m.quantity)::
|
||||
</td>
|
||||
<td>
|
||||
::m.pname::
|
||||
</td>
|
||||
<td class="ref">
|
||||
$$nullSafe(::m.ref::)
|
||||
</td>
|
||||
<td>
|
||||
::formatNum(m.priceTTC):: ::currency()::
|
||||
</td>
|
||||
<td>
|
||||
::formatNum(m.totalTTC):: ::currency()::
|
||||
::set total = total + m.totalTTC::
|
||||
</td>
|
||||
|
||||
|
||||
</tr>
|
||||
::end::
|
||||
|
||||
<tr style="background:#DDD;">
|
||||
<th colspan="5">Total</th>
|
||||
<th>::formatNum(total):: ::currency()::</th>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
::if distribution!=null::
|
||||
$$export(/contractAdmin/ordersByProduct/::c.id::?csv=1&d=::distribution.id::)
|
||||
<a href="/contractAdmin/ordersByProductList/::c.id::?d=::distribution.id::" class="btn btn-default btn-sm">
|
||||
<span class="glyphicon glyphicon-list"></span> ::_("Order form")::</a>
|
||||
::else::
|
||||
$$export(/contractAdmin/ordersByProduct/::c.id::?csv=1)
|
||||
<a href="/contractAdmin/ordersByProductList/::c.id::" class="btn btn-default btn-sm">
|
||||
<span class="glyphicon glyphicon-list"></span> ::_("Order form")::</a>
|
||||
::end::
|
||||
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,89 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Bon de commande</title>
|
||||
<link href="/css/print.css" rel="stylesheet"/>
|
||||
</head>
|
||||
<body>
|
||||
<table class="table table-bordered table-hover" style="width:100%;">
|
||||
<tr>
|
||||
<td>
|
||||
::if group._image!=null::
|
||||
<img src="::file(group._image)::" style="margin:auto;height:150px;" class="thumbnail" />
|
||||
::end::
|
||||
</td>
|
||||
<td>
|
||||
<h1>::group.name::</h1>
|
||||
::if distribution!=null::
|
||||
<h2>Livraison du <b>::hDate(distribution.date)::</b></h2>
|
||||
::end::
|
||||
<h2>::c.name:: - ::c._vendor.name::</h2>
|
||||
</td>
|
||||
<td>
|
||||
::set cv = c._vendor::
|
||||
::if cv._image!=null::
|
||||
<img src="::file(cv._image)::" class="thumbnail" style="margin:auto;height:150px;" />
|
||||
::end::
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p>
|
||||
::set cc = c._contact::
|
||||
::set cv = c._vendor::
|
||||
<b>Responsable contrat : </b> ::cc.firstName:: ::cc.lastName::, ::cc.email::,
|
||||
::if cc.phone!=null :: ::cc.phone:: ::end::
|
||||
</p>
|
||||
<p>
|
||||
<b>Producteur : </b>::cv.name:: ,
|
||||
::if cv.email!=null :: ::cv.email:: ::end::,
|
||||
::if cv.phone!=null :: ::cv.phone:: ::end::
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<h3>::_("Summary table per product")::</h3>
|
||||
::_("Be careful, if the price of the product was modified during the sale, every order of a member is taken into account with the price as it was at the time of the creation of the order")::
|
||||
</p>
|
||||
::set total = 0::
|
||||
<table class="table table-bordered table-hover" style="width:100%;">
|
||||
<tr style="border-top: 2px solid #AAA;">
|
||||
<th>::_("Weight/Vol.")::</th>
|
||||
<th>::_("Quantities")::</th>
|
||||
<th>::_("Product")::</th>
|
||||
<th>::_("Reference")::</th>
|
||||
<th>::_("Unit price incl. VAT")::</th>
|
||||
<th>::_("Total")::</th>
|
||||
</tr>
|
||||
::foreach m orders::
|
||||
<tr style="border-top: 2px solid #AAA;">
|
||||
<td>
|
||||
::raw m.weightOrVolume::
|
||||
</td>
|
||||
<td>
|
||||
::formatNum(m.quantity)::
|
||||
</td>
|
||||
<td>
|
||||
::m.pname::
|
||||
</td>
|
||||
<td>
|
||||
$$nullSafe(::m.ref::)
|
||||
</td>
|
||||
<td>
|
||||
::formatNum(m.priceTTC):: ::currency()::
|
||||
</td>
|
||||
<td>
|
||||
::formatNum(m.totalTTC):: ::currency()::
|
||||
::set total = total + m.totalTTC::
|
||||
</td>
|
||||
</tr>
|
||||
::end::
|
||||
|
||||
<tr style="background:#DDD;">
|
||||
<th colspan="5">::_("Total")::</th>
|
||||
<th>::formatNum(total):: ::currency()::</th>
|
||||
</tr>
|
||||
</table>
|
||||
<p class="hidden"><i>::_("Push \"Control + P\" to print this page.")::</i></p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,146 @@
|
||||
::use 'design.mtt'::
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="article">
|
||||
|
||||
<div class="text-center">
|
||||
<h3>::_("Orders from the"):: ::hDate(from):: ::_("to"):: ::hDate(to)::</h3>
|
||||
</div>
|
||||
|
||||
::set uri = from.toString().substr(0,10)+"/"+to.toString().substr(0,10)::
|
||||
<div class="text-center">
|
||||
<!--<a href="/distribution/listByDate//csv" class="btn btn-default btn-sm"> <span class="glyphicon glyphicon-list-alt"></span> ::_("CSV Export"):: </a>-->
|
||||
<a href="/contractAdmin/vendorsByTimeFrame/::uri::" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-list"></span> ::_("Totals per supplier")::</a>
|
||||
<a href="/contractAdmin/ordersByTimeFrame/::uri::?ctotal=1" class="btn btn-default btn-sm">::_("Sub-totals per contract")::</a>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
||||
<table class="table table-bordered table-hover table-condensed" style="width:100%;">
|
||||
|
||||
::set total = 0:: <!-- big total -->
|
||||
::set subtotal = 0:: <!-- total per user -->
|
||||
::set contractTotal = 0:: <!-- total per contract -->
|
||||
|
||||
::foreach m orders::
|
||||
|
||||
::set i = repeat.m.index::
|
||||
|
||||
<!-- name change -->
|
||||
::if orders[i-1]==null || m.userName != orders[i-1].userName || m.userName2 != orders[i-1].userName2::
|
||||
|
||||
<tr style="background-color:#666;">
|
||||
<td colspan="9" style="font-size:120%;color:#e7e7e7;">
|
||||
::m.userName::
|
||||
::if m.userName2!=null::
|
||||
<span class="glyphicon glyphicon-refresh"></span> en alternance avec ::m.userName2::
|
||||
::end::
|
||||
::set contractTotal = 0::
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>::_("Contract")::</th>
|
||||
<th>::_("Qty")::</th>
|
||||
<th>::_("Ref")::</th>
|
||||
<th>::_("Product")::</th>
|
||||
<th><a href="#" data-toggle="tooltip" data-placement="top" title="::_("Unit price incl. VAT")::">::_("U.P.")::</a></th>
|
||||
<th>::_("Sub-total")::</th>
|
||||
<th>::_("Fees")::</th>
|
||||
<th>::_("Total")::</th>
|
||||
<th>::_("Paid")::</th>
|
||||
</tr>
|
||||
|
||||
::end::
|
||||
|
||||
<!-- 1 order line -->
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/contractAdmin/view/::m.contractId::">
|
||||
::short(m.contractName,40)::
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
::if(m.quantity==0 && m.canceled)::
|
||||
::_("Canceled")::
|
||||
::else::
|
||||
::raw m.smartQt::
|
||||
::end::
|
||||
</td>
|
||||
<td>
|
||||
$$nullSafe(::m.productRef::)
|
||||
</td>
|
||||
<td>
|
||||
::short(m.productName,40)::
|
||||
</td>
|
||||
<td>
|
||||
::formatNum(m.productPrice):: ::currency()::
|
||||
</td>
|
||||
<td>
|
||||
::formatNum(m.subTotal):: ::currency()::
|
||||
</td>
|
||||
<td>
|
||||
<!-- fees -->
|
||||
::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::
|
||||
::set subtotal = subtotal + m.total::
|
||||
::set contractTotal = contractTotal + m.total::
|
||||
</td>
|
||||
<td>
|
||||
::if m.paid==true::
|
||||
<span style="color:#00AA00;">::_("Paid")::</span>
|
||||
::else::
|
||||
<span style="color:#DD0000;">::_("Not paid")::</span>
|
||||
::end::
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<!-- contract total -->
|
||||
::if ctotal && (orders[i+1]==null || m.contractName != orders[i+1].contractName || m.userName != orders[i+1].userName )::
|
||||
|
||||
<tr style="background:#DDD;">
|
||||
<th colspan="7" class="text-right">Total ::m.contractName::</th>
|
||||
<th>::formatNum(contractTotal):: ::currency()::</th>
|
||||
<th></th>
|
||||
::set contractTotal = 0::
|
||||
</tr>
|
||||
::end::
|
||||
|
||||
<!-- member total -->
|
||||
::if (orders[i+1]==null || m.userName != orders[i+1].userName) ::
|
||||
|
||||
::if subtotal!=0::
|
||||
<tr style="border-top:2px solid #AAA;">
|
||||
<th colspan="7" class="text-right">::_("Total member")::</th>
|
||||
<th>::formatNum(subtotal):: ::currency()::</th>
|
||||
<th></th>
|
||||
::set subtotal = 0::
|
||||
</tr>
|
||||
::end::
|
||||
::end::
|
||||
|
||||
<!-- end orders loop -->
|
||||
::end::
|
||||
|
||||
<!-- big total -->
|
||||
<tr style="background:#CCC;font-size:1.3em;">
|
||||
<th colspan="7" class="text-right">::_("Total of all orders:"):: </th>
|
||||
<th>::formatNum(total):: ::currency()::</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,156 @@
|
||||
::use 'contractadmin/design.mtt'::
|
||||
|
||||
<h3>::_("Products")::</h3>
|
||||
|
||||
<div>
|
||||
<p>
|
||||
$$insert(::_("New product")::,/product/insert/::c.id::)
|
||||
<a href="/product/import/::c.id::" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-list-alt"></span> ::_("Import from Excel/CSV")::</a>
|
||||
|
||||
::if !c._amap.hasTaxonomy()::
|
||||
<a ::cond c.type==1:: href="/product/categorize/::c.id::" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-tag"></span> ::_("Categories")::</a>
|
||||
::end::
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
//enable checked products
|
||||
var enableProducts = function(){
|
||||
var ids = _.getCheckboxesId('form.products');
|
||||
if(ids.length==0){
|
||||
alert("::_("You need to select at least one product to perform this action")::");
|
||||
}else{
|
||||
var l = document.location;
|
||||
l.href = l.protocol +"//"+ l.host + l.pathname + "?enable="+ ids.join("|");
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
//disable checked products
|
||||
var disableProducts = function(){
|
||||
var ids = _.getCheckboxesId('form.products');
|
||||
if(ids.length==0){
|
||||
alert("::_("You need to select at least one product to perform this action")::");
|
||||
}else{
|
||||
var l = document.location;
|
||||
l.href = l.protocol +"//"+ l.host + l.pathname + "?disable="+ ids.join("|");
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
//check input when click row
|
||||
/*var clickRow = function(x){
|
||||
x.children[0].children[0].checked = !x.children[0].children[0].checked;
|
||||
}*/
|
||||
|
||||
//check all
|
||||
var check = function(){
|
||||
var inputs = document.querySelectorAll('form.products input');
|
||||
var value = inputs[0].checked==true;
|
||||
for ( i of inputs ) {
|
||||
i.checked = !value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<form method="GET" class="products">
|
||||
<table class="table table-striped table-hover">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th>::_("Product ID||id or reference of a product")::</th>
|
||||
<th>::_("Name")::</th>
|
||||
<th>::_("Price")::</th>
|
||||
<th></th>
|
||||
::if c.hasStockManagement()::
|
||||
<th>::_("Stock")::</th>
|
||||
::end::
|
||||
|
||||
<th></th>
|
||||
</tr>
|
||||
::foreach p c.getProducts(false)::
|
||||
|
||||
::if p.active==false::
|
||||
::set opacity=0.4::
|
||||
::else::
|
||||
::set opacity=1::
|
||||
::end::
|
||||
<tr style="opacity: ::opacity::" onclick="/*clickRow(this)*/">
|
||||
<td>
|
||||
<input type="checkbox" name="checkbox" value="::p.id::" />
|
||||
</td>
|
||||
<td>
|
||||
<img src="::p.getImage()::" style="width:64px;height:64px;" />
|
||||
</td>
|
||||
<td class="ref">$$nullSafe(::p.ref::)</td>
|
||||
<td>
|
||||
<b>::p.name::</b>
|
||||
|
||||
::if p._unitType!=null && p.qt!=null::
|
||||
::p.qt:: ::unit(p._unitType,false)::
|
||||
::end::
|
||||
|
||||
::if !c._amap.hasTaxonomy()::
|
||||
<div>
|
||||
::foreach c p.getCategories()::
|
||||
<span class='tag' style='background-color: ::c.getColor()::;'>::c.name::</span>
|
||||
::end::
|
||||
</div>
|
||||
::else::
|
||||
<div class="detail">
|
||||
::p.getFullCategorization().join(" / ")::
|
||||
</div>
|
||||
::end::
|
||||
<div>
|
||||
::if p.organic ::<img src="/img/AB.png" style="display:inline-block"/>::end::
|
||||
::if p.variablePrice ::<img src="/img/weight.png" style="display:inline-block"/>::end::
|
||||
</div>
|
||||
</td>
|
||||
<td>::formatNum(p.price):: ::currency()::</td>
|
||||
<td>
|
||||
::if c.hasStockManagement() ::
|
||||
::if p.stock==null::
|
||||
-
|
||||
::else::
|
||||
::if p.stock <= 10::
|
||||
<span style="color:red;font-weight:bold;">
|
||||
::p.stock::
|
||||
</span>
|
||||
::else::
|
||||
::p.stock::
|
||||
::end::
|
||||
::end::
|
||||
::end::
|
||||
</td>
|
||||
<td>
|
||||
<div class="btn-group" role="group">
|
||||
$$edit(::_("Edit")::,/product/edit/::p.id::)
|
||||
<a href="/product/addImage/::p.id::" class="btn btn-default btn-sm"> <span class="glyphicon glyphicon-picture"></span> ::_("Picture")::</a>
|
||||
$$delete(::_("Del.")::,/product/delete/::p.id::?token=::token::)
|
||||
</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
::end::
|
||||
</table>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<p>
|
||||
<div class="btn-group" role="group">
|
||||
<a onclick="check();" class="btn btn-default btn-sm btn-noAntiDoubleClick"> ::_("Check all")::</a>
|
||||
</div>
|
||||
|
||||
<div class="btn-group" role="group">
|
||||
<a class="btn btn-default btn-sm" onclick="enableProducts()"><span class="glyphicon glyphicon-check"></span> ::_("Enable")::</a>
|
||||
<a class="btn btn-default btn-sm" onclick="disableProducts()"><span class="glyphicon glyphicon-unchecked"></span> ::_("Disable")::</a>
|
||||
</div>
|
||||
|
||||
</p>
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,53 @@
|
||||
::use 'contractadmin/design.mtt'::
|
||||
|
||||
::if distributions.length>0::
|
||||
|
||||
<h3>::_("Orders")::</h3>
|
||||
|
||||
<table class="table table-bordered table-hover table-striped">
|
||||
<tr>
|
||||
<th>::_("Date")::</th>
|
||||
<th>::_("Location")::</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
::foreach d distributions::
|
||||
|
||||
::if d.date!=null && d.date.getTime() < Date.now().getTime()::
|
||||
::set style = "opacity:0.5;"::
|
||||
::else::
|
||||
::set style = ""::
|
||||
::end::
|
||||
<tr style="::style::" >
|
||||
|
||||
<td>::hDate(d.date)::</td>
|
||||
<td>::d._place.name::</td>
|
||||
<td>
|
||||
<a href="/contractAdmin/orders/::c.id::?d=::d.id::" class="btn btn-default">
|
||||
<span class="glyphicon glyphicon-list"></span>
|
||||
::_("Orders")::
|
||||
</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
::end::
|
||||
</table>
|
||||
|
||||
::else::
|
||||
<div class="alert alert-danger">
|
||||
|
||||
<b>Aucune distribution prochainement.</b><br/>
|
||||
<a href="/contractAdmin/distributions/::c.id::">::_("Click here to manage deliveries")::</a>
|
||||
</div>
|
||||
::end::
|
||||
|
||||
|
||||
<div>
|
||||
|
||||
<a href="?old=1" class="btn btn-default btn-sm">
|
||||
::_("Old orders")::
|
||||
</a>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,63 @@
|
||||
::use 'contractadmin/design.mtt'::
|
||||
|
||||
<div>
|
||||
<a href="/contractAdmin/stats/::c.id::/?stat=0">
|
||||
::_("Seniority of subscribers")::
|
||||
</a> |
|
||||
<a href="/contractAdmin/stats/::c.id::/?stat=1">
|
||||
::_("Sharing between orders")::
|
||||
</a><br/>
|
||||
|
||||
</div>
|
||||
|
||||
::if stat==0::
|
||||
<h3>
|
||||
::__("Seniority of subscribers of ::contract::",{contract:c.name})::
|
||||
|
||||
</h3>
|
||||
<table class="table" style="width:50%;">
|
||||
<tr>
|
||||
<th>::_("Number")::</th>
|
||||
<th>::_("Year")::</th>
|
||||
</tr>
|
||||
::foreach a anciennete::
|
||||
<tr>
|
||||
<td>::a.cnt::</td>
|
||||
<td>::a.uyear::</td>
|
||||
</tr>
|
||||
::end::
|
||||
</table>
|
||||
::end::
|
||||
|
||||
::if stat==1::
|
||||
<h3>::_("Sharing between orders of"):: "::c.name::"</h3>
|
||||
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>::_("Quantity")::</th>
|
||||
<th>::_("Product")::</th>
|
||||
<th>::_("Total price")::</th>
|
||||
<th>::_("% of orders")::</th>
|
||||
</tr>
|
||||
::foreach r repartition::
|
||||
<tr>
|
||||
<td>::r.quantity::</td>
|
||||
<td>::r.name::</td>
|
||||
<td>::r.quantity*r.price:: ::currency()::</td>
|
||||
<td>::r.percent:: %</td>
|
||||
|
||||
</tr>
|
||||
|
||||
::end::
|
||||
<tr>
|
||||
<th colspan="2">Total: ::totalQuantity:: ::_("products")::</th>
|
||||
|
||||
<th>::totalPrice:: ::currency()::</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
$$export(/contractAdmin/stats/::c.id::?csv=1&stat=1)
|
||||
::end::
|
||||
::end::
|
||||
@@ -0,0 +1,27 @@
|
||||
::use 'contractadmin/design.mtt'::
|
||||
|
||||
|
||||
<h3>::_("Products")::</h3>
|
||||
|
||||
<table class="table">
|
||||
::foreach p c.getProducts()::
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
<img src="::p.getImage()::" style="width:64px;height:64px;" />
|
||||
|
||||
</td>
|
||||
<td>$$nullSafe(::p.ref::)</td>
|
||||
<td>::p.name::</td>
|
||||
<td>::p.stock::</td>
|
||||
|
||||
<td>
|
||||
$$edit(modifier,/product/edit/::p.id::)
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
::end::
|
||||
</table>
|
||||
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,61 @@
|
||||
::use 'design.mtt'::
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="article">
|
||||
|
||||
<h2>::_("Global view of orders - delivery of"):: ::hDate(date)::</h2>
|
||||
<hr/>
|
||||
|
||||
::foreach o orders::
|
||||
|
||||
::set total = 0::
|
||||
<table class="table table-bordered table-hover table-striped" style="width:100%;">
|
||||
<tr>
|
||||
<th colspan="5">
|
||||
<!--<div class="pull-right">$$export(::"/contractAdmin/ordersByProduct/"+o.contract.id+"?csv=1&d="+o.distrib.id::)</div>-->
|
||||
<h4>::o.contract.name:: - ::o.contract._vendor.name::</h4>
|
||||
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>::_("Quantities")::</th>
|
||||
<th>::_("Product")::</th>
|
||||
<th>::_("Reference")::</th>
|
||||
<th>::_("Unit price incl. VAT")::</th>
|
||||
<th>::_("Total")::</th>
|
||||
</tr>
|
||||
|
||||
::foreach m o.orders::
|
||||
<tr>
|
||||
<td class="col-md-1">
|
||||
::m.quantity::
|
||||
</td>
|
||||
<td class="col-md-5">
|
||||
::m.pname::
|
||||
</td>
|
||||
<td class="col-md-3">
|
||||
$$nullSafe(::m.ref::)
|
||||
</td>
|
||||
<td class="col-md-2">
|
||||
::formatNum(m.priceTTC):: ::currency()::
|
||||
</td>
|
||||
<td class="col-md-2">
|
||||
::formatNum(m.totalTTC):: ::currency()::
|
||||
::set total = total + m.totalTTC::
|
||||
</td>
|
||||
</tr>
|
||||
::end::
|
||||
|
||||
<tr style="background:#DDD;">
|
||||
<th colspan="4">Total</th>
|
||||
<th>::formatNum(total):: ::currency()::</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
::end::
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,68 @@
|
||||
::use 'design.mtt'::
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="article">
|
||||
|
||||
<h2>::_("Global view of orders - from"):: ::hDate(from):: ::_("to"):: ::hDate(to)::</h2>
|
||||
|
||||
<div class="text-center">
|
||||
$$export(/contractAdmin/vendorsByTimeFrame/::from.toString().substr(0,10)::/::to.toString().substr(0,10)::?csv=1)
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
::foreach o orders::
|
||||
|
||||
::set total = 0::
|
||||
<table class="table table-bordered table-hover table-striped" style="width:100%;">
|
||||
<tr>
|
||||
<th colspan="6">
|
||||
<!--<div class="pull-right">$$export(::"/contractAdmin/ordersByProduct/"+o.contract.id+"?csv=1&d="+o.distrib.id::)</div>-->
|
||||
<h4>::o.contract.name:: - ::o.contract._vendor.name::</h4>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>::_("Quantities")::</th>
|
||||
<th>::_("Product")::</th>
|
||||
<th>::_("Reference")::</th>
|
||||
<th>::_("Unit price incl. VAT")::</th>
|
||||
<th>::_("Total HT")::</th>
|
||||
<th>::_("Total TTC")::</th>
|
||||
</tr>
|
||||
|
||||
::foreach m o.orders::
|
||||
<tr>
|
||||
<td class="col-md-1">
|
||||
::formatNum(m.quantity)::
|
||||
</td>
|
||||
<td class="col-md-4">
|
||||
::m.pname::
|
||||
</td>
|
||||
<td class="col-md-1 ref">
|
||||
$$nullSafe(::m.ref::)
|
||||
</td>
|
||||
<td class="col-md-2">
|
||||
::formatNum(m.priceTTC):: ::currency()::
|
||||
</td>
|
||||
<td class="col-md-2">
|
||||
::formatNum(m.totalHT):: ::currency()::
|
||||
</td>
|
||||
<td class="col-md-2">
|
||||
::formatNum(m.totalTTC):: ::currency()::
|
||||
</td>
|
||||
::set total = total + m.totalTTC::
|
||||
</tr>
|
||||
::end::
|
||||
|
||||
<tr style="background:#DDD;">
|
||||
<th colspan="5">::_("Total")::</th>
|
||||
<th>::formatNum(total):: ::currency()::</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
::end::
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,70 @@
|
||||
::use 'contractadmin/design.mtt'::
|
||||
|
||||
<h3>::_("Summary")::</h3>
|
||||
|
||||
<table class="table table-bordered" style="width:400px;">
|
||||
<tr>
|
||||
<td>
|
||||
::_("Contract type")::
|
||||
</td>
|
||||
<td>
|
||||
::if contract.type==0::
|
||||
::_("CSA Contract")::
|
||||
::else::
|
||||
::_("Variable order contract")::
|
||||
::end::
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>::_("Start date")::</td>
|
||||
<td>::hDate(contract.startDate)::</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>::_("End date")::</td>
|
||||
<td>::hDate(contract.endDate)::</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div>
|
||||
$$edit(::_("Edit")::,/contract/edit/::c.id::)
|
||||
|
||||
::if user.isAmapManager()::
|
||||
$$edit(::_("Duplicate")::,/contractAdmin/duplicate/::c.id::)
|
||||
::end::
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
||||
<h4>::_("Farmer")::</h4>
|
||||
<table class="table table-bordered" style="width:400px;">
|
||||
<tr>
|
||||
<td>::_("Name")::</td>
|
||||
<td><b>::contract._vendor.name::</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>::_("Email")::</td>
|
||||
<td>$$nullSafe(::contract._vendor.email::)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>::_("Phone")::</td>
|
||||
<td>$$nullSafe(::contract._vendor.phone::)</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<h4><a href="/contractAdmin/products/::c.id::">::_("Products")::</a></h4>
|
||||
<div style="max-height:400px;overflow:auto;">
|
||||
<table class="table table-bordered" style="width:400px;">
|
||||
::foreach p contract.getProducts(true)::
|
||||
<tr>
|
||||
<td><img src="::p.getImage()::" style="width:32px;height:32px;" /> </td>
|
||||
<td>::p.getName()::</td>
|
||||
<td>::formatNum(p.price):: ::currency()::</td>
|
||||
</tr>
|
||||
::end::
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,194 @@
|
||||
::use 'design.mtt'::
|
||||
|
||||
<div id="content" class="col-md-8">
|
||||
|
||||
<div class="row">
|
||||
<div id="content" class="col-md-12">
|
||||
<div class="alert alert-danger">
|
||||
<span class="glyphicon glyphicon-exclamation-sign"></span>
|
||||
Hou là là !
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div id="content" class="col-md-12">
|
||||
|
||||
<div class="alert alert-success">
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
Todo bem
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="article">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<h3>Boutons large</h3>
|
||||
<button type="button" class="btn btn-lg btn-noAntiDoubleClick btn-default">noAntiDoubleClick</button>
|
||||
<button type="button" class="btn btn-lg btn-default">Default</button>
|
||||
<button type="button" class="btn btn-lg btn-primary">Primary</button>
|
||||
<button type="button" class="btn btn-lg btn-success">Success</button>
|
||||
<button type="button" class="btn btn-lg btn-info">Info</button>
|
||||
<button type="button" class="btn btn-lg btn-warning">Warning</button>
|
||||
<button type="button" class="btn btn-lg btn-danger">Danger</button>
|
||||
<button type="button" class="btn btn-lg btn-link">Link</button>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<h3>Boutons default</h3>
|
||||
<button type="button" class="btn btn-default">Default</button>
|
||||
|
||||
<!-- Provides extra visual weight and identifies the primary action in a set of buttons -->
|
||||
<button type="button" class="btn btn-primary">Primary</button>
|
||||
|
||||
<!-- Indicates a successful or positive action -->
|
||||
<button type="button" class="btn btn-success">Success</button>
|
||||
|
||||
<!-- Contextual button for informational alert messages -->
|
||||
<button type="button" class="btn btn-info">Info</button>
|
||||
|
||||
<!-- Indicates caution should be taken with this action -->
|
||||
<button type="button" class="btn btn-warning">Warning</button>
|
||||
|
||||
<!-- Indicates a dangerous or potentially negative action -->
|
||||
<button type="button" class="btn btn-danger">Danger</button>
|
||||
|
||||
<!-- Deemphasize a button by making it look like a link while maintaining button behavior -->
|
||||
<button type="button" class="btn btn-link">Link</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-6">
|
||||
<h3>Boutons small</h3>
|
||||
<button type="button" class="btn btn-sm btn-default">Default</button>
|
||||
<button type="button" class="btn btn-sm btn-primary">Primary</button>
|
||||
<button type="button" class="btn btn-sm btn-success">Success</button>
|
||||
<button type="button" class="btn btn-sm btn-info">Info</button>
|
||||
<button type="button" class="btn btn-sm btn-warning">Warning</button>
|
||||
<button type="button" class="btn btn-sm btn-danger">Danger</button>
|
||||
<button type="button" class="btn btn-sm btn-link">Link</button>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<h3>Boutons XS</h3>
|
||||
<button type="button" class="btn btn-xs btn-default">Default</button>
|
||||
<button type="button" class="btn btn-xs btn-primary">Primary</button>
|
||||
<button type="button" class="btn btn-xs btn-success">Success</button>
|
||||
<button type="button" class="btn btn-xs btn-info">Info</button>
|
||||
<button type="button" class="btn btn-xs btn-warning">Warning</button>
|
||||
<button type="button" class="btn btn-xs btn-danger">Danger</button>
|
||||
<button type="button" class="btn btn-xs btn-link">Link</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-6">
|
||||
<h1>H1 Title</h1>
|
||||
<h2>H2 Title</h2>
|
||||
<h3>H3 Title</h3>
|
||||
<h4>H4 Title</h4>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="panel panel-success">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">Panel title</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p>
|
||||
Type : <b>Gratuit jusqu'à 20 foyers</b> ( actuellement 1 foyers dans votre groupe)
|
||||
</p>
|
||||
<p>
|
||||
<button type="button" class="btn btn-primary"><span class="glyphicon glyphicon-chevron-right"></span> Primary</button>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="popover fade bottom in" role="tooltip" id="popover63647" style="top: 531px;left: 50%;display: block;">
|
||||
<div class="arrow" style="left: 50%;"></div>
|
||||
<h3 class="popover-title">Visite guidée du coordinateur <div class="pull-right">7/21</div></h3>
|
||||
<div class="popover-content">
|
||||
<p>Ici se trouve la liste des <b>contrats</b>.
|
||||
Ils comportent une date de début, une date de fin, et représentent votre relation avec un producteur. <br />
|
||||
</p>
|
||||
<p>
|
||||
C'est ici que vous pourrez gérer :
|
||||
</p>
|
||||
<p>
|
||||
<ul>
|
||||
<li>la liste de produits de ce producteur</li>
|
||||
<li>les commandes des adhérents pour ce producteur</li>
|
||||
<li>planifier les distributions</li>
|
||||
</ul>
|
||||
</p>
|
||||
<div class="footer">
|
||||
|
||||
<div class="pull-right">
|
||||
<p><a class="btn btn-default btn-sm"><span class="glyphicon glyphicon-chevron-right"></span> Suivant</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="block" >
|
||||
|
||||
|
||||
Le Lorem Ipsum est simplement du <strong>faux texte</strong> employé dans <a href="/">la composition</a>
|
||||
et la mise en page avant impression. Le Lorem Ipsum est le faux texte standard de l'imprimerie depuis les années 1500,
|
||||
quand un peintre anonyme assembla ensemble des morceaux de texte pour réaliser un livre spécimen de polices de texte.
|
||||
Il n'a pas fait que survivre cinq siècles, mais s'est aussi adapté à la bureautique informatique, sans que son contenu n'en soit modifié.
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="block">
|
||||
<h3>Permanences</h3>
|
||||
|
||||
<p>N'oubliez pas de vous inscrire pour aider lors des livraisons</p>
|
||||
|
||||
<ul>
|
||||
<li>Liste 1</li>
|
||||
<li>Liste 2</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-danger">
|
||||
<p>
|
||||
Attention, vous n'avez défini aucun mot de passe pour votre compte !
|
||||
</p>
|
||||
<a href="/user/definePassword" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-chevron-right"></span> Définir un mot de passe</a>
|
||||
|
||||
</div>
|
||||
|
||||
$$today(Mercredi,15,Décembre,19,90,::user._amap._mainPlace::)
|
||||
|
||||
$$date(Mercredi,15,Décembre,19,::user._amap._mainPlace::)
|
||||
|
||||
|
||||
</div>
|
||||
::end::
|
||||
@@ -0,0 +1,269 @@
|
||||
::use 'base.mtt'::
|
||||
|
||||
::if getParam('__redirect')!=null::
|
||||
<!-- need to login to go to this page-->
|
||||
<script>$(function(){
|
||||
_.loginBox('::raw getParam("__redirect")::');
|
||||
});</script>
|
||||
::end::
|
||||
|
||||
<div class="row header" style="margin-top:10px;">
|
||||
<div class="col-md-8">
|
||||
::set groupName = getCurrentGroup()::
|
||||
::if groupName!=null && noGroup!=true::
|
||||
<h1>::groupName::</h1>
|
||||
::else::
|
||||
<div style="margin-bottom:22px;" >
|
||||
<a href="http://www.cagette.net" target="_blank">
|
||||
<img src="/img/logo3.png" alt="::NAME::" />
|
||||
</a>
|
||||
</div>
|
||||
::end::
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 accountBlock">
|
||||
::if user != null::
|
||||
<div class="dropdown pull-right text-right userName" style="margin-top:16px;">
|
||||
|
||||
<a class="" style="margin-right:16px;" href="/user/choose?show=1">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span>::_("Change group")::
|
||||
</a>
|
||||
|
||||
<a class="dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown">
|
||||
<span class="glyphicon glyphicon-user"></span>
|
||||
::user.getName()::
|
||||
::if user.firstName2!=null::
|
||||
::_("et"):: ::user.lastName2:: ::user.firstName2::
|
||||
::end::
|
||||
</a>
|
||||
|
||||
<ul class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenu1">
|
||||
<li><a href="/user/logout"><span class="glyphicon glyphicon-log-out"></span> ::_("Log out")::</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
::else::
|
||||
<div class="pull-right text-right">
|
||||
<a href="/user/login" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-user"></span> ::_("Log in")::</a>
|
||||
<a class="btn btn-default btn-sm" href="/group/map"><span class="glyphicon glyphicon-search"></span> ::_("Look for another group")::</a>
|
||||
</div>
|
||||
::end::
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
::if user != null && noGroup!=true::
|
||||
|
||||
<nav class="navbar navbar-default" ::cond user.getAmap()!=null::>
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#cagette-navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="collapse navbar-collapse" id="cagette-navbar">
|
||||
|
||||
<ul class="nav navbar-nav navbar-left">
|
||||
<li ::attr class if(category=="home") 'active' ::><a href="/">::_("Home")::</a></li>
|
||||
<li ::attr class if(category=="contract" ) 'active' ::><a href="/contract">::_("My account")::</a></li>
|
||||
<li ::attr class if(category=="amap") 'active' ::><a href="/amap">::_("Farmers")::</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li id="member" ::attr class if(category=="members") 'active' ::>
|
||||
<a href="/member" ::cond user.canAccessMembership()::>::_("Members")::</a></li>
|
||||
<li id="contractadmin" ::attr class if(category=="contractadmin") 'active' ::>
|
||||
<a href="/contractAdmin" ::cond user.isContractManager(null)::>::_("Contracts")::</a></li>
|
||||
<li id="messages" ::attr class if(category=="messages") 'active' ::>
|
||||
<a href="/messages" ::cond user.canAccessMessages()::>::_("Messaging")::</a></li>
|
||||
<li id="amapadmin" ::attr class if(category=="amapadmin") 'active' ::>
|
||||
<a href="/amapadmin" ::cond user.isAmapManager()::>::_("Group")::</a></li>
|
||||
<li ::cond user.isAdmin():: ::attr class if(category=="admin") 'active' ::>
|
||||
<a href="/admin" >::_("Admin")::</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
::end::
|
||||
|
||||
<!-- Notifications -->
|
||||
<div class="row">
|
||||
<div id="content" class="col-md-12">
|
||||
::foreach notification getMessages()::
|
||||
<div class="alert ::if notification.error:: alert-danger ::else:: alert-success ::end::" ::cond notification::>
|
||||
::if notification.error::
|
||||
<span class="glyphicon glyphicon-exclamation-sign"></span>
|
||||
::else::
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
::end::
|
||||
|
||||
::raw notification.text::
|
||||
</div>
|
||||
::end::
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- extra notification block for plugins -->
|
||||
::if extraNotifBlock!=null::
|
||||
::raw extraNotifBlock::
|
||||
::end::
|
||||
|
||||
<div class="row">
|
||||
::raw __content__::
|
||||
</div>
|
||||
|
||||
<!--<div class="row">
|
||||
<div class="col-md-12 alert-danger text-center" style="border-radius: 8px;margin:8px 0;padding:8px 0;">
|
||||
<span class="glyphicon glyphicon-cog"></span>
|
||||
Attention : Cagette.net sera indisponible le <b>mardi 7 août de 9:00 à 11:00</b>.
|
||||
<br/>
|
||||
Nous déménageons sur un nouveau serveur pour plus de rapidité et de fiabilité.
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
<div class="row" id="footer">
|
||||
|
||||
<div class="col-md-9" >
|
||||
<a href="http://www.cagette.net" target="_blank">
|
||||
<img src="/img/logo.png" alt="::_("Cagette.net")::"/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3" >
|
||||
::_("HELP")::
|
||||
<ul>
|
||||
<li>
|
||||
<a href="http://www.cagette.net/wiki" target="_blank">::_("Documentation")::</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://www.cagette.pro" target="_blank">Formations pour producteurs</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
::if (user!=null && user.isAmapManager()):: <a href="https://cagette.uservoice.com" target="_blank">::_("Propose features")::</a> ::end::
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<!--<p style="position: absolute;display: block;top: 96px;width: 700px;">
|
||||
<b>::raw _("Vous êtes producteur ?")::</b>
|
||||
::raw _("Découvrez nos formations gratuites pour utiliser <b>Cagette Pro</b> ")::
|
||||
<a href="http://alilo.fr/formations-producteurs" target="_blank" class="btn btn-xs btn-info">C'est parti !</a>
|
||||
</p>-->
|
||||
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<div class="col-md-3" >
|
||||
::_("FOLLOW US")::
|
||||
<ul class="cagsocialmedia">
|
||||
<li class="cagfb">
|
||||
<a title="Facebook" href="https://www.facebook.com/cagette" target="_blank"> <i class="fa fa-facebook"></i></a>
|
||||
</li>
|
||||
<li class="cagtwitter">
|
||||
<a title="Twitter" href="https://twitter.com/Cagettenet" target="_blank"> <i class="fa fa-twitter"></i></a>
|
||||
</li>
|
||||
<li class="cagyoutube">
|
||||
<a title="Youtube" href="https://www.youtube.com/channel/UC3cvGxAUrbN9oSZmr1oZEaw" target="_blank"> <i class="fa fa-youtube"></i></a>
|
||||
</li>
|
||||
<li style="background-color:#333;">
|
||||
<a title="Github" href="https://github.com/bablukid/cagette" target="_blank"> <i class="fa fa-github"></i></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
-->
|
||||
|
||||
<!--
|
||||
<div class="col-md-3">
|
||||
::_("CONTACT US")::
|
||||
<ul>
|
||||
<li>
|
||||
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
|
||||
<input type="hidden" name="cmd" value="_s-xclick"/>
|
||||
<input type="hidden" name="hosted_button_id" value="S9KT7FQS7P622"/>
|
||||
<input type="image" src="https://www.paypalobjects.com/fr_FR/FR/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal, le réflexe sécurité pour payer en ligne"/>
|
||||
<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1"/>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
-->
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row" id="subfooter">
|
||||
<!--
|
||||
::raw _("Cagette.net is made by <a href='https://www.alilo.fr' target='_blank'><img src='/img/alilo-trans-black.png' /></a>")::<br/>
|
||||
-->
|
||||
<span>version ::VERSION::-::getPlatform()::</span>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- SQL LOG -->
|
||||
<table class="sqlLog table table-bordered" ::cond sqlLog::>
|
||||
::foreach r sqlLog::
|
||||
<tr ::attr class if(r.bad) 'badSql'::>
|
||||
<td>::r.t::ms</td>
|
||||
<td>::r.length::</td>
|
||||
<td><a href="#" onclick="javascript:alert('::r.explain::');return false;">Exp</a></td>
|
||||
<td><a href="#" onclick="javascript:alert('::r.stack::');return false;">Stack</a></td>
|
||||
<td>::r.sql::</td>
|
||||
</tr>
|
||||
::end::
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
::if (false && user!=null && user.isAmapManager())::
|
||||
<script>
|
||||
// Include the UserVoice JavaScript SDK (only needed once on a page)
|
||||
UserVoice=window.UserVoice||[];(function(){var uv=document.createElement('script');uv.type='text/javascript';uv.async=true;uv.src='//widget.uservoice.com/sayZ1eIZLfSZUa3IwslHCw.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(uv,s)})();
|
||||
|
||||
//
|
||||
// UserVoice Javascript SDK developer documentation:
|
||||
// https://www.uservoice.com/o/javascript-sdk
|
||||
//
|
||||
|
||||
// Set colors
|
||||
UserVoice.push(['set', {
|
||||
accent_color: '#6aba2e',
|
||||
trigger_color: 'white',
|
||||
trigger_background_color: '#e2753a'
|
||||
}]);
|
||||
|
||||
// Identify the user and pass traits
|
||||
// To enable, replace sample data with actual user traits and uncomment the line
|
||||
UserVoice.push(['identify', {
|
||||
//email: 'john.doe@example.com', // User’s email address
|
||||
//name: 'John Doe', // User’s real name
|
||||
//created_at: 1364406966, // Unix timestamp for the date the user signed up
|
||||
//id: 123, // Optional: Unique id of the user (if set, this should not change)
|
||||
//type: 'Owner', // Optional: segment your users by type
|
||||
//account: {
|
||||
// id: 123, // Optional: associate multiple users with a single account
|
||||
// name: 'Acme, Co.', // Account name
|
||||
// created_at: 1364406966, // Unix timestamp for the date the account was created
|
||||
// monthly_rate: 9.99, // Decimal; monthly rate of the account
|
||||
// ltv: 1495.00, // Decimal; lifetime value of the account
|
||||
// plan: 'Enhanced' // Plan name for the account
|
||||
//}
|
||||
}]);
|
||||
|
||||
// Add default trigger to the bottom-right corner of the window:
|
||||
UserVoice.push(['addTrigger', { mode: 'smartvote', trigger_position: 'bottom-right' }]);
|
||||
|
||||
// Or, use your own custom trigger:
|
||||
//UserVoice.push(['addTrigger', '#id', { mode: 'smartvote' }]);
|
||||
|
||||
// Autoprompt for Satisfaction and SmartVote (only displayed under certain conditions)
|
||||
UserVoice.push(['autoprompt', {}]);
|
||||
</script>
|
||||
::end::
|
||||
::end::
|
||||
@@ -0,0 +1,156 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>::_("Attendance sheet")::</title>
|
||||
<link href="/css/print.css" rel="stylesheet"/>
|
||||
</head>
|
||||
<body>
|
||||
<h2>
|
||||
::contract._amap.name:: -
|
||||
::__("Distribution of the ::date::, from ::from:: to ::to::",{date:dDate(distrib.date),from:hHour(distrib.date),to:hHour(distrib.end)})::
|
||||
</h2>
|
||||
<h2>
|
||||
::distrib._contract.name:: - ::distrib._contract._vendor.name::
|
||||
</h2>
|
||||
|
||||
<p>
|
||||
<span class="glyphicon glyphicon-map-marker"></span><b>::_("Place"):: : </b>
|
||||
::distrib._place.toString()::, ::distrib._place.getAddress()::
|
||||
</p>
|
||||
<p>
|
||||
::set c = contract._contact::
|
||||
::set v = contract._vendor::
|
||||
<b>::_("Contact in charge of the contract") :</b> ::c.firstName:: ::c.lastName::, ::c.email::, ::c.phone::
|
||||
</p>
|
||||
<p>
|
||||
<b>::_("Farmer"):: : </b>
|
||||
::v.name:: ,
|
||||
::if v.email!=null :: ::v.email:: ::end::,
|
||||
::if v.phone!=null :: ::v.phone:: ::end::
|
||||
</p>
|
||||
<p>
|
||||
<b>::_("Members on duty"):: : </b>
|
||||
::if distrib._distributor1!=null:: ::distrib._distributor1.getName()::, ::end::
|
||||
::if distrib._distributor2!=null:: ::distrib._distributor2.getName()::, ::end::
|
||||
::if distrib._distributor3!=null:: ::distrib._distributor3.getName()::, ::end::
|
||||
::if distrib._distributor4!=null:: ::distrib._distributor4.getName():: ::end::
|
||||
</p>
|
||||
|
||||
<p>::raw nl2br(distrib._contract._amap.txtDistrib)::</p>
|
||||
|
||||
<table class="table table-bordered table-hover" style="width:100%;">
|
||||
::set total = 0:: <!-- big total -->
|
||||
::set subtotal = 0:: <!-- total per user -->
|
||||
|
||||
::foreach m orders::
|
||||
|
||||
::set i = repeat.m.index::
|
||||
|
||||
<!-- name change -->
|
||||
::if orders[i-1]==null || m.userName != orders[i-1].userName || m.userName2 != orders[i-1].userName2::
|
||||
|
||||
<tr class="name">
|
||||
<td colspan="8">
|
||||
<span style="font-size:1.3em;">
|
||||
::set basket = getBasket(m.userId,distrib._place.id,distrib.date)::
|
||||
<span ::cond basket!=null::>N°::basket.num:: - </span>
|
||||
|
||||
::m.userName::
|
||||
</span>
|
||||
|
||||
::set u = getUser(m.userId)::
|
||||
|
||||
::if u !=null && u.phone!=null::
|
||||
- Tél. $$nullSafe(::u.phone::)
|
||||
::end::
|
||||
|
||||
::if m.userName2 != null::
|
||||
::_("alternately with")::
|
||||
<span style="font-size:1.3em;">
|
||||
::m.userName2::
|
||||
</span>
|
||||
|
||||
::set u = getUser(m.userId2):
|
||||
::if u !=null::
|
||||
- Tél. $$nullSafe(::u.phone::)
|
||||
::end::
|
||||
::end::
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>::_("Qty")::</th>
|
||||
<th>::_("Ref")::</th>
|
||||
<th>::_("Product")::</th>
|
||||
<th>::_("U.P.")::</th>
|
||||
<th>::_("Sub-total")::</th>
|
||||
<th>::_("Fees")::</th>
|
||||
<th>::_("Total")::</th>
|
||||
<th>::_("Signature")::</th>
|
||||
</tr>
|
||||
::end::
|
||||
|
||||
<!-- 1 order line -->
|
||||
<tr class="order">
|
||||
<td>
|
||||
::if(m.quantity==0 && m.canceled)::
|
||||
::_("Canceled")::
|
||||
::else::
|
||||
::raw m.smartQt::
|
||||
::end::
|
||||
</td>
|
||||
<td>
|
||||
$$nullSafe(::m.productRef::)
|
||||
</td>
|
||||
<td>
|
||||
::m.productName::
|
||||
</td>
|
||||
<td>
|
||||
::formatNum(m.productPrice):: ::currency()::
|
||||
</td>
|
||||
<td>
|
||||
::formatNum(m.subTotal):: ::currency()::
|
||||
</td>
|
||||
<td>
|
||||
<!-- frais -->
|
||||
::if m.percentageValue!=null::
|
||||
::formatNum(m.fees):: ::currency()::
|
||||
::end::
|
||||
</td>
|
||||
<td>
|
||||
<!-- total -->
|
||||
::formatNum(m.total):: ::currency()::
|
||||
::set total = total + m.total::
|
||||
::set subtotal = subtotal + m.total::
|
||||
</td>
|
||||
<td style="width:20%;">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- member total -->
|
||||
::if (orders[i+1]==null || m.userName != orders[i+1].userName || m.userName2 != orders[i+1].userName2) ::
|
||||
::if subtotal!=0::
|
||||
<tr>
|
||||
<td colspan="5"></td>
|
||||
<td class="total text-right">::_("TOTAL")::</td>
|
||||
<td class="total">::formatNum(subtotal):: ::currency()::</td>
|
||||
<td></td>
|
||||
::set subtotal = 0::
|
||||
</tr>
|
||||
::end::
|
||||
::end::
|
||||
::end::
|
||||
|
||||
<!-- big total -->
|
||||
<tr style="font-size:1.3em;">
|
||||
<td class="text-right">::_("Total order:"):: </td>
|
||||
<td>::formatNum(total):: ::currency()::</td>
|
||||
<td colspan="6"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<p class="hidden"><i>::_("Push on \"Control + P\" to print this page.")::</i></p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,252 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>::_("Attendance sheet")::</title>
|
||||
<link href="/css/print.css" rel="stylesheet"/>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>::user._amap.name::</h1>
|
||||
<h2>Livraison du ::hDate(date)::</h2>
|
||||
|
||||
<table style="width:100%;">
|
||||
::set name = ""::
|
||||
::set name2 = ""::
|
||||
::set total = 0::
|
||||
::set productNum = 0::
|
||||
<tr>
|
||||
<th>::_("Name")::</th>
|
||||
<th>::_("Contact details")::</th>
|
||||
<th>::_("Qty")::</th>
|
||||
<th>::_("Product")::</th>
|
||||
<th>::_("U.P.")::</th>
|
||||
<th>::_("Fees")::</th>
|
||||
<th>::_("Total")::</th>
|
||||
<th>::_("Signature")::</th>
|
||||
</tr>
|
||||
|
||||
::foreach m orders::
|
||||
|
||||
|
||||
::if m.userName != name || m.userName2 != name2::
|
||||
::set class="name"::
|
||||
::else::
|
||||
::set class=""::
|
||||
::end::
|
||||
<tr class="::class::">
|
||||
<td>
|
||||
::if m.userName != name || m.userName2 != name2::
|
||||
|
||||
::set basket = getBasket(m.userId,place.id,date)::
|
||||
<span ::cond basket!=null::>::_("Num"):: ::basket.num:: - </span>
|
||||
|
||||
<b>::m.userName::</b>
|
||||
::if m.userName2 != null::
|
||||
<br />::_("alternately with"):: <b>::m.userName2::</b>
|
||||
::end::
|
||||
::set total = 0::
|
||||
::set productNum = 0::
|
||||
::end::
|
||||
</td>
|
||||
<td>
|
||||
::if m.userName != name || m.userName2 != name2::
|
||||
::set u = getUser(m.userId):
|
||||
::if u !=null::
|
||||
$$nullSafe(::u.phone::)
|
||||
::end::
|
||||
|
||||
::if m.userName2 != null::
|
||||
::set u = getUser(m.userId2):
|
||||
::if u !=null::
|
||||
<br />$$nullSafe(::u.phone::)
|
||||
::end::
|
||||
::end::
|
||||
::end::
|
||||
|
||||
</td>
|
||||
::set name = m.userName ::
|
||||
::set name2 = m.userName2 ::
|
||||
<td>
|
||||
::if(m.quantity==0 && m.canceled)::
|
||||
::_("Canceled")::
|
||||
::else::
|
||||
::raw m.smartQt::
|
||||
::end::
|
||||
|
||||
::set productNum = productNum+m.quantity::
|
||||
</td>
|
||||
<td>
|
||||
::m.productName::
|
||||
</td>
|
||||
<td>
|
||||
::formatNum(m.productPrice):: ::currency()::
|
||||
</td>
|
||||
<td>
|
||||
::if m.fees!=null::
|
||||
::formatNum(m.fees):: ::currency()::
|
||||
::end::
|
||||
</td>
|
||||
<td>
|
||||
::formatNum(m.total):: ::currency()::
|
||||
::set total = total + m.total::
|
||||
</td>
|
||||
|
||||
<td style="width:20%;"></td>
|
||||
</tr>
|
||||
|
||||
<!--TOTAL-->
|
||||
::set next = orders[repeat.m.index+1]::
|
||||
::if next==null || next.userName!=name || next.userName2!=name2::
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="total">::formatNum(productNum)::</td>
|
||||
<td class="total" colspan="2"></td>
|
||||
<td class="total">::_("TOTAL")::</td>
|
||||
<td class="total">::formatNum(total):: ::currency()::</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<!-- PAIEMENTS -->
|
||||
<tr ::cond user._amap.hasPayments()::>
|
||||
|
||||
<!-- PAYMENT CHECK FOR SHOP MODE -->
|
||||
|
||||
::if (user._amap.hasShopMode())::
|
||||
|
||||
|
||||
<td></td>
|
||||
<th>::_("Payment:"):: </th>
|
||||
<td colspan="6">
|
||||
<table style="width:100%;border:1px solid #CCC;">
|
||||
::if(basket!=null)::
|
||||
::set tpaid=0::
|
||||
::set op = basket.getOrderOperation(false)::
|
||||
::if op!=null::
|
||||
::foreach p op.getRelatedPayments()::
|
||||
<tr>
|
||||
<td style="min-width:30px;">
|
||||
::if(p.pending==true)::
|
||||
<img src="/img/tick_no.png"/>
|
||||
::else::
|
||||
<img src="/img/tick_ok_me.png"/>
|
||||
::end::
|
||||
</td>
|
||||
<td>
|
||||
::formatNum(p.amount):: ::currency()::
|
||||
::set tpaid = p.amount+tpaid::
|
||||
</td>
|
||||
<td>
|
||||
::p.name::
|
||||
</td>
|
||||
</tr>
|
||||
::end::
|
||||
::end::
|
||||
|
||||
<!-- bug : 2 vars are the same but == doesnt work -->
|
||||
::set total = numClean(total)::
|
||||
::set tpaid = numClean(tpaid)::
|
||||
|
||||
::if(total!=tpaid)::
|
||||
|
||||
<tr style="background-color:#EEE;">
|
||||
<td><img src="/img/tick_no.png"/></td>
|
||||
<td>::formatNum(total-tpaid):: ::currency()::</td>
|
||||
<td>
|
||||
::if(total>tpaid)::
|
||||
::_("To be paid"):: ::formatNum(total-tpaid):: ::currency()::
|
||||
::else::
|
||||
::_("Pay back"):: ::formatNum(tpaid-total):: ::currency()::
|
||||
::end::
|
||||
</td>
|
||||
</tr>
|
||||
::end::
|
||||
::end::
|
||||
</table>
|
||||
</td>
|
||||
|
||||
::else::
|
||||
<!-- PAYMENT CHECK FOR STANDARD MODE -->
|
||||
<td></td>
|
||||
::set ua = u.getUserAmap(user._amap)::
|
||||
::set balance = ua.balance::
|
||||
<th>::_("Balance of the member:"):: ::ua.balance:: ::currency()::</th>
|
||||
<td colspan="6">
|
||||
::set pending = 0::
|
||||
|
||||
<table style="width:100%;border:1px solid #CCC;">
|
||||
<!-- payment to confirm -->
|
||||
::foreach p ua.getLastOperations(5)::
|
||||
::if p.type==2 && p.pending==true::
|
||||
<tr>
|
||||
<td style="width:30px;">
|
||||
::if(p.pending==true)::
|
||||
<img src="/img/tick_no.png"/>
|
||||
::else::
|
||||
<img src="/img/tick_ok_me.png"/>
|
||||
::end::
|
||||
</td>
|
||||
<td>
|
||||
::formatNum(p.amount):: ::currency()::
|
||||
- ::p.name::
|
||||
|
||||
::set pending = pending + p.amount::
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
::end::
|
||||
::end::
|
||||
|
||||
|
||||
<!-- need to pay more or cash back -->
|
||||
::if(balance<0 && balance+pending!=0)::
|
||||
<tr style="background-color:#EEE;">
|
||||
<td style="width:30px;"><img src="/img/tick_no.png"/></td>
|
||||
<td>
|
||||
::if(balance+pending<0)::
|
||||
::_("To be paid"):: ::formatNum(abs(balance+pending)):: ::currency():: pour équilibrer le solde
|
||||
::else::
|
||||
::_("Pay back"):: ::formatNum(balance+pending):: ::currency():: pour équilibrer le solde
|
||||
::end::
|
||||
</td>
|
||||
</tr>
|
||||
::end::
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
::end::
|
||||
|
||||
|
||||
</tr>
|
||||
::end::
|
||||
::end::
|
||||
|
||||
</table>
|
||||
|
||||
<p>::raw nl2br(user.getAmap().txtDistrib)::</p>
|
||||
|
||||
<p class="hidden">
|
||||
<i>::_("Push on \"Control + P\" to print this page.")::</i>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<table class="" ::cond sqlLog::>
|
||||
::foreach r sqlLog::
|
||||
<tr ::attr class if(r.bad) 'badSql'::>
|
||||
<td>::r.t::ms</td>
|
||||
<td>::r.length::</td>
|
||||
<td><a href="#" onclick="javascript:alert('::r.explain::');return false;">Exp</a></td>
|
||||
<td><a href="#" onclick="javascript:alert('::r.stack::');return false;">Stack</a></td>
|
||||
<td>::r.sql::</td>
|
||||
</tr>
|
||||
::end::
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,163 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>::_("Attendance sheet")::</title>
|
||||
<link href="/css/print.css" rel="stylesheet"/>
|
||||
</head>
|
||||
<body>
|
||||
<!-- page head-->
|
||||
::fill head::
|
||||
<td >
|
||||
<h1 style='text-align:right;'>::user._amap.name::</h1>
|
||||
<h2 style='text-align:right;'>::_("Delivery of the"):: ::hDate(date)::</h2>
|
||||
</td>
|
||||
::end::
|
||||
|
||||
<!-- table header -->
|
||||
::fill tableHeader::
|
||||
<tr>
|
||||
<th>::_("Qty")::</th>
|
||||
<th>::_("Product")::</th>
|
||||
<th>::_("U.P.")::</th>
|
||||
<th>::_("Fees")::</th>
|
||||
<th>::_("Total")::</th>
|
||||
|
||||
<th>::_("Signature")::</th>
|
||||
</tr>
|
||||
::end::
|
||||
|
||||
::set name = ""::
|
||||
::set name2 = ""::
|
||||
::set total = 0::
|
||||
::set productNum = 0::
|
||||
|
||||
::foreach m orders::
|
||||
|
||||
::if m.userName != name || m.userName2 != name2::
|
||||
|
||||
::if name != ""::
|
||||
::raw "</table> <hr />"::
|
||||
::end::
|
||||
|
||||
::raw "<table style='width:100%;'>" ::
|
||||
<tr>
|
||||
<td style='width:33%;'>
|
||||
|
||||
<b style="font-size:150%;">
|
||||
::set basket = getBasket(m.userId,place.id,date)::
|
||||
<span ::cond basket!=null::>::_("Num"):: ::basket.num:: - </span>
|
||||
::m.userName::
|
||||
</b>
|
||||
::set total = 0::
|
||||
::set productNum = 0::
|
||||
</td>
|
||||
<td>
|
||||
::set u = getUser(m.userId):
|
||||
::if u!=null && u.phone!=null::
|
||||
Tél: $$nullSafe(::u.phone::)
|
||||
::end::
|
||||
</td>
|
||||
<td style='text-align:right;'>
|
||||
<b>::user._amap.name::</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
::if m.userName2 != null::
|
||||
::_("alternately with")::<br/>
|
||||
<b>::m.userName2::</b>
|
||||
::set total = 0::
|
||||
::set productNum = 0::
|
||||
::end::
|
||||
</td>
|
||||
<td>
|
||||
::if m.userName2 != null::
|
||||
::set u = getUser(m.userId2):
|
||||
::if u !=null::
|
||||
$$nullSafe(::u.phone::)
|
||||
::end::
|
||||
::end::
|
||||
</td>
|
||||
<td style='text-align:right;'>
|
||||
<b>::_("Delivery of the"):: ::hDate(date)::</b>
|
||||
</td>
|
||||
</tr>
|
||||
::raw "</table>" ::
|
||||
|
||||
::raw "<table style='width:100%;'>"::
|
||||
::raw tableHeader::
|
||||
|
||||
|
||||
::end::
|
||||
|
||||
::if m.userName != name || m.userName2 != name2::
|
||||
::set class="name"::
|
||||
::else::
|
||||
::set class=""::
|
||||
::end::
|
||||
<tr class="::class::">
|
||||
<td style="font-size: ::fontRatio::%;border-bottom: 2px solid #AAA;">
|
||||
::if(m.quantity==0 && m.canceled)::
|
||||
::_("Canceled")::
|
||||
::else::
|
||||
::raw m.smartQt::
|
||||
::end::
|
||||
::set productNum = productNum+m.quantity::
|
||||
</td>
|
||||
<td style="font-size: ::fontRatio::%;border-bottom: 2px solid #AAA;">
|
||||
::m.productName::
|
||||
</td>
|
||||
<td>
|
||||
::formatNum(m.productPrice):: ::currency()::
|
||||
</td>
|
||||
<td>
|
||||
::if m.fees!=null::
|
||||
::formatNum(m.fees):: ::currency()::
|
||||
::end::
|
||||
</td>
|
||||
<td>
|
||||
::formatNum(m.total):: ::currency()::
|
||||
::set total = total + m.total::
|
||||
</td>
|
||||
|
||||
<td style="width:20%;"></td>
|
||||
|
||||
</tr>
|
||||
::set name = m.userName ::
|
||||
::set name2 = m.userName2 ::
|
||||
|
||||
<!--TOTAL-->
|
||||
::set next = orders[repeat.m.index+1]::
|
||||
::if next==null || next.userName!=name || next.userName2!=name2::
|
||||
<tr>
|
||||
<td class="total">::formatNum(productNum)::</td>
|
||||
<td class="total" colspan="2"></td>
|
||||
<td class="total">::_("TOTAL")::</td>
|
||||
<td class="total" style="font-size: ::fontRatio::%;">::formatNum(total):: ::currency()::</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
::end::
|
||||
::end::
|
||||
|
||||
<p>::raw nl2br(user.getAmap().txtDistrib)::</p>
|
||||
|
||||
<p class="hidden"><i>::_("Push on \"Control + P\" to print this page.")::</i></p>
|
||||
|
||||
|
||||
|
||||
<table class="" ::cond sqlLog::>
|
||||
::foreach r sqlLog::
|
||||
<tr ::attr class if(r.bad) 'badSql'::>
|
||||
<td>::r.t::ms</td>
|
||||
<td>::r.length::</td>
|
||||
<td><a href="#" onclick="javascript:alert('::r.explain::');return false;">Exp</a></td>
|
||||
<td><a href="#" onclick="javascript:alert('::r.stack::');return false;">Stack</a></td>
|
||||
<td>::r.sql::</td>
|
||||
</tr>
|
||||
::end::
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,178 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>::_("Attendance sheet")::</title>
|
||||
<link href="/css/print.css" rel="stylesheet"/>
|
||||
</head>
|
||||
<body>
|
||||
<!-- page head-->
|
||||
::fill head::
|
||||
<td >
|
||||
<h1 style='text-align:right;'>::user._amap.name::</h1>
|
||||
<h2 style='text-align:right;'>::_("Delivery of the"):: ::hDate(date)::</h2>
|
||||
</td>
|
||||
::end::
|
||||
|
||||
<!-- table header -->
|
||||
::fill tableHeader::
|
||||
<tr>
|
||||
<th>::_("Contract")::</th>
|
||||
<th>::_("Qty")::</th>
|
||||
<th>::_("Product")::</th>
|
||||
<th>::_("U.P.")::</th>
|
||||
<th>::_("Fees")::</th>
|
||||
<th>::_("Total")::</th>
|
||||
|
||||
<th>::_("Signature")::</th>
|
||||
</tr>
|
||||
::end::
|
||||
|
||||
::set name = ""::
|
||||
::set name2 = ""::
|
||||
::set total = 0::
|
||||
::set productNum = 0::
|
||||
::set currentContract = ""::
|
||||
|
||||
::foreach m orders::
|
||||
|
||||
::if m.userName != name || m.userName2 != name2::
|
||||
|
||||
::if name != ""::
|
||||
::raw "</table> <hr />"::
|
||||
::end::
|
||||
|
||||
::raw "<table style='width:100%;'>" ::
|
||||
<tr>
|
||||
<td style='width:33%;'>
|
||||
<b style="font-size:150%;">
|
||||
::set basket = getBasket(m.userId,place.id,date)::
|
||||
<span ::cond basket!=null::>N°::basket.num:: - </span>
|
||||
::m.userName::
|
||||
</b>
|
||||
::set total = 0::
|
||||
::set productNum = 0::
|
||||
</td>
|
||||
<td>
|
||||
::set u = getUser(m.userId):
|
||||
::if u!=null && u.phone!=null::
|
||||
Tél: $$nullSafe(::u.phone::)
|
||||
::end::
|
||||
</td>
|
||||
<td style='text-align:right;'>
|
||||
<b>::user._amap.name::</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
::if m.userName2 != null::
|
||||
::_("alternately with")::<br/>
|
||||
<b>::m.userName2::</b>
|
||||
::set total = 0::
|
||||
::set productNum = 0::
|
||||
::end::
|
||||
</td>
|
||||
<td>
|
||||
::if m.userName2 != null::
|
||||
::set u = getUser(m.userId2):
|
||||
::if u !=null::
|
||||
$$nullSafe(::u.phone::)
|
||||
::end::
|
||||
::end::
|
||||
</td>
|
||||
<td style='text-align:right;'>
|
||||
<b>::_("Delivery of the"):: ::hDate(date)::</b>
|
||||
</td>
|
||||
</tr>
|
||||
::raw "</table>" ::
|
||||
|
||||
::raw "<table style='width:100%;'>"::
|
||||
::raw tableHeader::
|
||||
::end::
|
||||
|
||||
::if m.userName != name || m.userName2 != name2::
|
||||
::set class="name"::
|
||||
::set currentContract = ""::
|
||||
|
||||
::else::
|
||||
::set class=""::
|
||||
::end::
|
||||
<tr class="::class::">
|
||||
::if currentContract != short(m.contractName,40) ::
|
||||
::if currentContract == "" ::
|
||||
::set td_style="font-size:" + fontRatio + "%" ::
|
||||
::else::
|
||||
::set td_style="font-size:" + fontRatio + "%;border-top: 2px solid #AAA;" ::
|
||||
::end::
|
||||
<td style="::td_style::" >
|
||||
::short(m.contractName,40)::
|
||||
</td>
|
||||
::set currentContract = short(m.contractName,40)::
|
||||
::else::
|
||||
<td> </td>
|
||||
::end::
|
||||
<td style="font-size: ::fontRatio::%;border-bottom: 2px solid #AAA;">
|
||||
::if(m.quantity==0 && m.canceled)::
|
||||
::_("Canceled")::
|
||||
::else::
|
||||
::raw m.smartQt::
|
||||
::end::
|
||||
::set productNum = productNum+m.quantity::
|
||||
</td>
|
||||
<td style="font-size: ::fontRatio::%;border-bottom: 2px solid #AAA;">
|
||||
::m.productName::
|
||||
</td>
|
||||
<td>
|
||||
::formatNum(m.productPrice):: ::currency()::
|
||||
</td>
|
||||
<td>
|
||||
::if m.fees!=null::
|
||||
::formatNum(m.fees):: ::currency()::
|
||||
::end::
|
||||
</td>
|
||||
<td>
|
||||
::formatNum(m.total):: ::currency()::
|
||||
::set total = total + m.total::
|
||||
</td>
|
||||
|
||||
<td style="width:20%;"></td>
|
||||
|
||||
</tr>
|
||||
::set name = m.userName ::
|
||||
::set name2 = m.userName2 ::
|
||||
|
||||
<!--TOTAL-->
|
||||
::set next = orders[repeat.m.index+1]::
|
||||
::if next==null || next.userName!=name || next.userName2!=name2::
|
||||
<tr>
|
||||
<td style="border-top: 2px solid #AAA;"></td>
|
||||
<td class="total">::formatNum(productNum)::</td>
|
||||
<td class="total" colspan="2"></td>
|
||||
<td class="total">::_("TOTAL")::</td>
|
||||
<td class="total" style="font-size: ::fontRatio::%;">::formatNum(total):: ::currency()::</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
::end::
|
||||
::end::
|
||||
|
||||
<p>::raw nl2br(user.getAmap().txtDistrib)::</p>
|
||||
|
||||
<p class="hidden"><i>::_("Push on \"Control + P\" to print this page.")::</i></p>
|
||||
|
||||
|
||||
|
||||
<table class="" ::cond sqlLog::>
|
||||
::foreach r sqlLog::
|
||||
<tr ::attr class if(r.bad) 'badSql'::>
|
||||
<td>::r.t::ms</td>
|
||||
<td>::r.length::</td>
|
||||
<td><a href="#" onclick="javascript:alert('::r.explain::');return false;">Exp</a></td>
|
||||
<td><a href="#" onclick="javascript:alert('::r.stack::');return false;">Stack</a></td>
|
||||
<td>::r.sql::</td>
|
||||
</tr>
|
||||
::end::
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,115 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>::_("Attendance sheet")::</title>
|
||||
<link href="/css/print.css" rel="stylesheet"/>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>::user._amap.name::</h1>
|
||||
<h2>Livraison du ::hDate(date)::</h2>
|
||||
|
||||
|
||||
|
||||
<table style="width:100%;">
|
||||
::set name = ""::
|
||||
::set name2 = ""::
|
||||
::set total = 0::
|
||||
::set productNum = 0::
|
||||
<tr style="font-size:120%">
|
||||
<th>::_("Name")::</th>
|
||||
<th>::_("Contact details")::</th>
|
||||
<th>::_("Qty")::</th>
|
||||
<th>::_("Product")::</th>
|
||||
<th>::_("Signature")::</th>
|
||||
|
||||
</tr>
|
||||
|
||||
::foreach m orders::
|
||||
|
||||
|
||||
::if m.userName != name || m.userName2 != name2::
|
||||
::set class="name"::
|
||||
::else::
|
||||
::set class=""::
|
||||
::end::
|
||||
<tr class="::class::">
|
||||
|
||||
<td style="font-size:120%">
|
||||
::if m.userName != name || m.userName2 != name2::
|
||||
<b>
|
||||
::set basket = getBasket(m.userId,place.id,date)::
|
||||
<span ::cond basket!=null::>N°::basket.num:: - </span>
|
||||
|
||||
::m.userName::
|
||||
</b>
|
||||
::if m.userName2 != null::
|
||||
<br />::_("alternately with"):: <b>::m.userName2::</b>
|
||||
::end::
|
||||
::set total = 0::
|
||||
::set productNum = 0::
|
||||
::end::
|
||||
|
||||
</td>
|
||||
<td>
|
||||
::if m.userName != name || m.userName2 != name2::
|
||||
::set u = getUser(m.userId):
|
||||
::if u !=null::
|
||||
$$nullSafe(::u.phone::)
|
||||
::end::
|
||||
|
||||
::if m.userName2 != null::
|
||||
::set u = getUser(m.userId2):
|
||||
::if u !=null::
|
||||
<br />$$nullSafe(::u.phone::)
|
||||
::end::
|
||||
::end::
|
||||
::end::
|
||||
|
||||
</td>
|
||||
::set name = m.userName ::
|
||||
::set name2 = m.userName2 ::
|
||||
<td>
|
||||
::if(m.quantity==0 && m.canceled)::
|
||||
::_("Canceled")::
|
||||
::else::
|
||||
::raw m.smartQt::
|
||||
::end::
|
||||
::set productNum = productNum+m.quantity::
|
||||
</td>
|
||||
<td>
|
||||
::m.productName::
|
||||
</td>
|
||||
|
||||
<td style="width:20%;"></td>
|
||||
</tr>
|
||||
|
||||
::set next = orders[repeat.m.index+1]::
|
||||
::end::
|
||||
|
||||
</table>
|
||||
|
||||
<p>::raw nl2br(user.getAmap().txtDistrib)::</p>
|
||||
|
||||
<p class="hidden">
|
||||
<i>::_("Push on \"Control + P\" to print this page.")::</i>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<table class="" ::cond sqlLog::>
|
||||
::foreach r sqlLog::
|
||||
<tr ::attr class if(r.bad) 'badSql'::>
|
||||
<td>::r.t::ms</td>
|
||||
<td>::r.length::</td>
|
||||
<td><a href="#" onclick="javascript:alert('::r.explain::');return false;">Exp</a></td>
|
||||
<td><a href="#" onclick="javascript:alert('::r.stack::');return false;">Stack</a></td>
|
||||
<td>::r.sql::</td>
|
||||
</tr>
|
||||
::end::
|
||||
</table>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,91 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>::_("Attendance sheet")::</title>
|
||||
<link href="/css/print.css" rel="stylesheet"/>
|
||||
</head>
|
||||
<body>
|
||||
<h2>
|
||||
::contract._amap.name:: -
|
||||
::__("Distribution of the ::date::, from ::from:: to ::to::",{date:dDate(distrib.date),from:hHour(distrib.date),to:hHour(distrib.end)})::
|
||||
</h2>
|
||||
<h2>
|
||||
::distrib._contract.name:: - ::distrib._contract._vendor.name::
|
||||
</h2>
|
||||
|
||||
<p>
|
||||
<span class="glyphicon glyphicon-map-marker"></span><b>::_("Place"):: : </b>
|
||||
::distrib._place.toString()::, ::distrib._place.getAddress()::
|
||||
</p>
|
||||
<p>
|
||||
::set c = contract._contact::
|
||||
::set v = contract._vendor::
|
||||
<b>::_("Contact in charge of the contract") :</b> ::c.firstName:: ::c.lastName::, ::c.email::, ::c.phone::
|
||||
</p>
|
||||
<p>
|
||||
<b>::_("Farmer"):: : </b>
|
||||
::v.name:: ,
|
||||
::if v.email!=null :: ::v.email:: ::end::,
|
||||
::if v.phone!=null :: ::v.phone:: ::end::
|
||||
</p>
|
||||
<p>
|
||||
<b>::_("Members on duty"):: : </b>
|
||||
::if distrib._distributor1!=null:: ::distrib._distributor1.getName()::, ::end::
|
||||
::if distrib._distributor2!=null:: ::distrib._distributor2.getName()::, ::end::
|
||||
::if distrib._distributor3!=null:: ::distrib._distributor3.getName()::, ::end::
|
||||
::if distrib._distributor4!=null:: ::distrib._distributor4.getName():: ::end::
|
||||
</p>
|
||||
|
||||
<table class="table table-bordered table-hover" style="width:100%;">
|
||||
<tr>
|
||||
<th></th>
|
||||
::foreach p products::
|
||||
<th>
|
||||
::p.name::<br/>
|
||||
::p.ref::
|
||||
</th>
|
||||
::end::
|
||||
<th>TOTAL</th>
|
||||
</tr>
|
||||
::foreach user users::
|
||||
<tr>
|
||||
<th>
|
||||
::set basket = getBasket(user.id,distrib._place.id,distrib.date)::
|
||||
<span ::cond basket!=null::>N°::basket.num:: - </span>
|
||||
|
||||
::user.getCoupleName()::
|
||||
|
||||
</th>
|
||||
::foreach p products::
|
||||
<td>
|
||||
::set o = orders.get(user.id).get(p.id)::
|
||||
|
||||
::if(o!=null)::
|
||||
::raw o.smartQt::
|
||||
::end::
|
||||
</td>
|
||||
::end::
|
||||
<th>::formatNum(totalByUser(user.id)):: ::currency()::</th>
|
||||
</tr>
|
||||
::end::
|
||||
<tr>
|
||||
<th>TOTAL</th>
|
||||
::foreach p products::
|
||||
<th>
|
||||
::set q = totalByProduct(p.id)::
|
||||
::if(p.qt!=null && (p.hasFloatQt || p.variablePrice) )::
|
||||
::q * p.qt:: ::unit(p._unitType,false)::
|
||||
::else::
|
||||
::q::
|
||||
::end::
|
||||
</th>
|
||||
::end::
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p>::raw nl2br(distrib._contract._amap.txtDistrib)::</p>
|
||||
<p class="hidden"><i>::_("Push on \"Control + P\" to print this page.")::</i></p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,110 @@
|
||||
::use 'design.mtt'::
|
||||
<div id="content" class="col-md-12">
|
||||
<div class="article">
|
||||
<h2>::_("Planning of deliveries:"):: ::contract.name::</h2>
|
||||
|
||||
<p>
|
||||
::raw _("Subscribe now by selecting checkboxes corresponding to dates which are convenient for you. The goal of attendances consists in helping during the delivery of products.")::
|
||||
</p>
|
||||
|
||||
<div style="overflow-x:scroll;">
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<td></td>
|
||||
::foreach d distribs::
|
||||
::set date = getDate(d.date)::
|
||||
<th style="font-size:12px;line-height:14px;text-align:center;background-color:#DED;">::date.dow::<br/>
|
||||
::date.d::<br/>
|
||||
::date.m::<br/>
|
||||
::date.h+":"+date.i::</th>
|
||||
::end::
|
||||
</tr>
|
||||
|
||||
<!-- current user -->
|
||||
<tr>
|
||||
<td style="white-space: nowrap;">
|
||||
<b>::user.getCoupleName()::</b>
|
||||
</td>
|
||||
<script>
|
||||
window.reg = function(distribId,img){
|
||||
$(img).hide();
|
||||
$.ajax("/distribution/register?register=1&distrib="+distribId,{success:function(data){
|
||||
//alert("data : "+data);
|
||||
$(img).show();
|
||||
img.src="/img/tick_ok_me.png";
|
||||
img.onclick = function(){
|
||||
unreg(distribId,img);
|
||||
};
|
||||
}});
|
||||
};
|
||||
window.unreg = function(distribId,img){
|
||||
$(img).hide();
|
||||
$.ajax("/distribution/register?register=0&distrib="+distribId,{success:function(data){
|
||||
//alert("data : "+data+", "+$(this));
|
||||
$(img).show();
|
||||
img.src="/img/tick_no.png";
|
||||
img.onclick = function(){
|
||||
reg(distribId,img);
|
||||
};
|
||||
}});
|
||||
};
|
||||
</script>
|
||||
|
||||
::set me = doodle.get(user.id)::
|
||||
::foreach d distribs::
|
||||
<td style="text-align:center;">
|
||||
|
||||
::if me !=null::
|
||||
::set a = me.planning.get(d.id)::
|
||||
::if a!=null::
|
||||
<img src="/img/tick_ok_me.png" onclick="unreg('::d.id::',this)" />
|
||||
::else::
|
||||
::if !d.hasEnoughDistributors()::
|
||||
<img src="/img/tick_no.png" onclick="reg('::d.id::',this)" />
|
||||
::else::
|
||||
<span style="color: #AAA;font-size: 80%;">::_("full")::</span>
|
||||
::end::
|
||||
::end::
|
||||
::else::
|
||||
::if !d.hasEnoughDistributors()::
|
||||
<img src="/img/tick_no.png" onclick="reg('::d.id::',this)" />
|
||||
::else::
|
||||
::_("full")::
|
||||
::end::
|
||||
|
||||
::end::
|
||||
|
||||
</td>
|
||||
::end::
|
||||
|
||||
|
||||
</tr>
|
||||
<!-- other users-->
|
||||
::foreach doo doodle::
|
||||
<tr ::cond doo.user.id!=user.id:: style="background-color:#EEE;">
|
||||
<td>::doo.user.getCoupleName()::</td>
|
||||
|
||||
::foreach d distribs::
|
||||
<td style="text-align:center;">
|
||||
::set a = doo.planning.get(d.id)::
|
||||
|
||||
::if a!=null::
|
||||
<img src="/img/tick_ok.png"/>
|
||||
::end::
|
||||
</td>
|
||||
::end::
|
||||
</tr>
|
||||
::end::
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div style="text-align:right">
|
||||
<a href="/" class="btn btn-default btn-lg">::_("Validate")::</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,92 @@
|
||||
::use 'design.mtt'::
|
||||
|
||||
<style>
|
||||
table tr td{
|
||||
white-space: nowrap;
|
||||
overflow-x:hidden;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="article">
|
||||
|
||||
<div class="text-center">
|
||||
<h3>
|
||||
::_("Validate the delivery of the"):: ::hDate(date)::
|
||||
</h3>
|
||||
<h4
|
||||
><span class="glyphicon glyphicon-map-marker"></span>::place::
|
||||
</h4>
|
||||
|
||||
<p>
|
||||
::if(confirmed)::
|
||||
<div class="alert alert-success block-center" style="width:150px;margin:auto;">
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
::_("Validated")::
|
||||
</div>
|
||||
::else::
|
||||
<div class="alert alert-danger block-center" style="width:150px;margin:auto;">
|
||||
<span class="glyphicon glyphicon-exclamation-sign"></span>
|
||||
::_("Not validated")::
|
||||
</div>
|
||||
::end::
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
<p class="text-center">
|
||||
<a href="/contractAdmin/ordersByDate/::date.toString().substr(0,10)::/::place.id::" class="btn btn-default btn-sm">
|
||||
<span class="glyphicon glyphicon-list-alt"></span> ::_("Back to the summary sheet of orders"):: </a>
|
||||
</p>
|
||||
|
||||
|
||||
<table class="table table-bordered table-hover table-condensed" style="width:100%;">
|
||||
|
||||
::foreach u users::
|
||||
|
||||
::set basket = getBasket(u.id,place.id,date)::
|
||||
|
||||
::if(basket.isValidated()==true)::
|
||||
::set class="success"::
|
||||
::else::
|
||||
::set class="danger"::
|
||||
::end::
|
||||
<tr class="::class::">
|
||||
<td>
|
||||
<div class="basketNumber" ::cond basket!=null:: >
|
||||
<i class="fa fa-shopping-basket" aria-hidden="true"></i> ::_("Num"):: ::basket.num::
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
::u.getCoupleName()::
|
||||
</td>
|
||||
|
||||
<td class="text-right">
|
||||
|
||||
::if(class=="danger")::
|
||||
<a href="/validate/::date::/::place.id::/::u.id::" class="btn btn-danger">
|
||||
<i class="fa fa-chevron-right" aria-hidden="true"></i>
|
||||
::_("To be validated")::
|
||||
</a>
|
||||
::else::
|
||||
<a href="/validate/::date::/::place.id::/::u.id::" class="btn">
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
::_("Validated")::
|
||||
</a>
|
||||
::end::
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
::end::
|
||||
|
||||
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<html lang="::LANG::">
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="/css/0/style.css"/>
|
||||
<link rel="stylesheet" href="/css/bootstrap.min.css" />
|
||||
</head>
|
||||
<body class="container">
|
||||
<div class="row" style="margin-top:40px;">
|
||||
<div class="col-md-2"></div>
|
||||
<div class="col-md-8 article">
|
||||
<h1>::_("Ouch !")::</h1>
|
||||
<p>
|
||||
::_("An error occurred.")::
|
||||
</p>
|
||||
<p>
|
||||
::_("If the website is unavailable, please try again in few minutes.")::
|
||||
<br/>
|
||||
::_("If this happen repeatedly, please let us know so we can solve the issue.")::
|
||||
</p>
|
||||
|
||||
<h4>::_("Technical description of the error")::</h4>
|
||||
|
||||
<pre id="error_msg">::message::</pre>
|
||||
|
||||
::if stack::
|
||||
<h4>Stack</h4>
|
||||
<pre>::stack::</pre>
|
||||
::end::
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,14 @@
|
||||
::use 'design.mtt'::
|
||||
<div class="col-md-9">
|
||||
<div class="article">
|
||||
<h3 ::cond title!=null::>::title::</h3>
|
||||
<p ::cond text!=null::>
|
||||
::raw text::
|
||||
</p>
|
||||
|
||||
::raw form::
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,13 @@
|
||||
::use 'base.mtt'::
|
||||
<!-- Load Google adress autocomplete -->
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAaBTanH_Z4hyWjJ62aDqM678ZeQ6PuA0E&libraries=places" defer="1"></script>
|
||||
|
||||
<div id="map"></div>
|
||||
|
||||
<script>
|
||||
$(function(){
|
||||
var map = _.groupMap(::lat::,::lng::,"::escapeJS(address)::");
|
||||
});
|
||||
</script>
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,17 @@
|
||||
<div class="col-md-9">
|
||||
<div class="article" style="height:500px;">
|
||||
|
||||
<iframe width="100%" height="480" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?q=::addr::&output=embed"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="article" style="height:500px;font-size:1.2em;">
|
||||
|
||||
<strong>::place.name::</strong><br/>
|
||||
$$nullSafe(::place.address1::)<br/>
|
||||
$$nullSafe(::place.address2::)<br/>
|
||||
$$nullSafe(::place.zipCode::) $$nullSafe(::place.city::)
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,195 @@
|
||||
::use 'base.mtt'::
|
||||
|
||||
|
||||
<div class="col-md-8 col-md-offset-2" style="margin-top:12px;">
|
||||
|
||||
<!-- Notifications -->
|
||||
<div class="row">
|
||||
<div id="content" class="col-md-12">
|
||||
::foreach notification getMessages()::
|
||||
<div class="alert ::if notification.error:: alert-danger ::else:: alert-success ::end::" ::cond notification::>
|
||||
::if notification.error::
|
||||
<span class="glyphicon glyphicon-exclamation-sign"></span>
|
||||
::else::
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
::end::
|
||||
|
||||
::raw notification.text::
|
||||
</div>
|
||||
::end::
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="article">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<p>
|
||||
|
||||
::if group._image!=null::
|
||||
|
||||
::if group.extUrl!=null && group.extUrl!=""::
|
||||
<a href="::group.extUrl::"><img src="::file(group._image)::" class="img-responsive img-thumbnail" /></a><br/>
|
||||
::else::
|
||||
<img src="::file(group._image)::" class="img-responsive img-thumbnail" /><br/>
|
||||
::end::
|
||||
|
||||
::end::
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
||||
::if isMember::
|
||||
<!-- connected and member of the group-->
|
||||
<a href="/user/choose?amap=::group.id::" class="btn btn-primary">
|
||||
<span class="glyphicon glyphicon-chevron-right"></span>
|
||||
::_("Go to my account")::
|
||||
</a>
|
||||
|
||||
::else::
|
||||
|
||||
<h4>Inscriptions :</h4>
|
||||
::switch group._regOption::
|
||||
|
||||
::case::
|
||||
<p>
|
||||
::_("Contact the person in charge in order to subscribe to this group and get to know membership conditions.")::
|
||||
</p>
|
||||
<p>
|
||||
<a href="::"mailto:"+group._contact.email+"?subject=Adhésion"::" class="btn btn-primary">
|
||||
<span class="glyphicon glyphicon-envelope"></span>
|
||||
::_("Membership request")::
|
||||
</a>
|
||||
</p>
|
||||
::case::
|
||||
<p>
|
||||
::_("This group accepts subscriptions on waiting list. A coordinator will contact you.")::
|
||||
</p>
|
||||
<p>
|
||||
<a href="/group/list/::group.id::" class="btn btn-primary">
|
||||
<span class="glyphicon glyphicon-chevron-right"></span>
|
||||
::_("Subscription on waiting list")::
|
||||
</a>
|
||||
</p>
|
||||
|
||||
::case::
|
||||
<p>
|
||||
<a href="/group/register/::group.id::" class="btn btn-primary">
|
||||
<span class="glyphicon glyphicon-chevron-right"></span>
|
||||
::_("Free subscription")::
|
||||
</a>
|
||||
</p>
|
||||
::case::
|
||||
<p>
|
||||
::_("This group is full and do not accept any more subscription.")::
|
||||
</p>
|
||||
::end::
|
||||
|
||||
::end::
|
||||
|
||||
|
||||
</p>
|
||||
|
||||
::if user==null::
|
||||
<hr />
|
||||
<h4>::_("Already member? Log in:")::</h4>
|
||||
<div class="text-center">
|
||||
<a href="#" onclick="_.loginBox('/group/::group.id::')" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-user"></span> ::_("Log in")::</a>
|
||||
</div>
|
||||
::end::
|
||||
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
|
||||
<h2>
|
||||
::group.name::
|
||||
</h2>
|
||||
|
||||
<p>
|
||||
::if group.txtIntro!=null && group.txtIntro!=""::
|
||||
::raw nl2br(group.txtIntro)::
|
||||
::end::
|
||||
</p>
|
||||
|
||||
|
||||
<p>
|
||||
<h3> ::_("Next deliveries")::</h3>
|
||||
|
||||
::foreach d group.getDeliveries(4)::
|
||||
|
||||
<div style="display:inline-block;margin-right:8px;vertical-align:top;">
|
||||
::set s = getDate( d.date )::
|
||||
::if isToday(d.date)::
|
||||
$$today(::s.dow::,::s.d::,::s.m::,::s.y::,::s.h::,::d._place::)
|
||||
::else::
|
||||
$$date(::s.dow::,::s.d::,::s.m::,::s.y::,::d._place::)
|
||||
::end::
|
||||
</div>
|
||||
|
||||
::end::
|
||||
</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
<p ::cond group._contact!=null::>
|
||||
<h3>::_("Contact")::</h3>
|
||||
|
||||
<i class="icon-user"></i>
|
||||
<b>::group._contact.firstName:: ::group._contact.lastName::</b><br/>
|
||||
<span ::cond group._contact.email!=null::>
|
||||
<span class="glyphicon glyphicon-envelope"></span>
|
||||
<a href="::"mailto:"+group._contact.email::">::group._contact.email::</a><br/>
|
||||
</span>
|
||||
<span ::cond group._contact.phone!=null && (isMember || group.canExposePhone())::>
|
||||
<span class="glyphicon glyphicon-phone-alt"></span> ::group._contact.phone::<br/>
|
||||
</span>
|
||||
</p>
|
||||
|
||||
<hr/>
|
||||
|
||||
<p>
|
||||
<h3>::_("Suppliers and products")::</h3>
|
||||
<p>
|
||||
::_("Non-complete extract of available products:")::
|
||||
</p>
|
||||
|
||||
::foreach c contracts::
|
||||
<p>
|
||||
<b>::c.name::</b><br/>
|
||||
::c._vendor.name::, $$nullSafe(::c._vendor.zipCode::) $$nullSafe(::c._vendor.city::)
|
||||
<div class="row">
|
||||
::foreach p c.getProductsPreview(6)::
|
||||
<div class="col-md-2" data-toggle="tooltip" data-placement="top" title="::p.name::" >
|
||||
<div style="background-image:url('::p.getImage()::')" class="productImg"/>
|
||||
</div>
|
||||
::end::
|
||||
</div>
|
||||
</p>
|
||||
::end::
|
||||
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-md-4">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<div id="footer">
|
||||
<a href="::_("http://www.cagette.net")::">::_("Cagette.net, the free software of food direct-selling")::</a>.
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,353 @@
|
||||
::use 'design.mtt'::
|
||||
|
||||
::if user==null::
|
||||
<div style="margin-top:12px;"></div>
|
||||
::end::
|
||||
|
||||
<div id="content" class="col-md-8">
|
||||
|
||||
<!-- Welcoming message + access to tutos-->
|
||||
::if newGroup::
|
||||
<div class="alert alert-success">
|
||||
<h3>::_("Welcome to Cagette.net !")::</h3>
|
||||
<p>
|
||||
::raw _("Congratulations, you just created a new group !<br/>As an example, we created a fake farmer and fake products.<br/>It will show you how things work together in Cagette.net.<br/>Of course, you'll be able to delete them.")::
|
||||
</p>
|
||||
<hr/>
|
||||
<p>
|
||||
::raw _("As a starter, we recommand you to follow the <b>guided tour</b> to discover step by step the main sections of the software.")::
|
||||
</p>
|
||||
<p>
|
||||
<a href="/contract/?startTuto=intro" class="btn btn-primary"><span class="glyphicon glyphicon-chevron-right"></span> ::_("Start the guided tour")::</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
::end::
|
||||
|
||||
<!-- standard mode order forms -->
|
||||
::if !amap.hasShopMode()::
|
||||
<div class="homeBlock" ::cond ( openContracts!=null && openContracts.length>0 )::>
|
||||
<img src="/img/order.png" width="64" height="64" style="float:right;" />
|
||||
<h2>::_("Open orders")::</h2>
|
||||
<ul>
|
||||
::foreach c openContracts::
|
||||
<li><a href="/contract/view/::c.id::">::c.name::</a></li>
|
||||
::end::
|
||||
</ul>
|
||||
</div>
|
||||
::end::
|
||||
|
||||
<!-- empty planning -->
|
||||
::if distribs==null || count(distribs)==0::
|
||||
<div class="homeBlock">
|
||||
<!--Votre planning de livraison est vide pour l'instant.-->
|
||||
::_("You delivery planning is currently empty||on homepage when there is no planned deliveries")::
|
||||
<br/>
|
||||
</div>
|
||||
::else::
|
||||
|
||||
|
||||
::foreach d distribs::
|
||||
|
||||
::if d.userHasOrders(user)::
|
||||
|
||||
<!-- block with orders -->
|
||||
<div class="distrib">
|
||||
|
||||
::set place = d.getPlace()::
|
||||
::set active = d.isActive()::
|
||||
::set start = d.getDate()::
|
||||
::set end = d.getEndDate()::
|
||||
::set ordersStartDate = d.getOrdersStartDate()::
|
||||
::set ordersEndDate = d.getOrdersEndDate()::
|
||||
<div class="header orders">
|
||||
|
||||
<div class="dateBoxOffset">
|
||||
::set s = getDate(start)::
|
||||
::if isToday(start)::
|
||||
$$today(::s.dow::,::s.d::,::s.m::,::s.y::,::s.h::,null)
|
||||
::else::
|
||||
$$date(::s.dow::,::s.d::,::s.m::,::s.y::,null)
|
||||
::end::
|
||||
</div>
|
||||
|
||||
<div class="pull-right text-right" ::cond amap.hasShopMode() && d.type==1 ::>
|
||||
::if active::
|
||||
<a ::cond !amap.hasPayments():: href="/contract/editOrderByDate/::start.toString().substr(0,10)::" class="btn btn-default btn-sm">
|
||||
<span class="glyphicon glyphicon-edit"></span> ::_("Modify my order")::
|
||||
</a>
|
||||
<a href="/shop/::place.id::/::start.toString().substr(0,10)::" class="btn btn-default btn-sm">
|
||||
<span class="glyphicon glyphicon-plus"></span> ::_("Add products")::
|
||||
</a>
|
||||
::elseif(ordersEndDate!=null)::
|
||||
<!--Fermeture des commandes :-->
|
||||
::if Date.now().getTime() > ordersEndDate.getTime()::
|
||||
::_("Order closed since"):: <br/>
|
||||
::hDate(ordersEndDate)::
|
||||
::else::
|
||||
::_("Order will open on"):: <br/>
|
||||
::hDate(ordersStartDate)::
|
||||
::end::
|
||||
::end::
|
||||
</div>
|
||||
|
||||
<div class="info">
|
||||
$$place(::place::)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="myorder">::_("My ordered products"):: :</div>
|
||||
|
||||
<div class="content orders">
|
||||
::foreach dist d.distributions::
|
||||
::set orders = prepare(dist.getUserOrders(user))::
|
||||
::if orders.length>0::
|
||||
<h4>
|
||||
::set s = getDate(dist.date) ::
|
||||
::set e = getDate(dist.end)::
|
||||
|
||||
<span style="color:#999;"><span class="glyphicon glyphicon-time"></span> ::s.h+":"+s.i:: - ::e.h+":"+e.i::</span>
|
||||
::_("Distribution"):: <a href="/contract/view/::dist._contract.id::">::dist._contract.name::</a>
|
||||
</h4>
|
||||
|
||||
<div class="row">
|
||||
::foreach c orders::
|
||||
|
||||
<div class="col-xs-12 col-sm-6 col-lg-4" ::cond orders.length>0:: >
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="background-image:url('::c.productImage::')" class="productImg" />
|
||||
</td>
|
||||
<td class="name">
|
||||
<span ::cond c.quantity >1:: ><b>::raw c.smartQt::</b></span>
|
||||
<span style="background-color: #B00;color:white;padding: 2px;border-radius: 3px;margin-right:3px;" ::cond c.quantity ==0:: >
|
||||
::_("Canceled")::
|
||||
</span>
|
||||
::c.productName::
|
||||
|
||||
::if c.userId2!=null::
|
||||
::if user.id==c.userId::
|
||||
::set you = c.userName::
|
||||
::set mate = c.userName2::
|
||||
::else::
|
||||
::set mate = c.userName::
|
||||
::set you = c.userName2::
|
||||
::end::
|
||||
|
||||
<br/>(
|
||||
|
||||
::raw __("alternated with ::mate::",{mate:mate})::,
|
||||
|
||||
::if getWhosTurn(c.id,dist)==false::
|
||||
|
||||
::if c.userName == you::
|
||||
<span style="color:#080">::_("It's your turn")::</span>
|
||||
::else::
|
||||
::_("It's his/her turn")::
|
||||
::end::
|
||||
::else::
|
||||
::if c.userName2 == you::
|
||||
<span style="color:#080">::_("It's your turn")::</span>
|
||||
::else::
|
||||
::_("It's his/her turn")::
|
||||
::end::
|
||||
::end::
|
||||
)
|
||||
::end::
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
::end::
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
::if user.isContractManager(dist._contract) || dist.distributor1Id==user.id || dist.distributor2Id==user.id || dist.distributor3Id==user.id || dist.distributor4Id==user.id::
|
||||
<a href="/distribution/list/::dist.id::"><span class="glyphicon glyphicon-print"></span> ::_("Distribution list")::</a>
|
||||
::end::
|
||||
|
||||
<span ::cond dist.distributor1Id!=null || dist.distributor2Id!=null || dist.distributor3Id!=null || dist.distributor4Id!=null::>
|
||||
<a href="#" onclick="$('#distributors::dist.id::').toggle();return false;"><span class="glyphicon glyphicon-user"></span> ::_("Permanence")::</a>
|
||||
</span>
|
||||
|
||||
<a href="/contract/view/::dist._contract.id::"><span class="glyphicon glyphicon-list-alt"></span> ::_("Contract details")::</a>
|
||||
|
||||
::if !amap.hasShopMode() && dist._contract.type==1::
|
||||
<a href="/contract/order/::dist._contract.id::"><span class="glyphicon glyphicon-edit"></span> ::_("Modify my order")::</a>
|
||||
::end::
|
||||
|
||||
<div id="distributors::dist.id::" style="display:none;margin:8px;">
|
||||
<ul>
|
||||
<li ::cond dist.distributor1Id!=null::><i class="icon-user"></i> ::dist._distributor1.getCoupleName():: </li>
|
||||
<li ::cond dist.distributor2Id!=null::><i class="icon-user"></i> ::dist._distributor2.getCoupleName():: </li>
|
||||
<li ::cond dist.distributor3Id!=null::><i class="icon-user"></i> ::dist._distributor3.getCoupleName():: </li>
|
||||
<li ::cond dist.distributor4Id!=null::><i class="icon-user"></i> ::dist._distributor4.getCoupleName():: </li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="distribMessage" ::cond dist.distributor1Id==user.id || dist.distributor2Id==user.id ||dist.distributor3Id==user.id || dist.distributor4Id==user.id::>
|
||||
::_("Warning, you're engaged in this distribution !")::
|
||||
</div>
|
||||
</div>
|
||||
::end::
|
||||
|
||||
::end::
|
||||
|
||||
<!-- extra html -->
|
||||
<div class="text-center">
|
||||
<!--::foreach i d.actions::
|
||||
<a href="::i.link::" class="btn btn-default btn-sm">
|
||||
<span ::cond i.icon:: class="glyphicon glyphicon-::i.icon::" ></span>
|
||||
::i.name::
|
||||
</a>
|
||||
::end::-->
|
||||
::raw d.extraHtml::
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
::elseif(amap.hasShopMode())::
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- delivery open to orders (only for shopmode) -->
|
||||
<div class="distrib">
|
||||
::set place = d.getPlace()::
|
||||
::set active = d.isActive()::
|
||||
::set start = d.getDate()::
|
||||
::set end = d.getEndDate()::
|
||||
::set ordersStartDate = d.getOrdersStartDate()::
|
||||
::set ordersEndDate = d.getOrdersEndDate()::
|
||||
|
||||
::set class =""::
|
||||
::if !active::
|
||||
::set class="disabled"::
|
||||
::end::
|
||||
|
||||
<div class="header ::class::">
|
||||
|
||||
<div class="text-right pull-right">
|
||||
::if active==true::
|
||||
<a href="/shop/::place.id::/::start.toString().substr(0,10)::" class="btn btn-lg btn-primary">
|
||||
<span class="glyphicon glyphicon-chevron-right"></span>
|
||||
::_("Order||Order button on homepage")::
|
||||
</a>
|
||||
<br/>
|
||||
|
||||
::elseif(ordersEndDate!=null)::
|
||||
<!--Fermeture des commandes :-->
|
||||
::if Date.now().getTime() > ordersEndDate.getTime()::
|
||||
::_("Order closed since"):: <br/>
|
||||
::hDate(ordersEndDate)::
|
||||
::else::
|
||||
::_("Order will open on"):: <br/>
|
||||
::hDate(ordersStartDate)::
|
||||
::end::
|
||||
::end::
|
||||
|
||||
</div>
|
||||
|
||||
<div class="dateBoxOffset">
|
||||
::set s = getDate(start)::
|
||||
::if isToday(start)::
|
||||
$$today(::s.dow::,::s.d::,::s.m::,::s.y::,::s.h::,null)
|
||||
::else::
|
||||
$$date(::s.dow::,::s.d::,::s.m::,::s.y::,null)
|
||||
::end::
|
||||
</div>
|
||||
|
||||
<div class="info">
|
||||
::set e = getDate(end)::
|
||||
<span class="glyphicon glyphicon-time"></span>
|
||||
::set start = s.h+":"+s.i::
|
||||
::set end = e.h+":"+e.i::
|
||||
|
||||
::__("Delivery from ::start:: to ::end::||Delivery from 18:00 to 19:30",{start:start,end:end})::
|
||||
<br/>
|
||||
$$place(::place::)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="content ::class::">
|
||||
<!-- products previews-->
|
||||
::foreach p d.getProductsExcerpt()::
|
||||
<div data-toggle="tooltip" data-placement="top" title="::p.name::" style="background-image:url('::p.image::')" class="productImg"/>
|
||||
::end::
|
||||
|
||||
<!-- extra html -->
|
||||
<div class="text-center">
|
||||
::raw d.extraHtml::
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
::end::
|
||||
|
||||
::end::
|
||||
|
||||
::end::
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- RIGHT COLUMN -->
|
||||
<div class="col-md-4">
|
||||
|
||||
<div class="block" >
|
||||
|
||||
::if amap._image!=null::
|
||||
::if amap.extUrl!=null && amap.extUrl!=""::
|
||||
<a href="::amap.extUrl::"><img src="::file(amap._image)::" style="margin:auto;display: block;width: 100%;" class="thumbnail" /><br/></a>
|
||||
::else::
|
||||
<img src="::file(amap._image)::" style="margin:auto;display: block;width: 100%;" class="thumbnail" /><br/>
|
||||
::end::
|
||||
::end::
|
||||
|
||||
::if amap.txtHome!=null && amap.txtHome!=""::
|
||||
::raw nl2br(amap.txtHome)::
|
||||
::end::
|
||||
|
||||
</div>
|
||||
|
||||
<div class="block" ::cond contractsWithDistributors.length>0 ::>
|
||||
<h3>::_("Permanences")::</h3>
|
||||
<p>::_("Don't forget to register for permanences")::</p>
|
||||
<ul>
|
||||
::foreach c contractsWithDistributors::
|
||||
<li><a href="/distribution/planning/::c.id::">::c.name::</a></li>
|
||||
::end::
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-danger" ::cond user!=null && !user.isFullyRegistred()::>
|
||||
<p>
|
||||
::_("Warning, you don't have defined a password yet !")::
|
||||
</p>
|
||||
<a href="/user/definePassword" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-chevron-right"></span> ::_("Set my password")::</a>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- additionnal blocks from plugins -->
|
||||
::if blocks!=null::
|
||||
::foreach b blocks::
|
||||
<div class="block">
|
||||
<h3>::b.title::</h3>
|
||||
<p>::raw b.html::</p>
|
||||
</div>
|
||||
::end::
|
||||
::end::
|
||||
</div>
|
||||
::end::
|
||||
@@ -0,0 +1,35 @@
|
||||
::use 'design.mtt'::
|
||||
<div class="col-md-9">
|
||||
<div class="article">
|
||||
|
||||
<h2>::_("Update")::</h2>
|
||||
|
||||
<table class="table table-bordered">
|
||||
|
||||
::foreach s status::
|
||||
<tr>
|
||||
<th>
|
||||
::s.parameter::
|
||||
</th>
|
||||
<td>
|
||||
$$bool(::s.valid::)
|
||||
</td>
|
||||
<td>
|
||||
::s.message::
|
||||
</td>
|
||||
<td>
|
||||
::if !s.valid::
|
||||
<a href="/install/update::s.parameter::" class="btn btn-primary">::_("Update")::</a>
|
||||
::end::
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
::end::
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
::end::
|
||||
@@ -0,0 +1,312 @@
|
||||
<macros>
|
||||
|
||||
<macro name="jsConfirm(?text)">confirm(::if text==null::'Confirmer cette action ?'::else::'::escapeJS(text)::'::end::)</macro>
|
||||
|
||||
<macro name="confirm(?text)" onclick="return $$jsConfirm(::text::)"/>
|
||||
|
||||
<macro name="file(id,?def)">
|
||||
::if id == null && def != null::
|
||||
::def::
|
||||
::else::
|
||||
/file/::makeFileSign(id)::.jpg
|
||||
::end::
|
||||
</macro>
|
||||
|
||||
<macro name="img(id,?def)"><img src="$$file(::id::,::def::)"/></macro>
|
||||
|
||||
<macro name="browse(b,url)">$$browseCustom(::b::,::url::,Page ::b.page:: ::if b.pages::/::b.pages:: ::end::)</macro>
|
||||
|
||||
<macro name="browseCustom(b,url,custom)">
|
||||
<
|
||||
::if b.prev::<a href="::url::/?page=::b.prev::">::_("Previous")::</a>::else:: ::_("Previous"):: ::end::
|
||||
| ::custom:: |
|
||||
::if b.next::<a href="::url::/?page=::b.next::">::_("Next")::</a>::else:: ::_("Next"):: ::end:: >
|
||||
</macro>
|
||||
|
||||
<macro name="nullSafe(text)">::if text==null::::else::::text::::end::</macro>
|
||||
|
||||
<macro name="edit(text,url)">
|
||||
|
||||
<a href="::url::" class="btn btn-default btn-sm">
|
||||
<span class="glyphicon glyphicon-edit" aria-hidden="true"></span>
|
||||
::text::
|
||||
</a>
|
||||
</macro>
|
||||
|
||||
<macro name="insert(text,url)">
|
||||
<!--<img src="/img/icons/add.png" style="vertical-align:middle;" /> <a href="::url::">::text::</a>-->
|
||||
<a href="::url::" class="btn btn-default btn-sm">
|
||||
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
|
||||
::text::
|
||||
</a>
|
||||
</macro>
|
||||
|
||||
<macro name="delete(text,url)">
|
||||
<a href="::url::" $$confirm(::_("Delete ?")::) class="btn btn-default btn-sm" >
|
||||
<span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
|
||||
::if text!=null && text!=""::
|
||||
::text::
|
||||
::end::
|
||||
</a>
|
||||
</macro>
|
||||
|
||||
<macro name="export(url)">
|
||||
<a href="::url::" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-list-alt"></span> ::_("Excel/CSV Export")::</a>
|
||||
</macro>
|
||||
|
||||
<macro name="bool(v)">
|
||||
::if v==true::
|
||||
<img src="/img/icons/accept.png" />
|
||||
::else::
|
||||
<img src="/img/icons/stop.png" />
|
||||
::end::
|
||||
</macro>
|
||||
|
||||
<macro name="check(v)">
|
||||
::if(v==true || v==1)::
|
||||
<span class="glyphicon glyphicon-ok" style="color:#060"></span>
|
||||
::else::
|
||||
<span class="glyphicon glyphicon-exclamation-sign" style="color:#a94442"></span>
|
||||
::end::
|
||||
</macro>
|
||||
|
||||
|
||||
<macro name="date(dow,d,m,y,place)">
|
||||
<div class="dateBox" >
|
||||
<div class="box">
|
||||
<div>::dow::</div>
|
||||
<div style="font-size:28px;color:#990000;">::d::</div>
|
||||
<div>::m::</div>
|
||||
</div>
|
||||
::if place!=null::
|
||||
<div style="margin-top:6px;">
|
||||
<span class="glyphicon glyphicon-map-marker"></span>
|
||||
<a href="#" onclick="_.overlay('/group/place/::place.id::','::urlEncode(place.name)::')">::place::</a>
|
||||
</div>
|
||||
::end::
|
||||
</div>
|
||||
</macro>
|
||||
|
||||
<macro name="place(place)">
|
||||
<span class="glyphicon glyphicon-map-marker"></span>
|
||||
<a onclick="_.overlay('/group/place/::place.id::','::urlEncode(place.name)::')">::place::</a>
|
||||
<div class="address">
|
||||
$$nullSafe(::place.address1::)
|
||||
$$nullSafe(::place.address2::)
|
||||
$$nullSafe(::place.zipCode::)
|
||||
$$nullSafe(::place.city::)
|
||||
</div>
|
||||
</macro>
|
||||
|
||||
<macro name="today(dow,d,m,y,h,place)">
|
||||
<div class="dateBox" style="background-color:#080;" >
|
||||
<img src="/img/go.png"/>
|
||||
<div style="font-size:16px;margin-bottom:8px;">
|
||||
::if Std.parseInt(h)<=12::
|
||||
::_("THIS MORNING")::
|
||||
::elseif Std.parseInt(h)<18::
|
||||
<span style="font-size:14px;">CET<br/>::_("AFTERNOON")::</span>
|
||||
::else::
|
||||
::_("THIS EVENING")::
|
||||
::end::
|
||||
|
||||
</div>
|
||||
::if place!=null::
|
||||
<div style="margin-top:6px;">
|
||||
<span class="glyphicon glyphicon-map-marker"></span>
|
||||
<a href="#" onclick="_.overlay('/group/place/::place.id::','::urlEncode(place.name)::')">::place::</a>
|
||||
</div>
|
||||
::end::
|
||||
</div>
|
||||
</macro>
|
||||
|
||||
<macro name="contact(u)">
|
||||
|
||||
<i class="icon-user"></i>
|
||||
|
||||
::if u!=null::
|
||||
<b>::u.firstName:: ::u.lastName::</b><br/>
|
||||
<span ::cond u.email!=null::>
|
||||
<span class="glyphicon glyphicon-envelope"></span> <a href="mailto: ::u.email::">::u.email::</a><br/>
|
||||
</span>
|
||||
<span ::cond u.phone!=null::>
|
||||
<span class="glyphicon glyphicon-phone-alt"></span> ::u.phone::<br/>
|
||||
</span>
|
||||
::else::
|
||||
::_("No contact")::
|
||||
::end::
|
||||
|
||||
</macro>
|
||||
|
||||
|
||||
<macro name="alert(msg)">
|
||||
<div class="alert alert-danger">
|
||||
<span class="glyphicon glyphicon-exclamation-sign"></span>
|
||||
|
||||
::raw msg::
|
||||
</div>
|
||||
</macro>
|
||||
|
||||
|
||||
<macro name="operation(t)">
|
||||
::set x = t.getTypeIndex()::
|
||||
<!--::if x==2:: ::set class="text-right":: ::end:: -->
|
||||
<td class="::class::">
|
||||
::if x==0::
|
||||
<i class="fa fa-shopping-cart" aria-hidden="true"></i> ::_("Order")::
|
||||
::elseif x==1::
|
||||
<i class="fa fa-shopping-basket" aria-hidden="true"></i> ::raw _("CSA contract")::
|
||||
::elseif x==2::
|
||||
<!--<span style="margin-left:48px;">::_("Payment"):: ::_(t.getPaymentType())::</span>-->
|
||||
<i class="fa fa-credit-card" aria-hidden="true"></i> ::_("Payment"):: ::t.getPaymentTypeName()::
|
||||
::else::
|
||||
<i class="fa fa-user" aria-hidden="true"></i> ::_("Subscription")::
|
||||
::end::
|
||||
</td>
|
||||
|
||||
<td>
|
||||
::if t.pending==true::
|
||||
<i class="fa fa-circle-thin" style="color:#CCC;" aria-hidden="true"></i>
|
||||
::else::
|
||||
<i class="fa fa-check" aria-hidden="true"></i>
|
||||
::end::
|
||||
</td>
|
||||
<td style="font-size:1em;">
|
||||
|
||||
::t.name::<br/>
|
||||
|
||||
::if x==2 && t.pending==true::
|
||||
::if(t.getPaymentType()=="check")::
|
||||
<span style="color:red;">::_("Check to be given at the collection of products")::</span>
|
||||
::elseif(t.getPaymentType()=="cash")::
|
||||
<span style="color:red;">::_("Cash to be given at the collection of products")::</span>
|
||||
::elseif(t.getPaymentType()=="transfer")::
|
||||
<span style="color:red;">::_("This transfer must be validated by a coordinator")::</span>
|
||||
::else::
|
||||
::t.name::<br/>
|
||||
<span style="font-size:0.90em;color:#AAA;">::hDate(t.date)::</span>
|
||||
::end::
|
||||
|
||||
::else::
|
||||
<span style="font-size:0.90em;color:#AAA;">::hDate(t.date)::</span>
|
||||
::end::
|
||||
</td>
|
||||
<td class="text-right">
|
||||
::if(t.amount<0)::
|
||||
-
|
||||
::end::
|
||||
</td>
|
||||
<td>::formatNum(Math.abs(t.amount)):: ::currency()::</td>
|
||||
::set class=""::
|
||||
</macro>
|
||||
|
||||
<macro name="back()">
|
||||
<a href="#" onclick="window.history.back();" class="btn btn-default btn-sm pull-right"><span class="glyphicon glyphicon-chevron-left"></span> ::_("Back")::</a>
|
||||
</macro>
|
||||
|
||||
|
||||
<macro name="deliveryPro(k,showBtns)">
|
||||
::set now = Date.now()::
|
||||
<div class="row">
|
||||
<div class="col-md-4 text-center">
|
||||
<!-- find color/icon to display -->
|
||||
::set open = 0::
|
||||
::set notyetopened = 0::
|
||||
::set closed = 0::
|
||||
|
||||
::foreach d k::
|
||||
::if d.orderStartDate!=null::
|
||||
::if now.getTime() > d.orderStartDate.getTime() && now.getTime() < d.orderEndDate.getTime()::
|
||||
<!-- commande en cours -->
|
||||
::set open = open+1::
|
||||
::elseif now.getTime() > d.orderEndDate.getTime()::
|
||||
<!-- commande terminée -->
|
||||
::set closed = closed+1::
|
||||
::else::
|
||||
<!-- commande pas ouverte -->
|
||||
::set notyetopened = notyetopened+1::
|
||||
::end::
|
||||
::else::
|
||||
<!-- AMAP : commande terminée -->
|
||||
::set closed = closed+1::
|
||||
::end::
|
||||
::end::
|
||||
|
||||
<div style="display:inline-block;">
|
||||
::set x = getDate(k[0].date)::
|
||||
$$date(::x.dow::,::x.d::,::x.m::,::x.y::,::k[0]._place::)
|
||||
</div>
|
||||
|
||||
<div style="text-align: center;font-weight: bold;margin-top: 12px;font-size: 1.2em;color:#666;">::x.h+":"+x.i::</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
|
||||
::if (open==k.length)::
|
||||
<span class="fa-stack fa-lg" data-toggle="tooltip" title="Commande en cours.">
|
||||
<i class="fa fa-circle fa-stack-2x" style="color:#F80;"></i>
|
||||
<i class="fa fa-shopping-basket fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
::elseif(closed==k.length)::
|
||||
<span class="fa-stack fa-lg" data-toggle="tooltip" title="Commande close. Préparez votre livraison">
|
||||
<i class="fa fa-circle fa-stack-2x" style="color:#0A0;"></i>
|
||||
<i class="fa fa-truck fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
::elseif(notyetopened==k.length)::
|
||||
<span class="fa-stack fa-lg" data-toggle="tooltip" title="Commande pas encore ouverte">
|
||||
<i class="fa fa-circle fa-stack-2x" style="color:#999;" ></i>
|
||||
<i class="fa fa-clock-o fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
::else::
|
||||
<span class="fa-stack fa-lg" data-toggle="tooltip" title="Statut mixte">
|
||||
<i class="fa fa-circle fa-stack-2x" style="color:#999;" ></i>
|
||||
<i class="fa fa-truck fa-stack-1x fa-inverse"></i>
|
||||
</span>
|
||||
::end::
|
||||
|
||||
<b>::k[0]._contract._amap.name::</b><br/>
|
||||
|
||||
<table>
|
||||
::foreach d k::
|
||||
<tr>
|
||||
<td>
|
||||
::if d.orderStartDate!=null::
|
||||
::if now.getTime() > d.orderStartDate.getTime() && now.getTime() < d.orderEndDate.getTime()::
|
||||
<!-- commande en cours -->
|
||||
<i class="fa fa-circle" style="color:#F80;" data-toggle="tooltip" title="Commande en cours."></i>
|
||||
::elseif now.getTime() > d.orderEndDate.getTime()::
|
||||
<!-- commande terminée -->
|
||||
<i class="fa fa-circle" style="color:#0A0;" data-toggle="tooltip" title="Commande close. Préparez votre livraison"></i>
|
||||
::else::
|
||||
<!-- commande pas ouverte -->
|
||||
<i class="fa fa-circle-thin" style="color:#666;" data-toggle="tooltip" title="Commande pas encore ouverte"></i>
|
||||
::end::
|
||||
::else::
|
||||
<!-- AMAP -->
|
||||
<i class="fa fa-circle" style="color:#0A0;" data-toggle="tooltip" title="Commande close. Préparez votre livraison"></i>
|
||||
::end::
|
||||
|
||||
::set c = getCatalog(d)::
|
||||
<a href="/p/pro/delivery/view/::d.id::">::c.name::</a>
|
||||
</td>
|
||||
<td>
|
||||
::if showBtns::
|
||||
<div class="btn-group">
|
||||
<a href="/p/pro/delivery/edit/::d.id::" title="::_("Edit")::" data-toggle="tooltip" class="btn btn-default btn-sm">
|
||||
<span class="glyphicon glyphicon-edit" aria-hidden="true"></span>
|
||||
</a>
|
||||
<a href="/p/pro/delivery/delete/::d.id::?token=::token::" title="::_("Delete")::" data-toggle="tooltip" $$confirm(::_("Delete ?")::) class="btn btn-default btn-sm" >
|
||||
<span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
|
||||
</a>
|
||||
</div>
|
||||
::end::
|
||||
</td>
|
||||
</tr>
|
||||
::end::
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</macro>
|
||||
|
||||
</macros>
|
||||
@@ -0,0 +1,40 @@
|
||||
<style>
|
||||
table.table{
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
table.table td{
|
||||
border: 1px solid #ddd;
|
||||
padding: 6px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<div>
|
||||
::raw __content__::
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
||||
<div style="color:#666;font-size:12px;">
|
||||
::_("This e-mail was sent from"):: <a href="http://::HOST::">::_("Cagette.net")::</a>.
|
||||
|
||||
::if group!=null::
|
||||
<br/>
|
||||
::_("You receive this message because you are part of"):: <b>::group.name::</b>
|
||||
::end::
|
||||
|
||||
::if list!=null::
|
||||
( ::list:: )
|
||||
::end::
|
||||
|
||||
<!-- btn -->
|
||||
::if group!=null::
|
||||
<div style="width:50%;max-width:300px;margin: 12px auto;padding: 8px;text-decoration: none;background: #070;border-radius: 3px;text-align: center;">
|
||||
<a href="http://::HOST::/group/::group.id::" style="color: white;font-weight: bold;text-decoration: none;font-size:1.2em;">
|
||||
→ ::group.name::
|
||||
</a>
|
||||
</div>
|
||||
::end::
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,16 @@
|
||||
:: use 'mail/design.mtt'::
|
||||
|
||||
<p>
|
||||
::_("Hello"):: ::user.firstName::,
|
||||
</p>
|
||||
<p>
|
||||
::_("You asked to modify your password,")::
|
||||
<a href="::link::">::_("Click here to perform this operation")::</a>.
|
||||
</p>
|
||||
<p>
|
||||
::_("Be careful, this link is valid only 24 hours for security reasons.")::
|
||||
</p>
|
||||
|
||||
::end::
|
||||
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
:: use 'mail/design.mtt'::
|
||||
|
||||
<div style="max-width:400px;margin:auto;border:solid 1px #AAA;border-radius:8px;padding:12px;text-align:center;font-family:Arial;">
|
||||
|
||||
<img src="http://::HOST::/img/logo2.png" title="Cagette.net" />
|
||||
|
||||
<p>
|
||||
::_("Hello"):: $$nullSafe(::name::),
|
||||
</p>
|
||||
|
||||
<p>
|
||||
::if groupName!=null::
|
||||
|
||||
::raw __("As a member of <b>::groupName::</b>",{groupName:groupName})::
|
||||
<br/>
|
||||
::_("you have been pre-registered on Cagette.net")::
|
||||
|
||||
::else::
|
||||
|
||||
<b>::_("you have been pre-registered on Cagette.net")::</b>
|
||||
|
||||
::end::
|
||||
</p>
|
||||
|
||||
<p>
|
||||
::_("This software makes the organisation of the group easy by informing you about the next delivery dates, orders and current contracts")::
|
||||
</p>
|
||||
<p>
|
||||
::_("In order to finalize the subscription, please choose your password")::
|
||||
</p>
|
||||
<p>
|
||||
::_("You will then be able to connect anytime by using your e-mail")::
|
||||
( <i>::email:: ::if email2!=null:: ou ::email2:: ::end::</i> )
|
||||
::_("and your password on the website"):: <a href="http://::HOST::">::HOST::</a>
|
||||
|
||||
<a href="http://::HOST::/user/validate/::k::" class="btn" style="display:block;padding:8px;background:#227700;border-radius:8px;width:auto;color: white;margin: 12px; text-decoration: none;margin-top:16px;font-size:120%;">
|
||||
» ::_("Finalize your subscription")::
|
||||
</a>
|
||||
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,8 @@
|
||||
:: use 'mail/design.mtt'::
|
||||
|
||||
|
||||
::raw text::
|
||||
|
||||
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,17 @@
|
||||
:: use 'mail/design.mtt'::
|
||||
|
||||
<p>
|
||||
::_("Hello"):: ::user.firstName::,
|
||||
</p>
|
||||
<p>
|
||||
::__("A new password has been defined for ::site::",{site:NAME})::
|
||||
<br/>
|
||||
::raw __("The new password is <b>::pass::</b>, don't forget it !",{pass:password})::
|
||||
</p>
|
||||
<p>
|
||||
::raw __("You can use the following emails to log into your account : <b>::emails::</b>",{emails:emails})::
|
||||
</p>
|
||||
|
||||
::end::
|
||||
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
::use 'mail/design.mtt'::
|
||||
|
||||
<h3>Récapitulatif de votre commande "<b>::contract.name::</b>"</h3>
|
||||
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<td>
|
||||
Date de livraison
|
||||
</td>
|
||||
<td>
|
||||
::dDate(distribution.date):: de ::hHour(distribution.date):: à ::hHour(distribution.end)::
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Adresse</td>
|
||||
<td>
|
||||
::distribution._place.getFullAddress()::
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<!-- produits -->
|
||||
<table class="table table-bordered table-hover" >
|
||||
<tr>
|
||||
<th>Qté</th>
|
||||
<th>Produit</th>
|
||||
<th>P.U</th>
|
||||
<th>Sous-total</th>
|
||||
<th>Frais</th>
|
||||
<th>Total</th>
|
||||
</tr>
|
||||
::set total = 0::
|
||||
::foreach m orders::
|
||||
<tr>
|
||||
<td>
|
||||
::raw m.smartQt:
|
||||
</td>
|
||||
<td>
|
||||
::m.productName::
|
||||
</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>
|
||||
|
||||
</tr>
|
||||
::end::
|
||||
|
||||
<tr style="background:#DDD;">
|
||||
<th colspan="4"></th>
|
||||
<th class="text-right">Total :</th>
|
||||
<th>::formatNum(total):: ::currency()::</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,69 @@
|
||||
::use 'mail/design.mtt'::
|
||||
|
||||
<h3>Récapitulatif de commande par produits</h3>
|
||||
|
||||
<p>
|
||||
Les commandes du contrat <b>::contract.name::</b> dont vous êtes coordinateur ont fermé le <b>::hDate(distribution.orderEndDate)::</b>.
|
||||
</p>
|
||||
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<td>
|
||||
Date de livraison
|
||||
</td>
|
||||
<td>
|
||||
::dDate(distribution.date):: de ::hHour(distribution.date):: à ::hHour(distribution.end)::
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Adresse</td>
|
||||
<td>
|
||||
::distribution._place.getFullAddress()::
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<!-- produits -->
|
||||
<table class="table table-bordered table-hover" >
|
||||
<tr>
|
||||
<th>Poids/Vol.</th>
|
||||
<th>Quantités</th>
|
||||
<th>Produit</th>
|
||||
<th>Référence</th>
|
||||
<th>Prix unitaire TTC</th>
|
||||
<th>Total</th>
|
||||
</tr>
|
||||
::set total = 0::
|
||||
::foreach m orders::
|
||||
<tr>
|
||||
<td>::raw m.weightOrVolume::</td>
|
||||
<td>
|
||||
::raw m.quantity::
|
||||
</td>
|
||||
<td>
|
||||
::m.pname::
|
||||
</td>
|
||||
<td class="ref">
|
||||
$$nullSafe(::m.ref::)
|
||||
</td>
|
||||
<td>
|
||||
::formatNum(m.priceTTC):: ::currency()::
|
||||
</td>
|
||||
<td>
|
||||
::formatNum(m.totalTTC):: ::currency()::
|
||||
::set total = total + m.totalTTC::
|
||||
</td>
|
||||
</tr>
|
||||
::end::
|
||||
|
||||
<tr style="background:#DDD;">
|
||||
<th colspan="4"></th>
|
||||
<th class="text-right">Total :</th>
|
||||
<th>::formatNum(total):: ::currency()::</th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,17 @@
|
||||
::use 'design.mtt'::
|
||||
<div class="text-center" style="height:400px;width:100%;">
|
||||
<h1>
|
||||
<span class="glyphicon glyphicon-cog"></span>
|
||||
::_("Maintenance")::</h1>
|
||||
<p>
|
||||
Le site est actuellement en maintenance.<br/>
|
||||
Revenez dans quelques instants.
|
||||
</p>
|
||||
<p>
|
||||
The website is currently under maintenance.<br/>
|
||||
Please come back later.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,63 @@
|
||||
::use 'design.mtt'::
|
||||
<div class="col-md-12">
|
||||
<h2>::_("Balance of members")::</h2>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="article">
|
||||
<h3>::_("Balanced")::</h3>
|
||||
<table class="table">
|
||||
::foreach ua balanced::
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/member/payments/::ua._user.id::">::ua._user.getName()::</a>
|
||||
</td>
|
||||
<td class="info">
|
||||
::ua.balance:: ::currency()::
|
||||
</td>
|
||||
</tr>
|
||||
::end::
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="article">
|
||||
<h3>::_("In debt")::</h3>
|
||||
<table class="table">
|
||||
::foreach ua debt::
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/member/payments/::ua._user.id::">::ua._user.getName()::</a>
|
||||
</td>
|
||||
<td class="danger">
|
||||
::ua.balance:: ::currency()::
|
||||
</td>
|
||||
</tr>
|
||||
::end::
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="article">
|
||||
<h3>::_("In credit")::</h3>
|
||||
<table class="table">
|
||||
::foreach ua credit::
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/member/payments/::ua._user.id::">::ua._user.getName()::</a>
|
||||
</td>
|
||||
<td class="success">
|
||||
::ua.balance:: ::currency()::
|
||||
</td>
|
||||
</tr>
|
||||
::end::
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,164 @@
|
||||
::use 'design.mtt'::
|
||||
<div class="col-md-9">
|
||||
<div class="article">
|
||||
::if select!=null::
|
||||
<h2>::_("Selection :||show a sublist of members which has been selected")::
|
||||
::if select=="nocontract"::
|
||||
::_("Members without any contracts")::
|
||||
::elseif select=="nomembership"::
|
||||
::_("Members whose membership should be renewed")::
|
||||
::elseif select=="newusers"::
|
||||
::_("Members who has never logged in")::
|
||||
::elseif select=="contract"::
|
||||
::_("Members with orders or contracts")::
|
||||
::end::
|
||||
</h2>
|
||||
|
||||
<p><b>::members.current().length::</b> ::_("members")::.</p>
|
||||
|
||||
<a href="/member/">::_("Back to main page")::</a>
|
||||
::elseif search!=null::
|
||||
<h2>::_("Search"):: : ::search::</h2>
|
||||
<a href="/member/">::_("Back to main page")::</a>
|
||||
|
||||
::else::
|
||||
<h2>::_("Members")::</h2>
|
||||
::end::
|
||||
|
||||
|
||||
::if select=="newusers"::
|
||||
<hr/>
|
||||
<p style="text-align:center;">
|
||||
::_("You can invite by email all the members who never logged in, in one single clic.")::
|
||||
</p>
|
||||
<p style="text-align:center;">
|
||||
<a href="/member/invite/?token=::token::" class="btn btn-primary btn-lg"><span class="glyphicon glyphicon-envelope"></span> ::_("Send invitations")::</a>
|
||||
</p>
|
||||
::end::
|
||||
|
||||
<table class="table table-bordered table-hover table-striped" style="width:100%;">
|
||||
::foreach m members.current()::
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
<a href="/member/view/::m.id::">
|
||||
::m.lastName:: ::m.firstName::
|
||||
::if m.lastName2!=null::
|
||||
& ::m.lastName2:: ::m.firstName2::
|
||||
::end::
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
::if m.address1!=null::
|
||||
::m.address1::
|
||||
::end::
|
||||
::if m.address2!=null::
|
||||
::m.address2::
|
||||
::end::
|
||||
::if m.zipCode!=null::
|
||||
::m.zipCode::
|
||||
::end::
|
||||
::if m.city!=null::
|
||||
::m.city::
|
||||
::end::
|
||||
</td>
|
||||
</tr>
|
||||
::end::
|
||||
|
||||
<tr ::cond select==null && search==null::>
|
||||
<td colspan="2" class="text-center">
|
||||
|
||||
<ul class="pagination">
|
||||
::if members.paginationStartPage != 1::
|
||||
<li>
|
||||
<a href="?page=::members.paginationStartPage-1::">
|
||||
<span class="glyphicon glyphicon-backward"></span>
|
||||
</a>
|
||||
</li>
|
||||
::end::
|
||||
::foreach i loopList(members.paginationStartPage,members.paginationEndPage)::
|
||||
::if members.page==i::
|
||||
<li class="active" ><a href="?page=::i::">::i::</a></li>
|
||||
::else::
|
||||
<li><a href="?page=::i::">::i::</a></li>
|
||||
::end::
|
||||
::end::
|
||||
::if members.paginationEndPage < members.pages + 1::
|
||||
<li>
|
||||
<a href="?page=::members.paginationEndPage::">
|
||||
<span class="glyphicon glyphicon-forward"></span>
|
||||
</a>
|
||||
</li>
|
||||
::end::
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<div>
|
||||
|
||||
<a href="/member/insert" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-plus-sign"></span> ::_("New member")::</a>
|
||||
$$export(::Web.getURI()+"?"+Web.getParamsString()::&csv=1)
|
||||
<a href="/member/import" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-save"></span> ::_("Import members")::</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
|
||||
<div class="block">
|
||||
<h3>::_("Selections")::</h3>
|
||||
<ul>
|
||||
<li><a href="/member/">::_("All members")::</a></li>
|
||||
<li><a href="/member/?select=nocontract">::_("Without orders or contracts")::</a></li>
|
||||
<li><a href="/member/?select=contract">::_("With orders or contracts")::</a></li>
|
||||
<li><a href="/member/?select=newusers">::_("Never logged in")::</a></li>
|
||||
<li ::cond user._amap.hasMembership()::><a href="/member/?select=nomembership">::_("Memberships to renew")::</a></li>
|
||||
<li ::cond user._amap.hasPayments()::><a href="/member/balance">::_("Members balance")::</a></li>
|
||||
|
||||
</ul>
|
||||
|
||||
<form class="form-search" action="/member/" method="get">
|
||||
<div class="input-group">
|
||||
::if search==null::
|
||||
::set ssearch=""::
|
||||
::else::
|
||||
::set ssearch=search::
|
||||
::end::
|
||||
<input type="text" class="form-control" name="search" value="::ssearch::" />
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-search"></span> ::_("Search||search action button")::</button>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="block">
|
||||
<h3>::_("Waiting list")::</h3>
|
||||
<p>
|
||||
::raw __("There is <b>::waitingList::</b> people on waiting list.",{waitingList:waitingList})::
|
||||
<br/>
|
||||
<a href="/member/waiting" class="btn btn-default btn-sm">::_("Display the list")::</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
::if select!="newusers"::
|
||||
<div class="block">
|
||||
<h3>::_("New members")::</h3>
|
||||
::raw __("There is <b>::newUsers::</b> members who never logged in",{newUsers:newUsers})::
|
||||
<br/>
|
||||
<a href="/member/?select=newusers" class="btn btn-default btn-sm">::_("Display the list")::</a>
|
||||
</div>
|
||||
::end::
|
||||
|
||||
</div>
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,118 @@
|
||||
::use 'design.mtt'::
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="article">
|
||||
<h2>::_("Import")::</h2>
|
||||
|
||||
|
||||
::if step==1::
|
||||
<form action="/member/import/" method="POST" enctype="multipart/form-data">
|
||||
<p>
|
||||
<input name="file" type="file"/>
|
||||
</p>
|
||||
<input type="submit" value="OK" class="btn btn-primary" />
|
||||
</form>
|
||||
::elseif step==2::
|
||||
<h4>::_("Users to import")::</h4>
|
||||
<div style="margin-bottom:24px;">
|
||||
::if (data!=null && data.length>0) || (data2!=null && data2.length>0)::
|
||||
<table class="table table-bordered" style="font-size:11px;background-color:#FFF;">
|
||||
<tr>
|
||||
<th>::_("First name")::</th>
|
||||
<th>::_("Last name")::</th>
|
||||
<th>::_("Email")::</th>
|
||||
<th>::_("Phone")::</th>
|
||||
<th>::_("Partner first name")::</th>
|
||||
<th>::_("Partner last name")::</th>
|
||||
<th>::_("Partner email")::</th>
|
||||
<th>::_("phone")::</th>
|
||||
<th>::_("Address 1")::</th>
|
||||
<th>::_("Address 2")::</th>
|
||||
<th>::_("zip code")::</th>
|
||||
<th>::_("City")::</th>
|
||||
</tr>
|
||||
::foreach d data::
|
||||
<tr>
|
||||
::foreach r d::
|
||||
<td>
|
||||
::if r!=null:: ::r:: ::end::
|
||||
</td>
|
||||
::end::
|
||||
</tr>
|
||||
::end::
|
||||
</table>
|
||||
|
||||
<h4>::_("Existing accounts")::</h4>
|
||||
<table class="table table-bordered" style="font-size:11px;color:#666666;background-color:#FFF;">
|
||||
<tr>
|
||||
<th>::_("First name")::</th>
|
||||
<th>::_("Last name")::</th>
|
||||
<th>::_("Email")::</th>
|
||||
<th>::_("Phone")::</th>
|
||||
<th>::_("Partner first name")::</th>
|
||||
<th>::_("Partner last name")::</th>
|
||||
<th>::_("Partner email")::</th>
|
||||
<th>::_("phone")::</th>
|
||||
<th>::_("Address 1")::</th>
|
||||
<th>::_("Address 2")::</th>
|
||||
<th>::_("zip code")::</th>
|
||||
<th>::_("City")::</th>
|
||||
</tr>
|
||||
::foreach d data2::
|
||||
<tr>
|
||||
::foreach r d::
|
||||
<td>
|
||||
::if r!=null:: ::r:: ::end::
|
||||
</td>
|
||||
::end::
|
||||
</tr>
|
||||
::end::
|
||||
</table>
|
||||
|
||||
<div class="alert alert-error">
|
||||
<b>::_("Warning")::</b>
|
||||
<p>::_("Before validating this import, please check that this table est correctly filled.<br/>If some datas are shifted or are not linked to the right column, please check your CSV file.")::
|
||||
</p>
|
||||
<a href="/member/import">::_("Try again")::</a>
|
||||
</div>
|
||||
<a href="/member/import?confirm=1" class="btn btn-danger">::_("Finalize import")::</a>
|
||||
::else::
|
||||
<div class="alert alert-error">
|
||||
<b>::_("Oups !")::</b>
|
||||
<p>::_("It looks like there is no data to import. Please check your CSV file or check that the users you want to import are not already registred.")::</p>
|
||||
<a href="/member/import">::_("Try again")::</a>
|
||||
</div>
|
||||
|
||||
::end::
|
||||
</div>
|
||||
|
||||
|
||||
::elseif step==3::
|
||||
::if numImported>0::
|
||||
|
||||
<div class="alert alert-success">
|
||||
<b>::raw __("Congratulations ! You just imported <b>::numImported::</b> users in your group.",{numImported:numImported})::</b>
|
||||
</div>
|
||||
<p>
|
||||
::raw _("You may now consider <a href='/member/?select=newusers'>inviting them</a> to log into Cagette.net")::
|
||||
</p>
|
||||
::else::
|
||||
<p>::_("You did'nt import anything in your database because your file was empty, or contained already registred users")::</p>
|
||||
::end::
|
||||
<a href="/member/">::_("Go back to the main page")::</a>
|
||||
|
||||
|
||||
::end::
|
||||
|
||||
</div>
|
||||
|
||||
<div class="block">
|
||||
<h3>::_("Help")::</h3>
|
||||
::raw _("Here you can import a large amount of members in your database from a simple Excel or Libre Office file.<br/><ul><li>The first step is to <a href=\"/adherents.xls\">download this demo file.</a></li><li>Fill out the table, of modify your existing file to striclty match the columns order.</li><li>Once your file is completed, click on \"save as\" in your spreadsheet software, and select \"CSV\" format</li><li>Select the following options : separator : <b>coma</b> or <b>dot-coma</b>, encoding : <b>Unicode UTF-8</b></li><li>Save the file</li><li>finally, click on \"select a file\" on this page and upload it.</li></ul>")::
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,30 @@
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>::_("Date")::</th>
|
||||
<th>::_("Subject")::</th>
|
||||
<th>::_("Status")::</th>
|
||||
</tr>
|
||||
|
||||
::foreach m emails::
|
||||
|
||||
::if m.failure!=null::
|
||||
::set class = "danger"::
|
||||
::else::
|
||||
::set class = "success"::
|
||||
::end::
|
||||
|
||||
<tr class="::class::">
|
||||
<td>::hDate(m.date)::</td>
|
||||
<td>::m.subject::</td>
|
||||
<td>
|
||||
::if m.failure!=null::
|
||||
<span class="glyphicon glyphicon-exclamation-sign"></span> ::m.failure::
|
||||
::else::
|
||||
<span class="glyphicon glyphicon-ok"></span> ::m.success::
|
||||
::end::
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
::end::</table>
|
||||
@@ -0,0 +1,121 @@
|
||||
::use 'design.mtt'::
|
||||
|
||||
<div class="col-md-3">
|
||||
<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::
|
||||
::_("Phone"):: : ::member.phone::<br/>
|
||||
::end::
|
||||
|
||||
::if member.email!=null::
|
||||
::_("Email"):: : <a href="mailto: ::member.email::">::member.email::</a><br/>
|
||||
::end::
|
||||
|
||||
::if member.email2!=null::
|
||||
::_("Email"):: : <a href="mailto: ::member.email2::">::member.email2::</a><br/>
|
||||
::end::
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-9">
|
||||
<h2>::_("Payments")::</h2>
|
||||
<div class="article">
|
||||
<table class="table table-condensed">
|
||||
|
||||
<!-- total -->
|
||||
<tr style="font-size:1.3em;">
|
||||
<td colspan="2"></td>
|
||||
<td class="text-right">::_("Balance"):: :</td>
|
||||
::if balance<0::
|
||||
::set color = "C00"::
|
||||
::else::
|
||||
::set color = "0C0"::
|
||||
::end::
|
||||
<td style="color:#::color::;">
|
||||
::if balance<0::
|
||||
-
|
||||
::end::
|
||||
</td>
|
||||
<td style="color:#::color::;">
|
||||
::Math.abs(balance):: ::currency()::
|
||||
</td>
|
||||
<td colspan="2">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
::foreach t rb.current()::
|
||||
<tr>
|
||||
$$operation(::t::)
|
||||
<td>
|
||||
::if t.type==2::
|
||||
<div class="btn-group" role="group">
|
||||
$$edit(::_("Edit")::,/transaction/edit/::t.id::)
|
||||
$$delete(::_("Del.")::,/transaction/delete/::t.id::?token=::token::)
|
||||
</div>
|
||||
::elseif isAdmin::
|
||||
<a href="/transaction/delete/::t.id::?token=::token::" $$confirm(::_("Delete ?")::) class="btn btn-danger btn-sm" >
|
||||
<span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
|
||||
</a>
|
||||
::end::
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
::end::
|
||||
|
||||
<tr>
|
||||
<th colspan="6" class="text-center">
|
||||
<ul class="pagination">
|
||||
::if rb.paginationStartPage != 1::
|
||||
<li>
|
||||
<a href="?page=::rb.paginationStartPage-1::">
|
||||
<span class="glyphicon glyphicon-backward"></span>
|
||||
</a>
|
||||
</li>
|
||||
::end::
|
||||
::foreach i loopList(rb.paginationStartPage,rb.paginationEndPage)::
|
||||
::if rb.page==i::
|
||||
<li class="active" ><a href="?page=::i::">::i::</a></li>
|
||||
::else::
|
||||
<li><a href="?page=::i::">::i::</a></li>
|
||||
::end::
|
||||
::end::
|
||||
::if rb.paginationEndPage < rb.pages + 1::
|
||||
<li>
|
||||
<a href="?page=::rb.paginationEndPage::">
|
||||
<span class="glyphicon glyphicon-forward"></span>
|
||||
</a>
|
||||
</li>
|
||||
::end::
|
||||
</ul>
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
$$insert(::_("Insert a payement")::,/transaction/insertPayment/::member.id::)
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,223 @@
|
||||
::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:: ::currency()::</td>
|
||||
<td>::p.subTotal:: ::currency()::</td>
|
||||
<td>
|
||||
<!-- frais -->
|
||||
::if p.percentageValue!=null::
|
||||
<a href="#" data-toggle="tooltip" data-placement="top" title="::p.percentageName:: : ::p.percentageValue:: %">
|
||||
::formatNum(p.fees):: ::currency()::
|
||||
</a>
|
||||
::end::
|
||||
</td>
|
||||
<td>
|
||||
<!-- total -->
|
||||
::formatNum(p.total):: ::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):: ::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::
|
||||
@@ -0,0 +1,47 @@
|
||||
::use 'design.mtt'::
|
||||
<div class="col-md-12">
|
||||
<div class="article">
|
||||
|
||||
<h2>::_("Waiting list")::</h2>
|
||||
|
||||
<table class="table">
|
||||
|
||||
<tr>
|
||||
<th>::_("Name")::</th>
|
||||
<th>::_("Email")::</th>
|
||||
<th>::_("Phone")::</th>
|
||||
<th>::_("Registration date")::</th>
|
||||
<th>::_("Message")::</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
::foreach w waitingList::
|
||||
<tr>
|
||||
::set u = w._user::
|
||||
|
||||
<td>::u.getName()::</td>
|
||||
<td>::u.email::</td>
|
||||
<td>$$nullSafe(::u.phone::)</td>
|
||||
<td>::hDate(w.date)::</td>
|
||||
<td>"::w.message::"</td>
|
||||
<td class="col-md-4">
|
||||
<a href="/member/waiting?add=::u.id::" class="btn btn-primary btn-sm">
|
||||
<span class="glyphicon glyphicon-ok"></span>
|
||||
::_("Accept membership request")::
|
||||
</a>
|
||||
|
||||
<a href="/member/waiting?remove=::u.id::" class="btn btn-default btn-sm">
|
||||
<span class="glyphicon glyphicon-remove"></span>
|
||||
::_("Deny request")::</a>
|
||||
</td>
|
||||
</tr>
|
||||
::end::
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,32 @@
|
||||
::use 'design.mtt'::
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="article">
|
||||
<h2>::_("Subscription payment of"):: ::member.getCoupleName()::</h2>
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th>::_("Period")::</th>
|
||||
<th>::_("Subscription payment date")::</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
::foreach m memberships::
|
||||
<tr>
|
||||
<td>::user._amap.getPeriodNameFromYear(m.year)::</td>
|
||||
<td>::hDate(m.date)::</td>
|
||||
<td>
|
||||
$$delete(::_("Delete")::,/membership/delete/::member.id::/::m.year::?token=::token::)
|
||||
</td>
|
||||
</tr>
|
||||
::end::
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="article">
|
||||
<h2>::_("Key-in a subscription payment")::</h2>
|
||||
::raw form::
|
||||
</div>
|
||||
</div>
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,55 @@
|
||||
::use 'design.mtt'::
|
||||
|
||||
<!--<script src="/js/tinymce.min.js"></script>
|
||||
<script src="/js/jquery.tinymce.min.js"></script>-->
|
||||
|
||||
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="article">
|
||||
::if user.isAmapManager()::
|
||||
<b>::_("All sent messages")::</b>
|
||||
|
||||
::else::
|
||||
<b>::_("Last sent messages")::</b>
|
||||
::end::
|
||||
<div style="overflow-y:scroll;height:600px;">
|
||||
::foreach m sentMessages::
|
||||
<a href="/messages/message/::m.id::">::m.title::
|
||||
<div style="color:#666;font-size:11px;border-bottom:1px solid #DDD;">::hDate(m.date)::</div>
|
||||
</a>
|
||||
::end::
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-9">
|
||||
<div class="article">
|
||||
<h3>::_("Send an e-mail")::</h3>
|
||||
|
||||
::raw form::
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/js/tinymce/tinymce.min.js"></script>
|
||||
<script>
|
||||
tinymce.init({
|
||||
selector:'textarea',
|
||||
plugins: "autolink textcolor emoticons image",
|
||||
toolbar: "styleselect bold italic alignleft aligncenter emoticons image bullist outdent indent forecolor",
|
||||
language: '::session.lang::',
|
||||
image_list: [
|
||||
::foreach c user._amap.getActiveContracts(false)::
|
||||
::if c._vendor._image!=null::
|
||||
{title: '::escapeJS(c._vendor.name)::', value: '::file(c._vendor._image)::'},
|
||||
::end::
|
||||
::end::
|
||||
]
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,77 @@
|
||||
::use 'design.mtt'::
|
||||
<div class="col-md-12">
|
||||
<div class="article">
|
||||
|
||||
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td>::_("Subject:")::</td>
|
||||
<td>::msg.title::</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>::_("Sent on the")::</td>
|
||||
<td>::hDate(msg.date)::</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>::_("Sender")::</td>
|
||||
<td>
|
||||
::if msg._sender==null::
|
||||
inconnu
|
||||
::else::
|
||||
::msg._sender.firstName:: ::msg._sender.lastName::
|
||||
::end::
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>::_("Receiver(s)")::</td>
|
||||
<td>
|
||||
::if list!=null::
|
||||
::list::
|
||||
::else::
|
||||
::msg._recipients::
|
||||
::end::
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>::_("Status")::</td>
|
||||
<td>
|
||||
<div style="max-height:200px;overflow-y:auto;">
|
||||
<table class="table table-condensed" style="width:auto;">
|
||||
::foreach m status::
|
||||
|
||||
|
||||
::if m.failure!=null::
|
||||
<tr class="danger">
|
||||
<td>::m.email::</td>
|
||||
<td>::m.failure::</td>
|
||||
</tr>
|
||||
|
||||
::else::
|
||||
<tr class="success">
|
||||
<td>::m.email::</td>
|
||||
<td>::m.success::</td>
|
||||
</tr>
|
||||
::end::
|
||||
|
||||
::end::
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>::raw msg.body::</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<a href="/messages" class="btn btn-default">::_("Back")::</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,25 @@
|
||||
::use "design.mtt"::
|
||||
|
||||
<div class="col-md-9">
|
||||
<div class="article" style="height:500px;">
|
||||
|
||||
<iframe width="100%" height="480" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?q=::addr::&output=embed"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="article" style="height:500px;font-size:1.2em;">
|
||||
|
||||
<strong>::place.name::</strong><br/>
|
||||
$$nullSafe(::place.address1::)<br/>
|
||||
$$nullSafe(::place.address2::)<br/>
|
||||
$$nullSafe(::place.zipCode::) $$nullSafe(::place.city::)
|
||||
<div>
|
||||
<a href="/" class="btn btn-default btn-sm">::_("Back")::</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
::end::
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
::use 'contractadmin/design.mtt'::
|
||||
|
||||
|
||||
<h2>::_("Import a photo of the product")::</h2>
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<form action="" method="POST" enctype="multipart/form-data">
|
||||
<input name="image" type="file" class="btn btn-default"/>
|
||||
|
||||
<br/>
|
||||
::_("Size of the photo: 300 x 300px"):: <br/>
|
||||
::_("Format : JPEG"):: <br/>
|
||||
<br/>
|
||||
|
||||
<input type="submit" value="::_("Send")::" class="btn btn-primary" />
|
||||
</form>
|
||||
<br/>
|
||||
<a href="/contractAdmin/products/::c.id::" class="btn btn-default btn-xs">::_("Back to the management of products")::</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6" ::cond image!=null:: >
|
||||
|
||||
<img src="::file(image)::" class="img-thumbnail" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,57 @@
|
||||
::use 'contractadmin/design.mtt'::
|
||||
|
||||
<h3>::_("Categories")::</h3>
|
||||
|
||||
<p>
|
||||
::raw _("You can link your products to categories, in order to better organize them in the \"shop mode\".<br/><b>To add categories: </b>select checkboxes of products and then select a category in the list at the bottom of the page. Click then on \"add\".<br /><b>To remove a category:<b/> click on it.")::
|
||||
</p>
|
||||
|
||||
<script language="javascript">
|
||||
var tagger;
|
||||
$(function(){
|
||||
tagger = _.getTagger(::c.id::);
|
||||
tagger.init();
|
||||
});
|
||||
|
||||
var check = function(){
|
||||
var inputs = document.querySelectorAll('#tagger input');
|
||||
var value = inputs[0].checked==true;
|
||||
for ( i of inputs ) {
|
||||
i.checked = !value;
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="tagger">
|
||||
<!-- filled by ajax -->
|
||||
</div>
|
||||
|
||||
<form class="form-inline">
|
||||
|
||||
<a onClick="check();" class='btn btn-default btn-noAntiDoubleClick'>::_("Select all")::</a>
|
||||
|
||||
<select name="tag" id="tag" class="form-control">
|
||||
|
||||
::foreach cg user._amap.getCategoryGroups()::
|
||||
<optgroup label="::cg.name::">
|
||||
::foreach cat cg.categs::
|
||||
<option value="::cat.id::">::cat.name::</option>
|
||||
::end::
|
||||
</optgroup>
|
||||
::end::
|
||||
|
||||
</select>
|
||||
|
||||
<a onClick="tagger.add()" class='btn btn-default'><span class="glyphicon glyphicon-plus" aria-hidden="true"></span> ::_("Add the category")::</a>
|
||||
<a onClick="tagger.submit()" class='btn btn-success'>::_("Save modifications")::</a>
|
||||
|
||||
</form>
|
||||
|
||||
<div ::cond user.isAmapManager()::>
|
||||
<hr />
|
||||
<a href="/amapadmin/categories/" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-edit" aria-hidden="true"></span> ::_("Manage categories")::</a>
|
||||
</div>
|
||||
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,20 @@
|
||||
::use 'design.mtt'::
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="article">
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="app"></div>
|
||||
|
||||
|
||||
<script language="javascript">
|
||||
_.getProductComposer();
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,111 @@
|
||||
::use 'design.mtt'::
|
||||
|
||||
<div class="span12">
|
||||
<div class="article">
|
||||
<h2>::_("Import products")::</h2>
|
||||
|
||||
::if step==1::
|
||||
|
||||
<form action="/product/import/::contract.id::" method="POST" enctype="multipart/form-data">
|
||||
<p>
|
||||
<input name="file" type="file"/>
|
||||
</p>
|
||||
<p>
|
||||
<input type="submit" class="btn btn-primary" value="::_("Import")::"/>
|
||||
</p>
|
||||
</form>
|
||||
|
||||
::elseif step==2::
|
||||
|
||||
<h4>Produits à importer</h4>
|
||||
<div style="margin-bottom:24px;">
|
||||
::if !csv.isEmpty()::
|
||||
|
||||
<table class="table table-bordered" style="/*font-size:11px;*/background-color:#FFF;">
|
||||
|
||||
<tr>
|
||||
::foreach h csv.getHeaders()::
|
||||
<th>::_(h)::</th>
|
||||
::end::
|
||||
</tr>
|
||||
|
||||
::foreach d csv.getDatas()::
|
||||
<tr>
|
||||
::foreach r d::
|
||||
<td>
|
||||
::if r!=null:: ::r:: ::end::
|
||||
</td>
|
||||
::end::
|
||||
</tr>
|
||||
::end::
|
||||
</table>
|
||||
<div class="alert alert-error">
|
||||
<b>::_("Warning")::</b>
|
||||
<p>
|
||||
::raw _("Before validating the import, please check if the table above is correctly filled.<br/>If data are not in line or not corresponding to the right column, it means that your CSV file is not correct.")::
|
||||
</p>
|
||||
<a href="/product/import/::contract.id::">Recommencer</a>
|
||||
</div>
|
||||
<a href="/product/import/::contract.id::?confirm=1" class="btn btn-danger">::_("Import these products in the database")::</a>
|
||||
::else::
|
||||
|
||||
<div class="alert alert-error">
|
||||
<b>::_("Ouch!")::</b>
|
||||
<p>::_("It seems that there is no data to import.")::</p>
|
||||
<a href="/product/import/::contract.id::">Recommencer</a>
|
||||
</div>
|
||||
|
||||
::end::
|
||||
</div>
|
||||
|
||||
<!--<div ::cond data2.length > 0:: >
|
||||
|
||||
<h4>::_("Products already available in the database")::</h4>
|
||||
<table class="table" style="font-size:11px;color:#666666;background-color:#FFF;">
|
||||
<tr>
|
||||
<th>::_("Name")::</th>
|
||||
<th>::_("Price")::</th>
|
||||
</tr>
|
||||
::foreach d data2::
|
||||
<tr>
|
||||
::foreach r d::
|
||||
<td>
|
||||
::if r!=null:: ::r:: ::end::
|
||||
</td>
|
||||
::end::
|
||||
</tr>
|
||||
::end::
|
||||
</table>
|
||||
</div>-->
|
||||
::elseif step==3::
|
||||
::if numImported>0::
|
||||
|
||||
<div class="alert alert-success">
|
||||
<b>::__("Congratulations! You have imported ::num:: products in your database", {num:numImported})::</b>
|
||||
</div>
|
||||
|
||||
::else::
|
||||
<p>::_("You did not import anything in your database because your file was empty or contained products already present in the database.")::</p>
|
||||
::end::
|
||||
<a href="/contractAdmin/products/::contract.id::">::_("Back to the management of products")::</a>
|
||||
|
||||
|
||||
::end::
|
||||
</div>
|
||||
|
||||
<div class="block">
|
||||
<h3>::_("Help")::</h3>
|
||||
::_("This page will allow you to import a large number of products in your database from an Excel file.")::
|
||||
<br/>
|
||||
<ul>
|
||||
<li>::raw _("To start, <a href=\"/produits.xls\">Download this demo file</a>")::</li>
|
||||
<li>::raw _("Fill correctly this file, or modify your existing file to respect strictly the order of columns")::</li>
|
||||
<li>::raw _("When your file is ready, click on\"Save as\" in your Excel sheet and choose the format CSV")::</li>
|
||||
<li>::raw _("Choose the following options: separation characters: <b>comma</b>, encoding: <b>Unicode UTF8<b/>"):: </li>
|
||||
<li>::raw _("Save your file")::</li>
|
||||
<li>::raw _("Then click on the button above \"Choose a file\" and send your file"):: </li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
::end::
|
||||
@@ -0,0 +1,108 @@
|
||||
::use 'design.mtt'::
|
||||
<div class="col-md-12">
|
||||
|
||||
<h2 style="margin:auto;">::_("Choose a delivery")::</h2>
|
||||
|
||||
<div class="row">
|
||||
|
||||
::if distribs.length==0::
|
||||
<div class="alert alert-danger" class="col-md-12">
|
||||
::_("There is currently no delivery planned.")::
|
||||
</div>
|
||||
::end::
|
||||
|
||||
::foreach d distribs::
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="distrib">
|
||||
::set active =""::
|
||||
::if d.active==false:: ::set active="disabled":: ::end::
|
||||
|
||||
<div class="header ::active::">
|
||||
|
||||
::set s = getDate( d.startDate)::
|
||||
|
||||
<div class="date" style="float:left;width:100px;">
|
||||
<div>::s.dow::</div>
|
||||
<div style="font-size:28px;color:#990000;">::s.d::</div>
|
||||
<div>::s.m::</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="info">
|
||||
|
||||
::set e = getDate(d.endDate)::
|
||||
<span class="glyphicon glyphicon-time"></span> de ::s.h+":"+s.i:: à ::e.h+":"+e.i::
|
||||
</div>
|
||||
|
||||
|
||||
::if d.place!=null::
|
||||
<div class="info">
|
||||
<span class="glyphicon glyphicon-map-marker"></span> <a href="/place/view/::d.place.id::">::d.place::</a>
|
||||
</div>
|
||||
<div class="address">
|
||||
$$nullSafe(::d.place.address1::)
|
||||
$$nullSafe(::d.place.address2::)
|
||||
$$nullSafe(::d.place.zipCode::)
|
||||
$$nullSafe(::d.place.city::)
|
||||
|
||||
</div>
|
||||
::end::
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="content">
|
||||
|
||||
<div class="row">
|
||||
::foreach p d.products::
|
||||
|
||||
|
||||
<div class="col-md-3" data-toggle="tooltip" data-placement="top" title="::p.name::" >
|
||||
<img class="img-responsive" src="::p.image::" style="height:80px;width:80px;margin:4px;"/>
|
||||
</div>
|
||||
|
||||
|
||||
::end::
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="footer" style="text-align:right;">
|
||||
|
||||
::if d.active==true::
|
||||
<a href="/shop/::d.place.id::/::d.startDate.toString().substr(0,10)::" class="btn btn-primary">
|
||||
<span class="glyphicon glyphicon-chevron-right"></span>
|
||||
::_("Order")::
|
||||
</a>
|
||||
::else::
|
||||
|
||||
<span class="glyphicon glyphicon-close"></span>
|
||||
::_("Opening of orders")::<br/>
|
||||
le ::hDate(d.startDate)::
|
||||
|
||||
::end::
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
::end::
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,205 @@
|
||||
::use 'design.mtt'::
|
||||
<div class="col-md-9">
|
||||
|
||||
<div class="shop">
|
||||
<!-- 2018-09-27 -->
|
||||
|
||||
<div style="display:none;">
|
||||
::if(contracts!=null)::
|
||||
::foreach c contracts::
|
||||
::c.name::
|
||||
::end::
|
||||
::end::
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
|
||||
<div style="float:right;text-align:right;">
|
||||
::if place!=null::
|
||||
<span class="info">
|
||||
<span class="glyphicon glyphicon-map-marker"></span> <a href="/place/view/::place.id::">::place::</a>
|
||||
</span>
|
||||
::end::
|
||||
|
||||
::if place!=null::
|
||||
<div class="address">
|
||||
$$nullSafe(::place.address1::)
|
||||
$$nullSafe(::place.address2::)
|
||||
$$nullSafe(::place.zipCode::)
|
||||
$$nullSafe(::place.city::)
|
||||
</div>
|
||||
::end::
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
::set hdate = hDate(date)::
|
||||
<div class="info" style="font-size:1.2em;">::__("Distribution on ::date::",{date:hdate})::</div>
|
||||
|
||||
|
||||
<div class="">
|
||||
<span class="info">
|
||||
<span class="glyphicon glyphicon-time"></span> ::_("Orders will close on")::
|
||||
</span>
|
||||
::if ArrayTool.mapLength(infos) == 1::
|
||||
::hDate( infos.iterator().next()[0].orderEndDate )::
|
||||
::else::
|
||||
<ul>
|
||||
::foreach k infos.keys()::
|
||||
<li>
|
||||
::set dists = infos.get(k)::
|
||||
|
||||
::if dists.length==1::
|
||||
::dists[0]._contract.name::
|
||||
::else::
|
||||
::set tt = ""::
|
||||
::foreach d dists::
|
||||
::set tt = tt + d._contract.name + ". "::
|
||||
::end::
|
||||
<span data-toggle="tooltip" title="::tt::" style="text-decoration:underline;">::_("Autres")::</span>
|
||||
::end::
|
||||
|
||||
: ::hDate(Date.fromString(k))::
|
||||
</li>
|
||||
::end::
|
||||
</ul>
|
||||
::end::
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="body">
|
||||
|
||||
<script language="javascript">
|
||||
var cart;
|
||||
$(function(){
|
||||
cart = _.getCart();
|
||||
cart.init("::place.id::","::date.toString().substr(0,10)::");
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="row">
|
||||
::foreach p products::
|
||||
<div class="col-xs-12 col-sm-6 col-lg-4 product product::p.id::" style="display:none;">
|
||||
|
||||
::set popup = "_.overlay('/shop/productInfo/" + p.id + "?distribution=" + p.distributionId + "','" + urlEncode(p.name) +"')"::
|
||||
|
||||
<table class="product">
|
||||
<tr>
|
||||
<td>
|
||||
<a onclick="::popup::" data-toggle="tooltip" data-placement="top" title="::_('Read more')::">
|
||||
<div style="background-image:url('::p.image::')" class="productImg" style="width:64px;height:64px;"/>
|
||||
</a>
|
||||
|
||||
<div>
|
||||
::if p.organic:: <img src="/img/AB.png"/> ::end::
|
||||
::if p.variablePrice:: <img src="/img/weight.png"/> ::end::
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<a onclick="::popup::" class="productName">
|
||||
::p.name::
|
||||
::if p.qt!=null && p.unitType!=null && p.qt>0::
|
||||
::p.qt:: ::unit(p.unitType,p.qt>1)::
|
||||
::end::
|
||||
</a>
|
||||
|
||||
<div class="price">::formatNum(p.price):: ::currency()::</div>
|
||||
|
||||
::if p.variablePrice::
|
||||
<div style="font-size:0.8em;font-weight:bold;">
|
||||
<div class="vat">::raw pricePerUnit(p.price,p.qt,p.unitType)::</div>
|
||||
</div>
|
||||
::end::
|
||||
|
||||
<div>
|
||||
<form class="form-inline">
|
||||
::if p.stock!=null && p.stock==0::
|
||||
<span style="color:#AAA;">::_("Out of stock")::</span>
|
||||
::elseif !p.orderable::
|
||||
<span style="color:#AAA;">::_("Order closed")::</span>
|
||||
::else::
|
||||
::if p.stock!=null && p.stock>0 && p.stock<=10::
|
||||
<div class="warning" >::__("Only ::pstock:: items in stock",{pstock:p.stock})::</div>
|
||||
::end::
|
||||
|
||||
<div class="input-group">
|
||||
<input id="productQt::p.id::" type="text" value="1" style="height: 25px;width:35px;" class="form-control input-sm" maxlength="4" data-toggle="tooltip" data-placement="top" title="::_('Quantity')::"/>
|
||||
<span class="input-group-btn">
|
||||
<a class="btn btn-default btn-xs" onclick="cart.add(::p.id::)">::_("Order||Order button")::</a>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
::end::
|
||||
</form>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
::end::
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-3" id="cartContainer">
|
||||
|
||||
|
||||
<div class="cartDiv">
|
||||
|
||||
<h3>
|
||||
<span class="glyphicon glyphicon-shopping-cart"></span>
|
||||
::_("My order")::
|
||||
<img id="loader" src="/img/loader.gif"/>
|
||||
</h3>
|
||||
<div id="cart"></div>
|
||||
|
||||
<a onClick="cart.submit();" class="btn btn-default">
|
||||
::if(user==null)::
|
||||
::_("Sign up and validate the order")::
|
||||
::else::
|
||||
::_("Validate")::
|
||||
::end::
|
||||
</a>
|
||||
|
||||
<a class="infos" href='/contract'>::_("You can check your previous orders in 'my account' section")::</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="article">
|
||||
<span class="tag active" id="tag0" onclick="cart.filter(0);" style="cursor:pointer;"><span class="glyphicon glyphicon-ok"></span> ::_("All products")::</span><br/>
|
||||
|
||||
::foreach g group.getCategoryGroups()::
|
||||
<div>
|
||||
<h4>::g.name::</h4>
|
||||
::foreach c g.categs::
|
||||
<span class="tag" id="tag::c.id::" onclick="cart.filter(::c.id::);" style="background-color: ::g.color::;cursor:pointer;">::c.name::</span><br/>
|
||||
::end::
|
||||
</div>
|
||||
::end::
|
||||
|
||||
</div>
|
||||
|
||||
<!-- additionnal blocks from plugins -->
|
||||
::if blocks!=null::
|
||||
::foreach b blocks::
|
||||
<div class="block">
|
||||
<h3>::b.title::</h3>
|
||||
<p>::raw b.html::</p>
|
||||
</div>
|
||||
::end::
|
||||
::end::
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,8 @@
|
||||
::use 'design.mtt'::
|
||||
<div id='shop'></div>
|
||||
<script>
|
||||
$(function(){
|
||||
_.shop(::place.id::, "::date::");
|
||||
});
|
||||
</script>
|
||||
::end::
|
||||
@@ -0,0 +1,43 @@
|
||||
::use 'design.mtt'::
|
||||
|
||||
<div class="col-md-3"></div>
|
||||
<div class="col-md-6" style="height:400px;"> <!--
|
||||
<div class="panel panel-success">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">::_("Connection")::</h3>
|
||||
</div>
|
||||
|
||||
<div class="panel-body text-center">
|
||||
<p>
|
||||
::raw _("In order to confirm your basket, <br/>You need to authenticate.")::
|
||||
</p>
|
||||
<hr/>
|
||||
<a href="#" onclick="_.loginBox('::raw redirect::');" class="btn btn-primary" style="margin-right:12px;">
|
||||
<span class="glyphicon glyphicon-user"></span> ::_("Connection")::</a>
|
||||
|
||||
<a href="#" onclick="_.registerBox('::raw redirect::',::phoneRequired::);" class="btn btn-success">
|
||||
<span class="glyphicon glyphicon-chevron-right"></span> ::_("Sign up")::</a>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
<div class="col-md-3"></div>
|
||||
|
||||
::if(group!=null && group.hasPhoneRequired())::
|
||||
::set phoneRequired=true::
|
||||
::else::
|
||||
::set phoneRequired=false::
|
||||
::end::
|
||||
|
||||
<script language="javascript">
|
||||
::if(register==true)::
|
||||
$(function(){
|
||||
_.registerBox('::raw redirect::','::raw message::',::phoneRequired::);
|
||||
});
|
||||
::else::
|
||||
$(function(){
|
||||
_.loginBox('::raw redirect::','::raw message::',::phoneRequired::);
|
||||
});
|
||||
::end::
|
||||
|
||||
</script>
|
||||
::end::
|
||||
@@ -0,0 +1,111 @@
|
||||
<!-- this tpl is also used for offer previews -->
|
||||
|
||||
<div class="article">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-5">
|
||||
<img src="::p.image::" class="img-thumbnail img-responsive" />
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
|
||||
<span class="price">::formatNum(p.price):: ::currency():: ::_("incl. VAT")::</span>
|
||||
|
||||
::if (p.vat!=null && p.vat!=0) || p.contractTax!=0::
|
||||
<div class="vat">
|
||||
|
||||
::if p.vat!=null && p.vat!=0::
|
||||
::p.vat:: ::_("VAT included")::<br/>
|
||||
::end::
|
||||
|
||||
::if p.contractTax!=null::
|
||||
::p.contractTax:: % ::p.contractTaxName:: ::_("included")::<br/>
|
||||
::end::
|
||||
</div>
|
||||
::end::
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
::if p.unitType!=null && p.qt!=null::
|
||||
|
||||
<span class="price">
|
||||
::set qt = formatNum(p.qt)::
|
||||
::set u = unit(p.unitType,qt>1)::
|
||||
|
||||
::if(p.variablePrice)::
|
||||
::__("about ::qt:: ::unit::||product has a variable weight",{qt:qt,unit:u})::
|
||||
::else::
|
||||
::qt:: ::u::
|
||||
::end::
|
||||
</span>
|
||||
|
||||
<div class="vat">::raw pricePerUnit(p.price,p.qt,p.unitType)::</div>
|
||||
|
||||
::end::
|
||||
</div>
|
||||
|
||||
<div class="col-md-7" style="margin-top:24px;">
|
||||
|
||||
<p ::cond p.organic:: class="vat">
|
||||
<img src="/img/AB.png" /> ::_("Organic agriculture")::
|
||||
</p>
|
||||
|
||||
<p ::cond p.variablePrice:: class="vat">
|
||||
<img src="/img/weight.png"/> ::_("Variable price depending on weight")::
|
||||
</p>
|
||||
|
||||
<p ::cond p.desc!=null::>
|
||||
::raw p.desc::
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div ::cond vendor._image!=null:: class="col-md-3">
|
||||
<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;height:150px;overflow-y: scroll;">
|
||||
::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>
|
||||
|
||||
::if(product!=null)::
|
||||
::set cats = product.getCategories()::
|
||||
<div class="col-md-4" ::cond cats.length != 0:: >
|
||||
<h3>::_("Categories")::</h3>
|
||||
<div>
|
||||
::foreach c cats::
|
||||
<span class="tag" style="background-color: ::c.getColor()::;">::c.name::</span><br />
|
||||
::end::
|
||||
</div>
|
||||
</div>
|
||||
::end::
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,30 @@
|
||||
::use 'design.mtt'::
|
||||
|
||||
<div class="col-md-3">
|
||||
<ul class="nav nav-tabs nav-stacked" >
|
||||
<li><a style="background-color:#FFF;" href="#">::_("Products")::</a></li>
|
||||
<li><a style="background-color:#FFF;" href="#">::_("Products")::</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-9">
|
||||
<div class="article">
|
||||
|
||||
<span class="title" style="margin-bottom: 18px;display: block;">titre</span>
|
||||
|
||||
|
||||
<div class="span4">
|
||||
|
||||
blabla
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,35 @@
|
||||
::use 'design.mtt'::
|
||||
<div class="col-md-12">
|
||||
<div class="article text-center">
|
||||
|
||||
|
||||
<div class="alert alert-success" style="font-size: 1.6em;font-weight: bold;">
|
||||
|
||||
<i class="fa fa-check" aria-hidden="true"></i> ::_("Your order has been recorded !")::
|
||||
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
||||
|
||||
<div style="margin:32px;">
|
||||
|
||||
<p>
|
||||
<b>::_("You chose to pay by cash at the product distribution"):: :</b>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
::_("Please prepare the following amount for the distribution :"):: : <b>::formatNum(amount):: ::currency()::</b>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/contract" class="btn btn-default">
|
||||
<span class="glyphicon glyphicon-chevron-right"></span> ::_("Check my orders")::</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
::end::
|
||||
@@ -0,0 +1,42 @@
|
||||
::use 'design.mtt'::
|
||||
<div class="col-md-12">
|
||||
<div class="article text-center">
|
||||
|
||||
|
||||
<div class="alert alert-success" style="font-size: 1.6em;font-weight: bold;">
|
||||
|
||||
<i class="fa fa-check" aria-hidden="true"></i> ::_("Your order has been recorded !")::
|
||||
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
||||
|
||||
<div style="margin:32px;">
|
||||
|
||||
<p>
|
||||
<b>::_("You chose to pay by check at the product distribution"):: :</b>
|
||||
</p>
|
||||
|
||||
|
||||
<p>
|
||||
::raw __("Prepare a check of <b>::amount:: ::currency::</b> payable to : <b>::checkOrder::</b>",{checkOrder:user._amap.checkOrder,amount:formatNum(amount),currency:currency()})::
|
||||
</p>
|
||||
<p>
|
||||
::_("Mention this reference at the back of the check in order to facilitate its process:"):: <br/>
|
||||
<span style="font-size:1.3em;margin:12px;">::code::</span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
||||
<a href="/contract" class="btn btn-default">
|
||||
<span class="glyphicon glyphicon-chevron-right"></span> ::_("Check my orders")::</a>
|
||||
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
::end::
|
||||
@@ -0,0 +1,42 @@
|
||||
::use 'design.mtt'::
|
||||
<div class="col-md-12">
|
||||
<div class="article text-center">
|
||||
|
||||
|
||||
<div class="alert alert-success" style="font-size: 1.6em;font-weight: bold;">
|
||||
|
||||
<i class="fa fa-check" aria-hidden="true"></i> ::_("Your order has been recorded !")::
|
||||
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
||||
|
||||
<div style="margin:32px;">
|
||||
|
||||
<p>
|
||||
<b>::_("You chose to pay with your money pot."):: :</b>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
::_("Please remember to clear your balance at the time agreed with the coordinator of your group.")::
|
||||
</p>
|
||||
|
||||
<p>
|
||||
::__("Your current balance is : ::balance:: ::currency::",{balance: balance,currency: currency() })::
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/contract" class="btn btn-default">
|
||||
<span class="glyphicon glyphicon-chevron-right"></span> ::_("Check my orders")::</a>
|
||||
|
||||
<a href="/account/payments" class="btn btn-default">
|
||||
<span class="glyphicon glyphicon-chevron-right"></span> ::_("Check my payments history")::</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
::end::
|
||||
@@ -0,0 +1,60 @@
|
||||
::use 'design.mtt'::
|
||||
<div class="col-md-12">
|
||||
<div class="article text-center">
|
||||
|
||||
<h2>::_("Order payment")::</h2>
|
||||
|
||||
<!--<div>
|
||||
::_("Your current balance is"):: <b>::ua.balance::</b>
|
||||
</div> -->
|
||||
|
||||
<div style="font-size:120%;">
|
||||
<p>
|
||||
::_("Amount to pay"):: : <b>::formatNum(amount):: ::currency()::</b>
|
||||
</p>
|
||||
<p>
|
||||
::_("Your basket has been recorded, please select a payment method to confirm it.")::
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
::if(paymentTypes==null || paymentTypes.length==0)::
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-danger">
|
||||
::_("Currently no payment method has been defined for this group.")::
|
||||
</div>
|
||||
</div>
|
||||
::end::
|
||||
|
||||
|
||||
::foreach p paymentTypes::
|
||||
<div class="col-md-4">
|
||||
::if(p.type != "moneypot" || allowMoneyPotWithNegativeBalance || futurebalance >= 0)::
|
||||
::set class = "clickable"::
|
||||
::set href = p.link::
|
||||
::else::
|
||||
::set class = "clickable disabled"::
|
||||
::set href = "#"::
|
||||
::set warning = _("You do not have sufficient funds to pay this order with your money pot.")::
|
||||
::end::
|
||||
<a class="::class::" href="::href::" style="min-height:120px;vertical-align:middle;">
|
||||
<h3>::p.name::</h3>
|
||||
::raw p.icon::
|
||||
::if( warning )::
|
||||
<br/>::warning::
|
||||
::end::
|
||||
</a>
|
||||
</div>
|
||||
|
||||
::end::
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,40 @@
|
||||
::use 'design.mtt'::
|
||||
<div class="col-md-12">
|
||||
<div class="article text-center">
|
||||
|
||||
<div class="alert alert-success" style="font-size: 1.6em;font-weight: bold;">
|
||||
|
||||
<i class="fa fa-check" aria-hidden="true"></i> ::_("Your order has been recorded !")::
|
||||
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
||||
<div style="margin:32px;">
|
||||
|
||||
<p>
|
||||
<b>::_("You chose to pay by transfer"):: :</b>
|
||||
</p>
|
||||
<p>
|
||||
::_("Please make a transfer of")::
|
||||
<b>::formatNum(amount):: ::currency()::</b>
|
||||
|
||||
::_("to the following bank account:")::<br/>
|
||||
::_("IBAN:"):: <b>::user._amap.IBAN::</b>
|
||||
</p>
|
||||
<p>
|
||||
::_("Mention this reference in the label of the transfer in order to facilitate its process:")::<br/>
|
||||
<span style="font-size:1.3em;margin:12px;">::code::</span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="/contract" class="btn btn-default">
|
||||
<span class="glyphicon glyphicon-chevron-right"></span> ::_("Check my orders")::</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
::end::
|
||||
@@ -0,0 +1,81 @@
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<td>Operation ID</td>
|
||||
<td>::op.id::</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Name</td>
|
||||
<td>::op.name::</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Data</td>
|
||||
<td>::op._data::</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Infos</td>
|
||||
<td>
|
||||
|
||||
::if infos!=null::
|
||||
::foreach h infos.HPAY::
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<td>ID</td><td>::h.ID::</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DATE</td><td>::h.DATE::</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>SEN</td><td>::h.SEN::</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>REC</td><td>::h.REC::</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DEB</td><td>::h.DEB::</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CRED</td><td>::h.CRED::</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>REFUND</td><td>::h.REFUND::</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>COM</td><td>::h.COM::</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MSG</td><td>::h.MSG::</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>STATUS</td><td>::h.STATUS::</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>EXTRA</td>
|
||||
<td>
|
||||
IS3DS : ::h.EXTRA.IS3DS::<br/>
|
||||
CTRY : ::h.EXTRA.CTRY::<br/>
|
||||
AUTH : ::h.EXTRA.AUTH::<br/>
|
||||
NUM : ::h.EXTRA.NUM::<br/>
|
||||
EXP : ::h.EXTRA.EXP::<br/>
|
||||
TYP : ::h.EXTRA.TYP::<br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>INT_MSG</td><td>::h.INT_MSG::</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MLABEL</td><td>::h.MLABEL::</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>INT_STATUS</td><td>::h.INT_STATUS::</td>
|
||||
</tr>
|
||||
</table>
|
||||
::end::
|
||||
::end::
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
::use 'design.mtt'::
|
||||
|
||||
<div class="col-md-12">
|
||||
<h2>::_("Hello")::
|
||||
::if whichUser()==0::
|
||||
::user.firstName::
|
||||
::else::
|
||||
::user.firstName2::
|
||||
::end::
|
||||
!
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12" ::cond pros!=null && pros.length>0::>
|
||||
<p> ::raw _("Connect to your <b>Cagette Pro</b> account to manage your products, catalogs and deliveries.")::</p>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- cagette pro -->
|
||||
<div class="col-md-12" ::cond pros!=null::>
|
||||
<div class="row">
|
||||
::foreach p pros::
|
||||
<!-- Cagette pro -->
|
||||
<div class="col-md-4">
|
||||
<a class="clickable proBlock" href="/p/pro/?company=::p.id::">
|
||||
|
||||
::if p._image!=null::
|
||||
<img src="::file(p._image)::" class="img-responsive" style="width:92px;float:left;margin-right:12px;" />
|
||||
::end::
|
||||
|
||||
<h4>::p.name::</h4>
|
||||
</a>
|
||||
</div>
|
||||
::end::
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12" >
|
||||
<p>::raw _("Please click on the <b>Cagette group</b> you want to connect to.")::</p>
|
||||
</div>
|
||||
|
||||
<!-- groups -->
|
||||
<div class="col-md-12">
|
||||
<div class="row">
|
||||
::foreach ua amaps::
|
||||
::set group = ua._amap::
|
||||
<div class="col-md-4">
|
||||
<a class="clickable groupBlock" href="/user/choose?amap=::group.id::">
|
||||
|
||||
::if group._image!=null::
|
||||
<img src="::file(group._image)::" class="img-responsive" style="width:92px;float:left;margin-right:12px;" />
|
||||
::end::
|
||||
|
||||
<h4>::group.name::</h4>
|
||||
</a>
|
||||
</div>
|
||||
::end::
|
||||
|
||||
::if amaps.length==0::
|
||||
<div class="col-md-12">
|
||||
<div class="article text-center">
|
||||
<p>
|
||||
::_("You don't belong to any group yet")::
|
||||
</p>
|
||||
<a class="btn btn-primary" href="/group/create/"><span class="glyphicon glyphicon-chevron-right"></span> ::_("Create my own group")::</a>
|
||||
</div>
|
||||
</div>
|
||||
::end::
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- actions -->
|
||||
<div class="col-md-12 text-center" style="margin-bottom:12px;" >
|
||||
::if session.lang!="de"::
|
||||
<a class="btn btn-default btn-lg" href="/group/map"><span class="glyphicon glyphicon-search"></span> ::_("Find other groups near me")::</a>
|
||||
::end::
|
||||
<a class="btn btn-default btn-lg" href="/group/create/"><span class="glyphicon glyphicon-plus"></span> ::_("Create my own group")::</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- waiting list -->
|
||||
<div class="col-md-12" ::cond wl.length>0::>
|
||||
<div class="article">
|
||||
<h4>::_("Subscriptions on waiting list")::</h4>
|
||||
<table class="table">
|
||||
::foreach w wl::
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/group/::w._group.id::">::w._group.name::</a>
|
||||
</td>
|
||||
<td>
|
||||
::__("Request sent on ::date::",{ date:hDate(w.date) })::
|
||||
</td>
|
||||
<td>
|
||||
<a href="/group/listCancel/::w._group.id::" class="btn btn-default btn-xs"><span class="glyphicon glyphicon-remove"></span> ::_("Cancel")::</a>
|
||||
</td>
|
||||
</tr>
|
||||
::end::
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
::end::
|
||||
@@ -0,0 +1,11 @@
|
||||
::use 'design.mtt'::
|
||||
|
||||
<ul>
|
||||
<li><a href="/user/forgottenPassword">::_("Password forgotten")::</a></li>
|
||||
<li><a href="/user/login">::_("Connection")::</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
::end::
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user