templates/department/index.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Department index{% endblock %}
  3. {% block body %}
  4. <h1>Department index</h1>
  5. <table class="table">
  6. <thead>
  7. <tr>
  8. <th>Id</th>
  9. <th>Name</th>
  10. <th>Description</th>
  11. <th>UpdateAt</th>
  12. <th>actions</th>
  13. </tr>
  14. </thead>
  15. <tbody>
  16. {% for department in departments %}
  17. <tr>
  18. <td>{{ department.id }}</td>
  19. <td>{{ department.name }}</td>
  20. <td>{{ department.description }}</td>
  21. <td>{{ department.updateAt ? department.updateAt|date('Y-m-d H:i:s') : '' }}</td>
  22. <td>
  23. <a href="{{ path('department_show', {'id': department.id}) }}">{% trans %}show{% endtrans %}</a>
  24. {% if is_granted('ROLE_HABITECH') %}
  25. <a href="{{ path('department_edit', {'id': department.id}) }}">{% trans %}edit{% endtrans %}</a>
  26. {% endif %}
  27. </td>
  28. </tr>
  29. {% else %}
  30. <tr>
  31. <td colspan="5">no records found</td>
  32. </tr>
  33. {% endfor %}
  34. </tbody>
  35. </table>
  36. {% if is_granted('ROLE_HABITECH') %}
  37. <a href="{{ path('department_new') }}">{% trans %}Create new{% endtrans %}</a>
  38. {% endif %}
  39. {% endblock %}