teacher_time_report.tpl 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <script>
  2. $(document).on('ready', 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. <div class="col-md-12">
  24. <div class="actions">
  25. <a href="{{ _p.web_main }}admin/teachers_time_by_session_report.php">
  26. {{ 'session.png'|img(32, 'Sessions'|get_lang) }}
  27. </a>
  28. <div class="pull-right">
  29. <a href="{{ _p.web_self ~ '?' ~ {'export':'pdf','from':selected_from,'until':selected_until,'course':selected_course,'session':selected_session,'teacher':selected_teacher } | url_encode }}">
  30. {{ 'pdf.png' | img(32, 'ExportToPDF'|get_lang ) }}
  31. </a>
  32. <a href="{{ _p.web_self ~ '?' ~ {'export':'xls','from':selected_from,'until':selected_until,'course':selected_course,'session':selected_session,'teacher':selected_teacher } | url_encode }}">
  33. {{ 'export_excel.png' | img(32, 'ExportExcel'|get_lang ) }}
  34. </a>
  35. </div>
  36. </div>
  37. </div>
  38. <h1 class="page-header">{{ 'TeacherTimeReport' | get_lang }}</h1>
  39. {{ form }}
  40. <h2 class="page-header">{{ report_title }} <small>{{ report_sub_title }}</small></h2>
  41. <table class="table">
  42. <thead>
  43. <tr>
  44. {% if with_filter %}
  45. <th>{{ 'Session' | get_lang }}</th>
  46. <th>{{ 'Course' | get_lang }}</th>
  47. {% endif %}
  48. <th>{{ 'Coach' | get_lang }}</th>
  49. <th>{{ 'TotalTime' | get_lang }}</th>
  50. </tr>
  51. </thead>
  52. <tbody>
  53. {% for row in rows %}
  54. <tr>
  55. {% if with_filter %}
  56. <td>{{ row.session ? row.session.name : '&nbsp' }}</td>
  57. <td>{{ row.course.name }}</td>
  58. {% endif %}
  59. <td>{{ row.coach.completeName }} ({{ row.coach.username}})</td>
  60. <td>{{ row.totalTime }}</td>
  61. </tr>
  62. {% endfor %}
  63. </tbody>
  64. </table>