index.html.twig 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Counter index{% endblock %}
  3. {% block body %}
  4. <h1>Counter index</h1>
  5. <table class="table">
  6. <thead>
  7. <tr>
  8. <th>Id</th>
  9. <th>StartTime</th>
  10. <th>EndTime</th>
  11. <th>Name</th>
  12. <th>State</th>
  13. <th>TimeToLive</th>
  14. <th>actions</th>
  15. </tr>
  16. </thead>
  17. <tbody>
  18. {% for counter in counters %}
  19. <tr>
  20. <td>{{ counter.id }}</td>
  21. <td>{{ counter.startTime ? counter.startTime|date('H:i:s') : '' }}</td>
  22. <td>{{ counter.endTime ? counter.endTime|date('H:i:s') : '' }}</td>
  23. <td>{{ counter.name }}</td>
  24. <td>{{ counter.state }}</td>
  25. <td>{{ counter.timeToLive | minutes }}</td>
  26. <td>
  27. <a class="btn" href="{{ path('app_admin_show', {'id': counter.id}) }}">{{ "show" | trans }}</a>
  28. {{ include('admin/_modif_button.html.twig', {'counter': counter}) }}
  29. {{ include('admin/_start_form.html.twig', {'counter': counter}) }}
  30. </td>
  31. </tr>
  32. {% else %}
  33. <tr>
  34. <td colspan="7">{{ "no records found" | trans }}</td>
  35. </tr>
  36. {% endfor %}
  37. </tbody>
  38. </table>
  39. <a class="btn" href="{{ path('app_admin_new') }}">{{ "Create new" | trans }}</a>
  40. {% endblock %}