remotes/origin/stage6
Alexander Burdeinyi 9 years ago
parent 38d0d27e5a
commit f7d2f25d10
  1. 1
      emencia/django/newsletter/models.py
  2. 30
      emencia/django/newsletter/templates/newsletter/AutomaticEmail.html

@ -633,6 +633,7 @@ class Newsletter(models.Model):
slug = models.SlugField(help_text=_('Used for displaying the newsletter on the site.'), slug = models.SlugField(help_text=_('Used for displaying the newsletter on the site.'),
unique=True) unique=True)
dailymail = models.BooleanField(_(u'Ежедневная рассылка'), blank=True, default=False) dailymail = models.BooleanField(_(u'Ежедневная рассылка'), blank=True, default=False)
# banner = models.ImageField(_(u'Баннер'))
creation_date = models.DateTimeField(_('creation date'), auto_now_add=True) creation_date = models.DateTimeField(_('creation date'), auto_now_add=True)
modification_date = models.DateTimeField(_('modification date'), auto_now=True) modification_date = models.DateTimeField(_('modification date'), auto_now=True)

@ -84,7 +84,7 @@
<table> <table>
<tr> <tr>
<td valign="top" style="width: 225px;"> <td valign="top" style="width: 225px;">
<img src="cid:recommended{{ recommended.object.pk }}"/> <a href="http://{{ domain }}{{ obj.get_permanent_url }}"><img src="cid:recommended{{ recommended.object.pk }}"/></a>
{% comment %} {% comment %}
{% thumbnail obj.get_logo '281x225' as im %} {% thumbnail obj.get_logo '281x225' as im %}
<img src="{{ im.url }}"/> <img src="{{ im.url }}"/>
@ -102,7 +102,7 @@
</tr> </tr>
<tr> <tr>
<td style="color: #333333; font-size: 25px; font-weight: bold; padding: 3px 0px 3px 0px;">{{ obj.name|safe }}</td> <td style="color: #333333; font-size: 25px; font-weight: bold; padding: 3px 0px 3px 0px;"><a href="http://{{ domain }}{{ obj.get_permanent_url }}">{{ obj.name|safe }}</a></td>
</tr> </tr>
<tr> <tr>
@ -156,7 +156,7 @@
<table style="width: 100%; margin-top: 15px;"> <table style="width: 100%; margin-top: 15px;">
<tr {% if not forloop.last %}style="border-bottom: 1px solid #eaeaea;"{% endif %}> <tr {% if not forloop.last %}style="border-bottom: 1px solid #eaeaea;"{% endif %}>
<td valign="top" style="width: 110px;"> <td valign="top" style="width: 110px;">
<img src="cid:moscow_{{ sqs_obj.object.event_type }}_{{ sqs_obj.object.pk }}" style="border: 1px solid #eaeaea;"/> <a href="http://{{ domain }}{{ obj.get_permanent_url }}"><img src="cid:moscow_{{ obj.event_type }}_{{ obj.pk }}" style="border: 1px solid #eaeaea;"/></a>
{% comment %} {% comment %}
{% thumbnail obj.get_logo '109x114' as im %} {% thumbnail obj.get_logo '109x114' as im %}
<img style="border: 1px solid #eaeaea;" src="{{ im.url }}"/> <img style="border: 1px solid #eaeaea;" src="{{ im.url }}"/>
@ -166,7 +166,7 @@
<td style="padding-left: 20px;"> <td style="padding-left: 20px;">
<table style="width: 100%;"> <table style="width: 100%;">
<tr> <tr>
<td style="color: #333333; text-transform: uppercase; font-size: 17px; font-weight: bold; padding-bottom: 5px;">{{ obj.name|safe }}</td> <td style="color: #333333; text-transform: uppercase; font-size: 17px; font-weight: bold; padding-bottom: 5px;"><a href="http://{{ domain }}{{ obj.get_permanent_url }}">{{ obj.name|safe }}</a></td>
</tr> </tr>
<tr> <tr>
@ -229,7 +229,7 @@
<table style="width: 100%; margin-top: 15px;"> <table style="width: 100%; margin-top: 15px;">
<tr {% if not forloop.last %}style="border-bottom: 1px solid #eaeaea;"{% endif %}> <tr {% if not forloop.last %}style="border-bottom: 1px solid #eaeaea;"{% endif %}>
<td valign="top"> <td valign="top">
<img src="cid:russia_{{ sqs_obj.object.event_type }}_{{ sqs_obj.object.pk }}" style="border: 1px solid #eaeaea;"/> <a href="http://{{ domain }}{{ obj.get_permanent_url }}"><img src="cid:russia_{{ obj.event_type }}_{{ obj.pk }}" style="border: 1px solid #eaeaea;"/></a>
{% comment %} {% comment %}
{% thumbnail obj.get_logo '109x114' as im %} {% thumbnail obj.get_logo '109x114' as im %}
<img style="border: 1px solid #eaeaea;" src="{{ im.url }}"/> <img style="border: 1px solid #eaeaea;" src="{{ im.url }}"/>
@ -248,7 +248,7 @@
</tr> </tr>
<tr> <tr>
<td style="color: #333333; text-transform: uppercase; font-size: 17px; font-weight: bold; padding-bottom: 5px;">{{ obj.name|safe }}</td> <td style="color: #333333; text-transform: uppercase; font-size: 17px; font-weight: bold; padding-bottom: 5px;"><a href="http://{{ domain }}{{ obj.get_permanent_url }}">{{ obj.name|safe }}</a></td>
</tr> </tr>
<tr> <tr>
@ -264,7 +264,7 @@
<tr> <tr>
<td style="padding-bottom: 15px; padding-top: 10px;"> <td style="padding-bottom: 15px; padding-top: 10px;">
<a href="#" style="display: inline-block; padding: 7px 20px 7px 20px; border: 1px solid #ff6600; color: #ff6600; text-decoration: none; text-transform: uppercase; font-size: 12px; line-height: 12px; border-radius: 5px;">{% trans "подробнее" %}</a> <a href="http://{{ domain }}{{ obj.get_permanent_url }}" style="display: inline-block; padding: 7px 20px 7px 20px; border: 1px solid #ff6600; color: #ff6600; text-decoration: none; text-transform: uppercase; font-size: 12px; line-height: 12px; border-radius: 5px;">{% trans "подробнее" %}</a>
</td> </td>
</tr> </tr>
</table> </table>
@ -305,7 +305,7 @@
<table style="width: 130px; margin: 0 auto;"> <table style="width: 130px; margin: 0 auto;">
<tr> <tr>
<td style="padding-bottom: 15px;"> <td style="padding-bottom: 15px;">
<img src="cid:foreign_{{ sqs_obj.object.event_type }}_{{ sqs_obj.object.pk }}" style="border: 1px solid #eaeaea;"/> <a href="http://{{ domain }}{{ obj.get_permanent_url }}"><img src="cid:foreign_{{ sqs_obj.object.event_type }}_{{ sqs_obj.object.pk }}" style="border: 1px solid #eaeaea;"/></a>
{% comment %} {% comment %}
{% thumbnail obj.get_logo '109x114' as im %} {% thumbnail obj.get_logo '109x114' as im %}
<img style="border: 1px solid #eaeaea;" src="{{ im.url }}"/> <img style="border: 1px solid #eaeaea;" src="{{ im.url }}"/>
@ -322,7 +322,7 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="font-family: Arial, sans-serif; color: #333333; font-size: 17px; font-weight: bold; padding-bottom: 10px;">{{ obj.name|safe }}</td> <td style="font-family: Arial, sans-serif; color: #333333; font-size: 17px; font-weight: bold; padding-bottom: 10px;"><a href="http://{{ domain }}{{ obj.get_permanent_url }}">{{ obj.name|safe }}</a></td>
</tr> </tr>
<tr> <tr>
<td style="color: #3399cc; font-size: 12px; padding-bottom: 5px;"> <td style="color: #3399cc; font-size: 12px; padding-bottom: 5px;">
@ -399,7 +399,7 @@
<table style="width: 100%;"> <table style="width: 100%;">
<tr> <tr>
<td style="width: 300px; text-align: center; padding-bottom: 30px;"> <td style="width: 300px; text-align: center; padding-bottom: 30px;">
<img src="cid:news{{ news.pk }}" alt=""> <a href="http://{{ domain }}{{ news.get_permanent_url }}"><img src="cid:news{{ news.pk }}" alt=""></a>
{% comment %} {% comment %}
{% thumbnail news.logo "272x195" as im %} {% thumbnail news.logo "272x195" as im %}
<img src="{{ im.url }}" alt=""> <img src="{{ im.url }}" alt="">
@ -412,16 +412,16 @@
<td valign="top"> <td valign="top">
<table> <table>
<tr> <tr>
<td style="padding-bottom: 8px; font-family: Arial, sans-serif; font-size: 17px; font-weight: bold; text-transform: uppercase; color: #333333;">{{ news.main_title|safe }}</td> <td style="padding-bottom: 8px; font-family: Arial, sans-serif; font-size: 17px; font-weight: bold; text-transform: uppercase; color: #333333;"><a href="http://{{ domain }}{{ news.get_permanent_url }}">{{ news.main_title|safe }}</a></td>
</tr> </tr>
<tr> <tr>
<td valign="middle" style="color: #3399cc; font-size: 13px; padding-bottom: 8px;"> <td valign="middle" style="color: #3399cc; font-size: 13px; padding-bottom: 8px;">
<img src="cid:calendar" alt="" style="margin-right: 4px;"> <img src="cid:calendar" alt="" style="margin-right: 4px;">
{# С 1 по 4 сентября #} {{ news.publish_date|date:"d E Y" }}
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="font-family: Arial, sans-serif; color: #999999; font-size: 13px; padding-bottom: 20px; line-height: 1.5;">{{ news.preview|safe }}</td> <td style="font-family: Arial, sans-serif; color: #999999; font-size: 13px; padding-bottom: 20px; line-height: 1.5;">{{ news.preview|safe|truncatechars_html:60 }}</td>
</tr> </tr>
<tr> <tr>
<td> <td>
@ -451,7 +451,7 @@
<table style="width: 100%;"> <table style="width: 100%;">
<tr> <tr>
<td style="width: 300px; text-align: center; padding-bottom: 40px;"> <td style="width: 300px; text-align: center; padding-bottom: 40px;">
<img src="cid:blog{{ blog.pk }}" alt=""> <a href="http://{{ domain }}{{ blog.get_permanent_url }}"><img src="cid:blog{{ blog.pk }}" alt=""></a>
{% comment %} {% comment %}
{% thumbnail blog.logo "272x195" as im %} {% thumbnail blog.logo "272x195" as im %}
<img src="{{ im.url }}" alt=""> <img src="{{ im.url }}" alt="">
@ -462,7 +462,7 @@
<td valign="top"> <td valign="top">
<table> <table>
<tr> <tr>
<td style="padding-bottom: 15px; font-family: Arial, sans-serif; font-size: 17px; font-weight: bold; text-transform: uppercase; color: #333333">{{ blog.main_title|safe }}</td> <td style="padding-bottom: 15px; font-family: Arial, sans-serif; font-size: 17px; font-weight: bold; text-transform: uppercase; color: #333333"><a href="http://{{ domain }}{{ blog.get_permanent_url }}">{{ blog.main_title|safe }}</a></td>
</tr> </tr>
<tr> <tr>

Loading…
Cancel
Save