Refactor report templates and styles

- Updated CSS styles in report.css for improved readability and consistency.
- Removed deprecated report_class.html and report_group.html files.
- Introduced new Jinja2 templates: report_class.jinja and report_group.jinja for better maintainability.
- Enhanced JavaScript functionality in report_class.js to support dynamic chart rendering using Chart.js.
- Updated report_group.js to streamline print functionality.
This commit is contained in:
2026-05-08 14:38:32 +04:00
parent c11c9e8aa8
commit 74edbde327
9 changed files with 644 additions and 683 deletions
+49
View File
@@ -0,0 +1,49 @@
<!doctype html>
<html lang="ru">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ title }}</title>
<style>
{{ css_text | safe }}
</style>
</head>
<body>
<div class="page">
<header class="header">
<div class="title">
<h1>{{ title }}</h1>
<p>{{ hint }}</p>
</div>
<div class="actions">
<button class="btn primary" onclick="printReport()">Печать / PDF</button>
</div>
</header>
<section class="section">
<h2>Шаблон пар</h2>
{% if report.lesson_windows %}
<table class="table">
<thead>
<tr><th>Пара</th><th>Начало</th><th>Окончание</th></tr>
</thead>
<tbody>
{% for item in report.lesson_windows %}
<tr>
<td>{{ item.lesson }}</td>
<td>{{ item.start }}</td>
<td>{{ item.end }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<div class="muted">Нет данных.</div>
{% endif %}
</section>
</div>
<script>window.__GROUP_REPORT__ = {{ report_json | safe }};</script>
<script>{{ js_text | safe }}</script>
</body>
</html>