Skip to content

Commit

Permalink
add templates for mail, slack, and alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
hblankenship committed Nov 7, 2024
1 parent a909cfd commit c5909cc
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dojo/templates/notifications/alert/engagement_closed.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{% load i18n %}{% blocktranslate trimmed with eng_name=engagement.name eng_product=engagement.product %}
The engagement "{{ eng_name }}" has been closed in the product "{{ eng_product }}".
{% endblocktranslate %}
41 changes: 41 additions & 0 deletions dojo/templates/notifications/mail/engagement_closed.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{% load i18n %}
{% load navigation_tags %}
{% load display_tags %}
{% url 'view_product' engagement.product.id as product_url %}
{% url 'view_engagement' engagement.id as engagement_url %}
<html>
<body>
{% autoescape on %}
<p>
{% trans "Hello" %},
</p>
<p>
{% blocktranslate trimmed with engagement_name=engagement.name engagement_product=engagement.product prod_url=product_url|full_url eng_url=engagement_url|full_url%}
The engagement "{{ engagement_name }}" has been closed in the product "{{ engagement_product }}". It can be viewed here: <a href="{{prod_url}}">{{product}}</a> / <a href="{{eng_url}}">{{ engagement_name }}</a>
{% endblocktranslate %}
</p>
<br/>
<br/>
{% trans "Kind regards" %},<br/>
<br/>
{% if system_settings.team_name %}
{{ system_settings.team_name }}
{% else %}
Defect Dojo
{% endif %}
<br/>
<br/>
<p>
{% url 'notifications' as notification_url %}
{% trans "You can manage your notification settings here" %}: <a href="{{ notification_url|full_url }}">{{ notification_url|full_url }}</a>
</p>
{% if system_settings.disclaimer and system_settings.disclaimer.strip %}
<br/>
<div style="background-color:#DADCE2; border:1px #003333; padding:.8em; ">
<span style="font-size:16pt; font-family: 'Cambria','times new roman','garamond',serif; color:#ff0000;">{% trans "Disclaimer" %}</span><br/>
<p style="font-size:11pt; line-height:10pt; font-family: 'Cambria','times roman',serif;">{{ system_settings.disclaimer }}</p>
</div>
{% endif %}
{% endautoescape %}
</body>
</html>
10 changes: 10 additions & 0 deletions dojo/templates/notifications/slack/engagement_closed.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{% load i18n %}
{% load display_tags %}
{% blocktranslate trimmed with name=engagement.name eng_product=engagement.product eng_url=url|full_url %}
The engagement "{{ name }}" has been closed in the product "{{ eng_product }}". It can be viewed here: {{ eng_url }}
{% endblocktranslate %}
{% if system_settings.disclaimer and system_settings.disclaimer.strip %}

{% trans "Disclaimer" %}:
{{ system_settings.disclaimer }}
{% endif %}

0 comments on commit c5909cc

Please sign in to comment.