Skip to content
Snippets Groups Projects
Commit e8671288 authored by Julian's avatar Julian
Browse files

Rework rebus emails

parent 31500a05
No related branches found
No related tags found
1 merge request!33Resolve "Review and fix translation of mail templates"
{% load i18n %}
{% block subject %} {% trans "New" %} {{ type }} {% trans "from" %} {{ user.person.mail_sender_via }} {% endblock %}
{% block plain %}
{% trans "The user" %} {{ user.username }} ({% trans "full name: " %} {{ user.first_name }} {{ user.last_name }}, {% trans "e-mail: " %} {{ user.email }}) {% trans "has submitted the following" %} {{ type }}:
{% for item in description %}
{{ item }}
{% endfor %}
{% endblock %}
{% block html %}
<main>
<p>{% trans "The user" %} {{ user.username }} ({% trans "full name: " %} {{ user.first_name }} {{ user.last_name }}, {% trans "e-mail: " %} {{ user.email }}) {% trans "has submitted the following" %} {{ type }}: </p>
<blockquote>
{% for item in description %}
<p>{{ item }}</p>
{% endfor %}
</blockquote>
</main>
{% endblock %}
body {
line-height: 1.5;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
font-weight: normal;
color: rgba(0, 0, 0, 0.87);
}
span.chip {
display: inline-block;
height: 32px;
font-size: 13px;
font-weight: 500;
color: rgba(0,0,0,0.6);
line-height: 32px;
padding: 0 12px;
border-radius: 16px;
background-color: #e4e4e4;
margin-bottom: 5px;
margin-right: 5px;
}
.card-panel {
box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14),0 3px 1px -2px rgba(0,0,0,0.12),0 1px 5px 0 rgba(0,0,0,0.2);
-webkit-box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14),0 3px 1px -2px rgba(0,0,0,0.12),0 1px 5px 0 rgba(0,0,0,0.2);
-webkit-transition: -webkit-box-shadow .25s;
transition: -webkit-box-shadow .25s;
transition: box-shadow .25s;
transition: box-shadow .25s, -webkit-box-shadow .25s;
padding: 24px;
margin: .5rem 0 1rem 0;
border-radius: 2px;
background-color: #eaeaea;
}
{% load i18n %}
{% block subject %}
{% blocktrans with issue=short_description %}New issue: {{ issue }}{% endblocktrans %}
{% endblock %}
{% block plain %}
{% blocktrans with username=user.username full_name=user.person.full_name email=user.person.email %}
The user {{ username }} (full name: {{ full_name }}, e-mail: <{{ email }}>) has submitted the following issue:
{% endblocktrans %}
{{ categories }}
{{ short_description }}
{{ long_description }}
{% endblock %}
{% block html %}
<style>
{% include "templated_email/html_mail.css" %}
</style>
<main>
<p>
{% blocktrans with username=user.username full_name=user.person.full_name email=user.person.email %}
The user {{ username }} (full name: {{ full_name }}, e-mail: <a href="mailto:{{ email }}">&lt;{{ email }}&gt;</a>)
has submitted the following issue:
{% endblocktrans %}
</p>
<div class="card-panel">
<p>
{% for category in categories_single %}
<span class="chip">{{ category }}</span>
{% if not forloop.last %}
{% endif %}
{% endfor %}
</p>
<p>{{ short_description }}</p>
<p>{{ long_description|linebreaksbr }}</p>
</div>
</main>
{% endblock %}
......@@ -41,7 +41,6 @@ def ask_faq(request):
context = {
"description": [question],
"user": request.user,
"type": _("FAQ question"),
}
send_templated_mail(
......@@ -105,16 +104,16 @@ def report_issue(request):
# Send mail
context = {
"description": [
add_arrows([category_1, category_2, category_3, free_text,]),
short_description,
long_description,
],
"categories": add_arrows([category_1, category_2, category_3, free_text, ]),
"categories_single":
(element for element in [category_1, category_2, category_3, free_text, ]
if element and element != "None"),
"short_description": short_description,
"long_description": long_description,
"user": request.user,
"type": _("Issue"),
}
send_templated_mail(
template_name="hjelp",
template_name="rebus",
from_email=request.user.person.mail_sender_via,
headers={
"Reply-To": request.user.person.mail_sender,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment