::use 'design.mtt'::
0:: style="max-height:400px;overflow-y: auto;">

::_("Distributions to validate")::

::_("You need to validate these distributions which took place recently")::

::foreach m multidistribs::

::if(!m.isConfirmed()):: ::dDate(m.getDate())::, ::m.getPlace().name:: ::if (isAdmin):: Admin : Autovalidate ::end:: ::elseif(isAdmin):: ::dDate(m.getDate())::, ::m.getPlace().name:: Admin : Unvalidate ::end::

::end::

::if getParam("old"):: ::_("Old contracts"):: ::else:: ::_("Contracts"):: ::end::

::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:: ::end::
::if c._vendor._image!=null::
::end::
::c._vendor.name:: ::c.name:: du ::hDate(c.startDate)::
au ::hDate(c.endDate)::
$$edit(::_("Manage")::,/contractAdmin/view/::c.id::) ::if user.canManageAllContracts():: $$delete(::_("Del.||short version of delete")::,/contract/delete/::c.id::?token=::token::) ::end::
::if user.canManageAllContracts():: $$insert(::_("New contract")::,/contract/insert/) ::end:: ::_("Old contracts"):: ::_("Calendar")::

::_("Farmers")::

::foreach v vendors:: ::end::
::if v._image!=null::
::end::
::v.name::
$$edit(::_("Edit")::,/vendor/edit/::v.id::) ::_("Picture"):: ::if user.isAmapManager():: $$delete(,/vendor/delete/::v.id::?token=::token::) ::end::
$$insert(::_("New farmer")::,/vendor/insert/)

::_("Delivery places")::

::foreach p places:: ::end::
::p.name:: $$edit(::_("Edit")::,/place/edit/::p.id::) ::if user.isAmapManager():: $$delete(::_("Del.||short version for delete")::,/place/delete/::p.id::?token=::token::) ::end::
$$insert(::_("New delivery place")::,/place/insert/)
::end::