Files
TODO_list_system/backend/templates/emails/fire_email.html
beabigegg b0c86302ff 1ST
2025-08-29 16:25:46 +08:00

230 lines
7.3 KiB
HTML

<!DOCTYPE html>
<html lang="zh-TW">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>緊急通知 - {{ todo.title }}</title>
<style>
body {
font-family: 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
line-height: 1.6;
color: #333;
max-width: 600px;
margin: 0 auto;
padding: 20px;
background-color: #f5f5f5;
}
.container {
background: white;
border-radius: 8px;
padding: 30px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.header {
text-align: center;
border-bottom: 3px solid #dc3545;
padding-bottom: 20px;
margin-bottom: 30px;
}
.fire-icon {
font-size: 48px;
margin-bottom: 10px;
display: block;
}
.title {
color: #dc3545;
font-size: 24px;
font-weight: bold;
margin: 0;
}
.urgent-badge {
background: #dc3545;
color: white;
padding: 8px 16px;
border-radius: 20px;
font-size: 14px;
font-weight: bold;
display: inline-block;
margin: 10px 0;
}
.todo-details {
background: #f8f9fa;
border-left: 4px solid #dc3545;
padding: 20px;
margin: 20px 0;
border-radius: 0 4px 4px 0;
}
.detail-row {
margin: 10px 0;
display: flex;
align-items: center;
}
.detail-label {
font-weight: bold;
min-width: 80px;
color: #666;
}
.detail-value {
flex: 1;
}
.status-badge, .priority-badge {
padding: 4px 12px;
border-radius: 12px;
font-size: 12px;
font-weight: bold;
text-transform: uppercase;
}
.status-new { background: #e3f2fd; color: #1976d2; }
.status-in-progress { background: #fff3e0; color: #f57c00; }
.status-done { background: #e8f5e8; color: #388e3c; }
.priority-high { background: #ffebee; color: #d32f2f; }
.priority-medium { background: #fff3e0; color: #f57c00; }
.priority-low { background: #e8f5e8; color: #388e3c; }
.custom-message {
background: #fff3cd;
border: 1px solid #ffeaa7;
border-radius: 4px;
padding: 15px;
margin: 20px 0;
}
.sender-info {
margin: 20px 0;
padding: 15px;
background: #f8f9fa;
border-radius: 4px;
}
.action-buttons {
text-align: center;
margin: 30px 0;
}
.btn {
display: inline-block;
padding: 12px 24px;
margin: 0 10px;
border-radius: 4px;
text-decoration: none;
font-weight: bold;
border: none;
cursor: pointer;
}
.btn-primary {
background: #007bff;
color: white;
}
.btn-danger {
background: #dc3545;
color: white;
}
.footer {
text-align: center;
margin-top: 30px;
padding-top: 20px;
border-top: 1px solid #dee2e6;
font-size: 14px;
color: #666;
}
.timestamp {
color: #999;
font-size: 12px;
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<span class="fire-icon">🚨</span>
<h1 class="title">緊急通知</h1>
<div class="urgent-badge">URGENT - 立即處理</div>
</div>
<div class="sender-info">
<strong>{{ sender_name }}</strong> 向您發送了緊急通知
<div class="timestamp">{{ timestamp }}</div>
</div>
{% if custom_message %}
<div class="custom-message">
<strong>📝 發送者留言:</strong><br>
{{ custom_message }}
</div>
{% endif %}
<div class="todo-details">
<h3>📋 待辦事項詳情</h3>
<div class="detail-row">
<div class="detail-label">標題:</div>
<div class="detail-value"><strong>{{ todo.title }}</strong></div>
</div>
{% if todo.description %}
<div class="detail-row">
<div class="detail-label">描述:</div>
<div class="detail-value">{{ todo.description }}</div>
</div>
{% endif %}
<div class="detail-row">
<div class="detail-label">狀態:</div>
<div class="detail-value">
<span class="status-badge status-{{ todo.status.lower().replace('_', '-') }}">
{% if todo.status == 'NEW' %}新建
{% elif todo.status == 'IN_PROGRESS' %}進行中
{% elif todo.status == 'DONE' %}完成
{% else %}{{ todo.status }}{% endif %}
</span>
</div>
</div>
<div class="detail-row">
<div class="detail-label">優先級:</div>
<div class="detail-value">
<span class="priority-badge priority-{{ todo.priority.lower() }}">
{% if todo.priority == 'HIGH' %}高
{% elif todo.priority == 'MEDIUM' %}中
{% elif todo.priority == 'LOW' %}低
{% else %}{{ todo.priority }}{% endif %}
</span>
</div>
</div>
{% if todo.due_date %}
<div class="detail-row">
<div class="detail-label">到期日:</div>
<div class="detail-value">
<strong style="color: #dc3545;">{{ todo.due_date.strftime('%Y年%m月%d日') }}</strong>
</div>
</div>
{% endif %}
<div class="detail-row">
<div class="detail-label">建立者:</div>
<div class="detail-value">{{ todo.creator_display_name or todo.creator_ad }}</div>
</div>
<div class="detail-row">
<div class="detail-label">建立時間:</div>
<div class="detail-value">{{ todo.created_at.strftime('%Y年%m月%d日 %H:%M') }}</div>
</div>
</div>
<div class="action-buttons">
<a href="{{ app_url }}/todos/{{ todo.id }}" class="btn btn-primary">
📖 查看詳情
</a>
<a href="{{ app_url }}/todos/{{ todo.id }}/edit" class="btn btn-danger">
✏️ 立即處理
</a>
</div>
<div class="footer">
<p>這是一封系統自動發送的緊急通知郵件</p>
<p>如有疑問,請聯繫發送者 {{ sender_name }} ({{ sender }})</p>
<div class="timestamp">
發送時間:{{ timestamp }}<br>
由 {{ app_name }} 系統發送
</div>
</div>
</div>
</body>
</html>