Skip to content
Snippets Groups Projects
Commit 5fbdcc89 authored by Anton Bagliy's avatar Anton Bagliy
Browse files

WIP: tabulator table for journal #396

parent cd952183
Branches
No related merge requests found
This diff is collapsed.
......@@ -14,6 +14,14 @@
{# локализация jquery datepicker plugin на русский #}
{{ HTML.script('static/js/libs/datepicker-ru.js')|raw }}
{{ HTML.script('https://unpkg.com/tabulator-tables@4.2.3/dist/js/tabulator.min.js')|raw }}
{{ HTML.script('http://oss.sheetjs.com/js-xlsx/xlsx.full.min.js')|raw }}
{{ HTML.script('https://unpkg.com/jspdf@latest/dist/jspdf.min.js')|raw }}
{{ HTML.script('https://cdnjs.cloudflare.com/ajax/libs/jspdf-autotable/3.0.5/jspdf.plugin.autotable.js')|raw }}
{#HTML.style('https://unpkg.com/tabulator-tables@4.2.3/dist/css/tabulator_modern.min.css')|raw }} #}
{{ HTML.style('https://unpkg.com/tabulator-tables@4.2.3//dist/css/tabulator.min.css')|raw }}
{{ HTML.style('static/css/teacher/discipline/journal.css')|raw }}
{# {{ HTML.style('static/css/jquery-timepicker-addon-1.6.3.css')|raw }} #}
{% endblock %}
......@@ -132,80 +140,8 @@
</div>
<div class="journalContent">
<table id="studentsAttendance">
<thead>
{% set ColCount = 3 %}
{% for Lesson in Lessons %}
{% set ColCount = ColCount + 1 %}
{% endfor %}
<tr id="journalHead">
<td>Занятие</td>
{% set LessonCol = 1 %}
{% for Lesson in Lessons %}
{{ _self.LessonCell(LessonCol, Lesson.ID, Lesson.LessonDate, Lesson.LessonType, Lesson.LessonName) }}
{% set LessonCol = LessonCol + 1 %}
{% endfor %}
{{ _self.LessonCellTemplate(LessonCol, 0, "") }}
<td class="col_{{ LessonCol + 1 }}" id="lesson_new">
<input type="input" id="hiddenField" class="new_lesson_picker" style="display:none"/>
</td>
<td>Итог</td>
</tr>
</thead>
<tbody>
{% set Row = 1 %}
{% for GroupID, StudentsList in Students %}
{% set Group = Groups[GroupID] %}
<tr id="group_{{ GroupID }}" class="group_{{ GroupID }}">
<td class="group" colspan="{{ ColCount }}">
{% if Group.Degree == 'master' %}
Магистратура, {{ Group.GradeNum }} год
{% elseif Group.Degree == 'specialist' %}
Специалитет, {{ Group.GradeNum }} курс
{% elseif Group.Degree == 'postgraduate' %}
Аспирантура, {{ Group.GradeNum }} год
{% else %}
{{ Group.GradeNum }} курс
{% endif %}
{{ Group.GroupNum }} группа
</td>
</tr>
{% for Student in StudentsList %}
<tr id="row_{{ Row }}" class="group_{{ GroupID }}">
{% set Col = 1 %}
{% set SemesterAttendance = 0 %}
<td id="student_{{ Student.RecordBookID }}" class="name">
{{ Student.LastName }} {{ Student.FirstName }}
</td>
{% for Lesson in Lessons %}
{% set Attended = Attendance[Student.RecordBookID][Lesson.ID] %}
{{ _self.JournalCell(Col, Row, Discipline, Attended, Lesson.LessonType) }}
{% set Col = Col + 1 %}
{% set SemesterAttendance = SemesterAttendance + Attended %}
{% endfor %}
{{ _self.JournalCellTemplate(Col, Row, Discipline, 0) }}
{% set Col = Col + 1 %}
{{ _self.EmptyCell(Col, Row) }}
{% set Col = Col + 1 %}
{{ _self.RateCell(Col, Row, Discipline, SemesterAttendance) }}
{% set Col = Col + 1 %}
</tr>
{% set Row = Row + 1 %}
{% endfor %}
{% endfor %}
</tbody>
</table>
<div id="studentsAttendance">
</div>
</div>
<div id="cellInfo" class="cellInfo">
......@@ -225,4 +161,16 @@
<div id="json_lessonTypes" style="display: none">
{{ LessonTypes|json_encode|raw }}
</div>
<div id="json_lessons" style="display: none">
{{ Lessons|json_encode|raw }}
</div>
<div id="json_students" style="display: none">
{{ Students|json_encode|raw }}
</div>
<div id="json_groups" style="display: none">
{{ Groups|json_encode|raw }}
</div>
<div id="json_attendance" style="display: none">
{{ Attendance|json_encode|raw }}
</div>
{% endblock %}
......@@ -13,7 +13,6 @@
{{ HTML.script('http://oss.sheetjs.com/js-xlsx/xlsx.full.min.js')|raw }}
{{ HTML.script('https://unpkg.com/jspdf@latest/dist/jspdf.min.js')|raw }}
{{ HTML.script('https://cdnjs.cloudflare.com/ajax/libs/jspdf-autotable/3.0.5/jspdf.plugin.autotable.js')|raw }}
{{ HTML.script('https://cdnjs.cloudflare.com/ajax/libs/jspdf-autotable/3.0.5/jspdf.plugin.autotable.js')|raw }}
{{ HTML.style('static/css/teacher/discipline/rating.css')|raw }}
{#HTML.style('https://unpkg.com/tabulator-tables@4.2.3/dist/css/tabulator_modern.min.css')|raw }} #}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment