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.

81 lines
2.2 KiB

  1. ::use 'contractadmin/design.mtt'::
  2. <h2>::_("Distributions")::</h2>
  3. <table class="table">
  4. ::foreach d deliveries::
  5. ::if d.date!=null && d.date.getTime() < Date.now().getTime()::
  6. ::set style = "opacity:0.5;"::
  7. ::else::
  8. ::set style = ""::
  9. ::end::
  10. <tr style="::style::" >
  11. <td>
  12. ::if d.distributionCycleId!=null::
  13. <img src="/img/icons/arrow_refresh.png" style="opacity:0.5;" />
  14. ::end::
  15. ::set da = getDate(d.date)::
  16. ::if d.end!=null::
  17. ::set e = getDate(d.end)::
  18. ::end::
  19. ::da.dow:: ::da.d:: ::da.m:: de ::da.h+":"+da.i::
  20. ::if d.end!=null::
  21. à ::e.h+":"+e.i::
  22. ::end::
  23. </td>
  24. <td>
  25. ::d._place.name::
  26. </td>
  27. <td>
  28. <div class="btn-group">
  29. $$edit(::_("Edit")::,/distribution/edit/::d.id::)
  30. $$delete(::_("Delete")::,/distribution/delete/::d.id::)
  31. <a href="/distribution/list/::d.id::" class="btn btn-default btn-sm"><span class="glyphicon glyphicon-print"></span>&nbsp;::_("Distribution list")::</a>
  32. </div>
  33. </td>
  34. </tr>
  35. ::end::
  36. </table>
  37. <table ::cond cycles.length>0:: class="table">
  38. <tr>
  39. <th>::_("Distribution cycle")::</th>
  40. <th></th>
  41. </tr>
  42. ::foreach c cycles::
  43. <tr>
  44. <td><b>
  45. ::switch c.cycleType::
  46. ::case:: ::_("Weekly")::
  47. ::case:: ::_("Monthly")::
  48. ::case:: ::_("Every 2 weeks")::
  49. ::case:: ::_("Every 3 weeks")::
  50. ::end::
  51. </b>
  52. : Du ::hDate(c.startDate):: au ::hDate(c.endDate)::
  53. </td>
  54. <td>
  55. $$delete(::_("Del.")::,::"/distribution/deleteCycle/"+c.id::)
  56. </td>
  57. </tr>
  58. ::end::
  59. </table>
  60. $$insert(::_("One time distribution")::,/distribution/insert/::c.id::)
  61. $$insert(::_("Distribution cycle")::,/distribution/insertCycle/::c.id::)
  62. <a href="/contractAdmin/distributionp/::c.id::" class="btn btn-default btn-sm">
  63. <span class="glyphicon glyphicon-user"></span> ::_("Distributions engagement")::
  64. </a>
  65. <a href="/contractAdmin/distributions/::c.id::?old=1" class="btn btn-default btn-sm">
  66. ::_("Old distributions")::
  67. </a>
  68. ::end::