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

149 lines
4.6 KiB

::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::