Commit e7b35904 by Tyler Hallada

Add verified cert image to email template

Make image url in the task and pass to template
parent 9876f597
......@@ -6,6 +6,7 @@ from celery.task import task
from django.conf import settings
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
from django.contrib.staticfiles.templatetags.staticfiles import static
from django.core.exceptions import ValidationError
from django.core.urlresolvers import reverse
from django.db.models import F, Min
......@@ -285,6 +286,7 @@ def _upgrade_reminder_schedules_for_bin(target_day, bin_num, org_list, exclude_o
# This is used by the bulk email optout policy
'course_ids': course_id_strs,
'cert_image': absolute_url(static('course_experience/images/verified-cert.png')),
})
yield (user, first_schedule.enrollment.course.language, template_context)
......
{% extends 'schedules/edx_ace/common/base_body.html' %}
{% load i18n %}
{% load static %}
{% block preview_text %}
{% blocktrans trimmed %}
......@@ -29,14 +30,27 @@
{% endblocktrans %}
</p>
<a href="{{ course_url }}">
<img
src="{{ cert_image }}"
alt="{% blocktrans %}Example print-out of a verified certificate{% endblocktrans %}"
style="
display: block;
margin-right: auto;
margin-left: auto;
margin-top: 50px;
margin-bottom: 50px;
border-top: 1px solid lightgray;
border-bottom: 3px solid lightgray;
border-right: 3px solid lightgray;
border-left: 1px solid lightgray;
" />
</a>
<p>
<!-- email client support for style sheets is pretty spotty, so we have to inline all of these styles -->
<a
{% if course_ids|length > 1 %}
href="{{ dashboard_url }}"
{% else %}
href="{{ course_url }}"
{% endif %}
style="
color: #ffffff;
text-decoration: none;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment