Add email notification for staff
This commit is contained in:
78
templates/emails/staff_verify.body.html
Normal file
78
templates/emails/staff_verify.body.html
Normal file
@@ -0,0 +1,78 @@
|
||||
{% extends "emails/_base.html" %}
|
||||
{% block body %}
|
||||
<h1 style="margin:0 0 12px 0; font-size:22px; font-weight:700; color:#5b21b6; letter-spacing:-0.01em;">Awaiting verification</h1>
|
||||
|
||||
<p style="margin:0 0 16px 0; color:#334155; font-size:15px; line-height:1.55;">
|
||||
A new print has been submitted and has just passed the automated checks. It is waiting for a staff review before it can enter the print queue.
|
||||
</p>
|
||||
|
||||
{# Pill colour comes from `Submission.STATUS_EMAIL_COLORS[VERIFYING]` -- violet, same as the dashboard chip and the user-facing verifying email. #}
|
||||
<table role="presentation" cellpadding="0" cellspacing="0" border="0" style="margin:0 0 20px 0;">
|
||||
<tr>
|
||||
<td style="padding:6px 14px; background-color:{{ submission.status_email_style.bg }}; border-radius:9999px;">
|
||||
<span style="color:{{ submission.status_email_style.fg }}; font-weight:600; font-size:14px; letter-spacing:0.01em;">
|
||||
{{ submission.get_status_display }}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%" style="margin:0 0 20px 0; border:1px solid #e2e8f0; border-radius:6px;">
|
||||
<tr>
|
||||
<td style="padding:14px 16px;">
|
||||
<table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%" style="font-size:14px; color:#334155;">
|
||||
<tr>
|
||||
<td style="padding:4px 0; color:#64748b; width:110px;">Codename</td>
|
||||
<td style="padding:4px 0; font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; color:#92400e; font-weight:600;">{{ submission.slug }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding:4px 0; color:#64748b;">Source</td>
|
||||
<td style="padding:4px 0;">{{ submission.source_label }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding:4px 0; color:#64748b;">Submitter</td>
|
||||
<td style="padding:4px 0;">
|
||||
{% if submission.submitted_by_id %}
|
||||
{{ submission.submitted_by.email }} <span style="color:#64748b;">(signed in)</span>
|
||||
{% else %}
|
||||
{{ submission.guest_email }} <span style="color:#64748b;">(guest, email confirmed)</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding:4px 0; color:#64748b;">Filament</td>
|
||||
<td style="padding:4px 0;">{% if submission.requested_filament %}{{ submission.requested_filament.display_label }}{% else %}<span style="color:#64748b;">No preference</span>{% endif %}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{% if submission.notes_for_op %}
|
||||
{# Private user-to-operator notes. Surfaced here because the recipient is staff -- never echoed on the public detail page (plan.md §5). #}
|
||||
<table role="presentation" cellpadding="0" cellspacing="0" border="0" width="100%" style="margin:0 0 24px 0;">
|
||||
<tr>
|
||||
<td style="padding:16px; background-color:#f5f3ff; border-left:3px solid #8b5cf6; border-radius:0 4px 4px 0;">
|
||||
<p style="margin:0 0 6px 0; font-size:11px; font-weight:600; color:#5b21b6; text-transform:uppercase; letter-spacing:0.06em;">
|
||||
Notes from the submitter
|
||||
</p>
|
||||
<p style="margin:0; color:#334155; font-size:14px; line-height:1.55; white-space:pre-line;">{{ submission.notes_for_op }}</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
<table role="presentation" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td style="background-color:#7c3aed; border-radius:6px;">
|
||||
<a href="{{ admin_url }}" style="display:inline-block; padding:12px 24px; color:#ffffff; font-weight:600; font-size:15px; text-decoration:none; font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;">
|
||||
Review in admin
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p style="margin:18px 0 0 0; font-size:13px; color:#64748b;">
|
||||
Public detail page: <a href="{{ detail_url }}" style="color:#475569; word-break:break-all; font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;">{{ detail_url }}</a>
|
||||
</p>
|
||||
{% endblock %}
|
||||
23
templates/emails/staff_verify.body.txt
Normal file
23
templates/emails/staff_verify.body.txt
Normal file
@@ -0,0 +1,23 @@
|
||||
Hi,
|
||||
|
||||
A new print has been submitted and has just passed the automated checks.
|
||||
It is now waiting for a staff verification before it can enter the print
|
||||
queue.
|
||||
|
||||
Codename : {{ submission.slug }}
|
||||
Source : {{ submission.source_label }}
|
||||
Submitter: {% if submission.submitted_by_id %}{{ submission.submitted_by.email }} (signed in){% else %}{{ submission.guest_email }} (guest, email confirmed){% endif %}
|
||||
Filament : {% if submission.requested_filament %}{{ submission.requested_filament.display_label }}{% else %}No preference{% endif %}
|
||||
{% if submission.notes_for_op %}
|
||||
Notes the submitter left for you:
|
||||
|
||||
{{ submission.notes_for_op }}
|
||||
{% endif %}
|
||||
Review the submission in admin:
|
||||
{{ admin_url }}
|
||||
|
||||
Public detail page:
|
||||
{{ detail_url }}
|
||||
|
||||
— hamprint
|
||||
{{ site_url }}
|
||||
1
templates/emails/staff_verify.subject.txt
Normal file
1
templates/emails/staff_verify.subject.txt
Normal file
@@ -0,0 +1 @@
|
||||
hamprint: {{ submission.slug }} awaiting verification
|
||||
Reference in New Issue
Block a user