- Added departments ManyToMany field to Document model - Implemented department selection in document create/edit modals - Added automatic notification creation for all department employees - Fixed document filtering to include uploaded documents in 'My Documents' - Fixed acknowledgements API to include department recipients - Added bulk notification support with configurable threshold - Removed acknowledge button, added visual highlighting for unread documents - Implemented server-side acknowledgment flow with redirect to file - Fixed mobile responsive layout for document actions - Removed temporary test files and documentation
147 lines
4.2 KiB
HTML
147 lines
4.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="ru">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{{ notification.title }}</title>
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
background-color: #f8f9fa;
|
|
}
|
|
.email-wrapper {
|
|
max-width: 600px;
|
|
margin: 0 auto;
|
|
background-color: #ffffff;
|
|
}
|
|
.email-header {
|
|
background-color: {{ category_color }};
|
|
color: #ffffff;
|
|
padding: 30px 20px;
|
|
text-align: center;
|
|
}
|
|
.email-header h1 {
|
|
margin: 0;
|
|
font-size: 24px;
|
|
font-weight: 600;
|
|
}
|
|
.category-badge {
|
|
display: inline-block;
|
|
background-color: rgba(255, 255, 255, 0.2);
|
|
padding: 5px 12px;
|
|
border-radius: 12px;
|
|
font-size: 12px;
|
|
margin-top: 10px;
|
|
}
|
|
.email-body {
|
|
padding: 30px 20px;
|
|
}
|
|
.notification-icon {
|
|
font-size: 48px;
|
|
text-align: center;
|
|
margin-bottom: 20px;
|
|
}
|
|
.notification-title {
|
|
font-size: 20px;
|
|
font-weight: 600;
|
|
color: #212529;
|
|
margin-bottom: 15px;
|
|
text-align: center;
|
|
}
|
|
.notification-message {
|
|
font-size: 16px;
|
|
line-height: 1.6;
|
|
color: #495057;
|
|
margin-bottom: 25px;
|
|
}
|
|
.notification-metadata {
|
|
background-color: #f8f9fa;
|
|
padding: 15px;
|
|
border-radius: 8px;
|
|
margin-bottom: 25px;
|
|
font-size: 14px;
|
|
color: #6c757d;
|
|
}
|
|
.action-button {
|
|
display: block;
|
|
width: fit-content;
|
|
margin: 0 auto;
|
|
padding: 12px 30px;
|
|
background-color: {{ category_color }};
|
|
color: #ffffff;
|
|
text-decoration: none;
|
|
border-radius: 6px;
|
|
font-weight: 500;
|
|
text-align: center;
|
|
}
|
|
.email-footer {
|
|
background-color: #f8f9fa;
|
|
padding: 20px;
|
|
text-align: center;
|
|
font-size: 12px;
|
|
color: #6c757d;
|
|
}
|
|
.email-footer a {
|
|
color: {{ category_color }};
|
|
text-decoration: none;
|
|
}
|
|
@media only screen and (max-width: 600px) {
|
|
.email-body {
|
|
padding: 20px 15px;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="email-wrapper">
|
|
<!-- Header -->
|
|
<div class="email-header">
|
|
<h1>{{ site_name }}</h1>
|
|
<div class="category-badge">
|
|
{{ category_icon }} {{ category_name }}
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Body -->
|
|
<div class="email-body">
|
|
<div class="notification-icon">{{ category_icon }}</div>
|
|
|
|
<div class="notification-title">
|
|
{{ notification.title }}
|
|
</div>
|
|
|
|
<div class="notification-message">
|
|
{{ notification.message|linebreaks }}
|
|
</div>
|
|
|
|
{% if notification.metadata %}
|
|
<div class="notification-metadata">
|
|
{% for key, value in notification.metadata.items %}
|
|
<strong>{{ key }}:</strong> {{ value }}<br>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if action_url %}
|
|
<a href="{{ action_url }}" class="action-button">
|
|
{{ action_text }}
|
|
</a>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<!-- Footer -->
|
|
<div class="email-footer">
|
|
<p>
|
|
Это автоматическое уведомление от системы {{ site_name }}.<br>
|
|
<a href="{{ site_url }}/notifications/settings/">Управление уведомлениями</a>
|
|
</p>
|
|
<p style="margin-top: 10px;">
|
|
<a href="{{ site_url }}">{{ site_url }}</a>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|