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.

47 lines
1.6 KiB

  1. ::use 'amapadmin/design.mtt'::
  2. <h2>::_("Categories")::</h2>
  3. <p>
  4. ::raw _("Categories allow to sort your products per category, for example \"vegetables, meet, backery, etc.\"<br/> It is possible to create many groups of categories in order to sort products as we wish.")::
  5. </p>
  6. <p ::cond groups.length==0 ::>
  7. ::_("You currently have no category. Would you like to create the list of categories by default ?")::
  8. <a href="/amapadmin/categories/generate" class="btn btn-default">::_("Create the list of default categories")::</a>
  9. </p>
  10. ::foreach g groups::
  11. <table class="table table-bordered">
  12. <tr>
  13. <th>
  14. Groupe "::g.name::"
  15. </th>
  16. <th>
  17. <a href="/amapadmin/categories/editGroup/::g.id::" class="btn btn-default btn-xs">::_("Modify group")::</a>
  18. <a href="/amapadmin/categories/deleteGroup/::g.id::?token=::token::" class="btn btn-default btn-xs" $$confirm()>::_("Remove group")::</a>
  19. </th>
  20. </tr>
  21. ::foreach c g.getCategories()::
  22. <tr>
  23. <td>
  24. <span class="tag" style="background: ::c.getColor()::;">::c.name::</span>
  25. </td>
  26. <td>
  27. <a href="/amapadmin/categories/edit/::c.id::" class="btn btn-default btn-xs">::_("Modify")::</a>
  28. <a href="/amapadmin/categories/delete/::c.id::?token=::token::" class="btn btn-default btn-xs" $$confirm() >::_("Remove")::</a>
  29. </td>
  30. </tr>
  31. ::end::
  32. <tr>
  33. <td>
  34. <a href="/amapadmin/categories/insert/::g.id::" class="btn btn-default btn-xs">::_("Add a category in this group")::</a>
  35. </td>
  36. <td></td>
  37. </tr>
  38. </table>
  39. ::end::
  40. <a href="/amapadmin/categories/insertGroup" class="btn btn-default">::_("Add a group")::</a>
  41. ::end::