::use 'design.mtt':: ::if user==null::
::end::
::if newGroup::

::_("Welcome to Cagette.net !")::

::raw _("Congratulations, you just created a new group !
As an example, we created a fake farmer and fake products.
It will show you how things work together in Cagette.net.
Of course, you'll be able to delete them.")::


::raw _("As a starter, we recommand you to follow the guided tour to discover step by step the main sections of the software.")::

::_("Start the guided tour")::

::end:: ::if !amap.hasShopMode()::
0 )::>

::_("Open orders")::

::end:: ::if distribs==null || count(distribs)==0::
::_("You delivery planning is currently empty||on homepage when there is no planned deliveries")::
::else:: ::foreach d distribs:: ::if d.userHasOrders(user)::
::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 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::
::if active:: ::_("Modify my order"):: ::_("Add products"):: ::elseif(ordersEndDate!=null):: ::if Date.now().getTime() > ordersEndDate.getTime():: ::_("Order closed since")::
::hDate(ordersEndDate):: ::else:: ::_("Order will open on")::
::hDate(ordersStartDate):: ::end:: ::end::
$$place(::place::)
::_("My ordered products"):: :
::foreach dist d.distributions:: ::set orders = prepare(dist.getUserOrders(user)):: ::if orders.length>0::

::set s = getDate(dist.date) :: ::set e = getDate(dist.end):: ::s.h+":"+s.i:: - ::e.h+":"+e.i::  ::_("Distribution"):: ::dist._contract.name::

::foreach c orders::
0:: >
1:: >::raw c.smartQt:: ::_("Canceled"):: ::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::
( ::raw __("alternated with ::mate::",{mate:mate})::, ::if getWhosTurn(c.id,dist)==false:: ::if c.userName == you:: ::_("It's your turn"):: ::else:: ::_("It's his/her turn"):: ::end:: ::else:: ::if c.userName2 == you:: ::_("It's your turn"):: ::else:: ::_("It's his/her turn"):: ::end:: ::end:: ) ::end::
::end::
::end:: ::end::
::raw d.extraHtml::
::elseif(amap.hasShopMode())::
::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::
::if active==true:: ::_("Order||Order button on homepage")::
::elseif(ordersEndDate!=null):: ::if Date.now().getTime() > ordersEndDate.getTime():: ::_("Order closed since")::
::hDate(ordersEndDate):: ::else:: ::_("Order will open on")::
::hDate(ordersStartDate):: ::end:: ::end::
::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::
::set e = getDate(end):: ::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})::
$$place(::place::)
::foreach p d.getProductsExcerpt()::
::end::
::raw d.extraHtml::
::end:: ::end:: ::end::
::if amap._image!=null:: ::if amap.extUrl!=null && amap.extUrl!=""::
::else::
::end:: ::end:: ::if amap.txtHome!=null && amap.txtHome!="":: ::raw nl2br(amap.txtHome):: ::end::
0 ::>

::_("Permanences")::

::_("Don't forget to register for permanences")::

    ::foreach c contractsWithDistributors::
  • ::c.name::
  • ::end::

::_("Warning, you don't have defined a password yet !")::

::_("Set my password")::
::if blocks!=null:: ::foreach b blocks::

::b.title::

::raw b.html::

::end:: ::end::
::end::