teacher_time_report.html.twig 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <script>
  2. $(function () {
  3. $('#course').on('change', function () {
  4. $('#session').prop('selectedIndex', 0);
  5. $('#teacher').prop('selectedIndex', 0);
  6. });
  7. $('#session').on('change', function () {
  8. $('#course').prop('selectedIndex', 0);
  9. $('#teacher').prop('selectedIndex', 0);
  10. });
  11. $('#teacher').on('change', function () {
  12. $('#course').prop('selectedIndex', 0);
  13. $('#session').prop('selectedIndex', 0);
  14. });
  15. $('#daterange').on('apply.daterangepicker', function (ev, picker) {
  16. $('[name="from"]').val(picker.startDate.format('YYYY-MM-DD'));
  17. $('[name="until"]').val(picker.endDate.format('YYYY-MM-DD'));
  18. }).on('cancel.daterangepicker', function (ev, picker) {
  19. $('#daterange, [name="from"], [name="until"]').val('');
  20. });
  21. });
  22. </script>
  23. {% autoescape false %}
  24. {{ form }}
  25. <h3 class="page-header">{{ report_title }}
  26. <small>{{ report_sub_title }}</small>
  27. </h3>
  28. <table class="table">
  29. <thead>
  30. <tr>
  31. {% if with_filter %}
  32. <th>{{ 'Session' | get_lang }}</th>
  33. <th>{{ 'Course' | get_lang }}</th>
  34. {% endif %}
  35. <th>{{ 'Coach' | get_lang }}</th>
  36. <th class="text-center">{{ 'TotalTime' | get_lang }}</th>
  37. </tr>
  38. </thead>
  39. <tbody>
  40. {% for row in rows %}
  41. <tr>
  42. {% if with_filter %}
  43. <td>{{ row.session ? row.session.name : '&nbsp' }}</td>
  44. <td>{{ row.course.name }}</td>
  45. {% endif %}
  46. <td>{{ row.coach.complete_name }} ({{ row.coach.username }})</td>
  47. <td class="text-center">{{ row.total_time }}</td>
  48. </tr>
  49. {% endfor %}
  50. </tbody>
  51. </table>
  52. {% endautoescape %}