::use 'contractadmin/design.mtt'::

::_("Distributions")::

::foreach d deliveries:: ::if d.date!=null && d.date.getTime() < Date.now().getTime():: ::set style = "opacity:0.5;":: ::else:: ::set style = "":: ::end:: ::end::
::if d.distributionCycleId!=null:: ::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:: ::d._place.name::
$$edit(::_("Edit")::,/distribution/edit/::d.id::) $$delete(::_("Delete")::,/distribution/delete/::d.id::)  ::_("Distribution list")::
0:: class="table"> ::foreach c cycles:: ::end::
::_("Distribution cycle")::
::switch c.cycleType:: ::case:: ::_("Weekly"):: ::case:: ::_("Monthly"):: ::case:: ::_("Every 2 weeks"):: ::case:: ::_("Every 3 weeks"):: ::end:: : Du ::hDate(c.startDate):: au ::hDate(c.endDate):: $$delete(::_("Del.")::,::"/distribution/deleteCycle/"+c.id::)
$$insert(::_("One time distribution")::,/distribution/insert/::c.id::) $$insert(::_("Distribution cycle")::,/distribution/insertCycle/::c.id::) ::_("Distributions engagement"):: ::_("Old distributions"):: ::end::