diff --git a/emencia/django/newsletter/mailer.py b/emencia/django/newsletter/mailer.py
index 0bf0b09f..f52a6095 100644
--- a/emencia/django/newsletter/mailer.py
+++ b/emencia/django/newsletter/mailer.py
@@ -117,6 +117,8 @@ dailymail_attahcments = {
'expo': 'newsletter/images/expo.png',
# 'news2': 'newsletter/images/news2.jpg',
'b': 'newsletter/images/b.png',
+ 'arrow': 'newsletter/images/arrow.png',
+ 'white_arrow': 'newsletter/images/white_arrow.png',
'site_logo': 'newsletter/images/site_logo.png',
'instagram': 'newsletter/images/instagram.png',
'youtube': 'newsletter/images/youtube.png',
diff --git a/emencia/django/newsletter/templates/newsletter/AutomaticEmail.html b/emencia/django/newsletter/templates/newsletter/AutomaticEmail.html
index 8355ef84..093f9cb6 100644
--- a/emencia/django/newsletter/templates/newsletter/AutomaticEmail.html
+++ b/emencia/django/newsletter/templates/newsletter/AutomaticEmail.html
@@ -107,7 +107,7 @@
-
+
{{ obj.get_dates }}, {{ obj.get_event_place_name }}
|
@@ -241,7 +241,7 @@
{% if obj.get_event_place_name %}
-
+
{{ obj.get_event_place_name }}
{% endif %}
|
@@ -507,6 +507,7 @@
+ {% url 'newsletter-authmailingsettings' uidb36=uidb36 token=token as settings_url %}
@@ -590,7 +591,7 @@
{% trans "Вы получили это письмо, так как подписаны на рассылку" %} www.expomap.ru |
- | {% trans "Переслать другу" %} {% trans "или" %} {% trans "Отписаться" %} |
+ {% trans "Переслать другу" %} {% trans "или" %} {% trans "Отписаться" %} |
| © 2008 — 2016 Expomap.ru |
diff --git a/emencia/django/newsletter/templates/newsletter/AutomaticEmail_v2.html b/emencia/django/newsletter/templates/newsletter/AutomaticEmail_v2.html
new file mode 100644
index 00000000..ff9de28d
--- /dev/null
+++ b/emencia/django/newsletter/templates/newsletter/AutomaticEmail_v2.html
@@ -0,0 +1,663 @@
+{% load i18n %}
+{#{% load static %}#}
+{#{% load thumbnail %}#}
+
+{# {% trans "ПОСМОТРЕТЬ ВСЕ" %} > #}
+{# {% trans "ПОСМОТРЕТЬ ВСЕ" %} > #}
+{# {% trans "ПОСМОТРЕТЬ ВСЕ" %} > #}
+{# {% trans "НАСТРОИТЬ" %} > #}
+
+
+
+
+
+
+ {% comment %}
+
+ | |
+
+ {% endcomment %}
+
+
+
+
+ {% comment %}
+
+
+
+
+
+ {% endcomment %}
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+ |
+
+
+ |
+
+
+
+ {% if recommended %}
+ {% with recommended.object as obj %}
+
+
+
+
+
+
+ | {% trans "Самые важные события для вас" %} |
+
+
+
+
+
+
+{# {% thumbnail obj.get_logo '281' as im %}#}
+
+{# {% endthumbnail %}#}
+ |
+
+
+
+ |
+
+
+ |
+
+
+ {% endwith %}
+ {% endif %}
+
+ {% if moscow %}
+
+
+
+
+
+
+
+
+
+ | {% trans "в москве" %} |
+
+
+ {% for sqs_obj in moscow %}
+ {% with sqs_obj.object as obj %}
+
+ {% endwith %}
+ {% endfor %}
+
+ |
+
+
+ |
+
+
+
+ {% endif %}
+
+
+
+ {% if russia %}
+
+
+
+
+
+
+
+
+
+ | {% trans "В России" %} |
+
+
+ {% for sqs_obj in russia %}
+ {% with sqs_obj.object as obj %}
+
+
+
+
+{# {% thumbnail obj.get_logo '100x100' as im %}#}
+
+{# {% endthumbnail %}#}
+
+ |
+
+
+
+ {% if forloop.first %}
+
+ {% if obj.get_event_place_name %}
+
+ {{ obj.get_event_place_name }}
+ {% endif %}
+ |
+ {% elif forloop.counter == 2 %}
+
+ {% if obj.get_event_place_name %}
+
+ {{ obj.get_event_place_name }}
+ {% endif %}
+ |
+ {% elif forloop.counter == 3 %}
+
+ {% if obj.get_event_place_name %}
+
+ {{ obj.get_event_place_name }}
+ {% endif %}
+ |
+ {% endif %}
+
+
+
+ | {{ obj.name|safe }} |
+
+
+
+ | {{ obj.main_title|safe }} |
+
+
+
+
+
+ {{ obj.get_dates }}
+ |
+
+
+
+
+ {% trans "подробнее" %}
+ |
+
+
+ |
+
+
+ {% endwith %}
+ {% endfor %}
+
+
+
+ |
+
+
+ |
+
+
+ {% endif %}
+
+
+
+ {% if foreign %}
+
+
+
+
+
+
+ | {% trans "За рубежом" %} |
+
+
+
+
+
+
+ {% for sqs_obj in foreign %}
+ {% with sqs_obj.object as obj %}
+ |
+
+ |
+ {% endwith %}
+ {% endfor %}
+
+
+ |
+
+
+
+
+ {% trans "Посмотреть все" %}
+ |
+
+
+ |
+
+
+ {% endif %}
+
+{# -------------- БАНЕР --------------- #}
+ {% if newsletter.banner %}
+{# {% thumbnail newsletter.banner '129x600' as im %}#}
+
+{# {% endthumbnail %}#}
+ {% endif %}
+
+ {% if news %}
+
+
+
+
+
+
+ | {% trans "Новости событий" %} |
+
+
+
+{# {% thumbnail news.logo "272" as im %}#}
+
+{# {% endthumbnail %}#}
+ |
+
+
+
+ |
+
+
+ |
+
+
+ {% endif %}
+
+
+
+ {% if blog %}
+
+
+ {% comment %}
+
+ | {% trans "Новенькое из блога" %} |
+
+ {% endcomment %}
+
+
+
+
+
+ | {% trans "Новенькое из блога" %} |
+
+
+
+{# {% thumbnail blog.logo "272" as im %}#}
+
+{# {% endthumbnail %}#}
+ |
+
+
+
+ |
+
+
+ |
+
+
+ {% endif %}
+
+
+
+
+
+
+
+
+ | {% trans "Следуйте за нами" %}:
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+ |
+
+
+
+
+
+
+
+ | {% trans "Управление подпиской:" %} |
+
+
+
+ | {% trans "Вы можете настроить включение различных блоков информации в свое письмо, выбратьфильтры по темам, странам и городам, а также выбрать комфортную периодичность получения писем." %} |
+
+
+
+
+ {% trans "Настроить" %}
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+  |
+
+
+
+ | {% trans "Хорошего Вам дня!" %} |
+
+
+ |
+
+
+
+
+
+ {% trans "Поисковик деловых событий" %}
+ expomap.ru
+ mail@expomap.ru
+ |
+
+
+
+
+ {% trans "По вопросам участия в выставках звоните" %}:
+ +7 (499) 999 -12-07
+ |
+
+
+ |
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+ {% comment %}
+
+ |
+
+
+
+ {% endcomment %}
+
+ |
+
+
+
diff --git a/emencia/django/newsletter/templates/newsletter/AutomaticEmail_web.html b/emencia/django/newsletter/templates/newsletter/AutomaticEmail_web.html
index 3684abd7..20a03dae 100644
--- a/emencia/django/newsletter/templates/newsletter/AutomaticEmail_web.html
+++ b/emencia/django/newsletter/templates/newsletter/AutomaticEmail_web.html
@@ -37,6 +37,35 @@
text-decoration: none;
}
+ .event_image{
+ display: block;
+ border: 1px solid #eaeaea;
+ text-align: center;
+ width: 110px;
+ height: 110px;
+ background-color: #ffffff;
+ line-height: 108px;
+ }
+
+ .event_image img{
+ vertical-align: middle;
+ }
+
+ .foreign_image{
+ display: block;
+ width: 128px;
+ height: 128px;
+ line-height: 128px;
+ background-color: #fff;
+ border: 1px solid #eaeaea;
+ text-align: center;
+ }
+
+ .foreign_image img{
+ display: inline-block;
+ vertical-align: middle;
+ }
+
@media screen and (max-width: 600px) {
.mobile100 {width:100% !important;}
}
@@ -72,7 +101,7 @@
- |
+ |
|
@@ -90,17 +119,17 @@
- |
+ |
| {% trans "Самые важные события для вас" %} |
-
+
@@ -156,68 +185,77 @@
{% if moscow %}
-
+
-
-
+
+
- | {% trans "в москве" %} |
-
-
- {% for sqs_obj in moscow %}
- {% with sqs_obj.object as obj %}
-
-
-
- {% thumbnail obj.get_logo '109x114' as im %}
-
- {% endthumbnail %}
- |
-
+ |
-
- | {{ obj.name|safe }} |
-
-
-
- | {{ obj.main_title|safe }} |
-
-
-
-
-
- {{ obj.get_dates }}
- |
-
-
-
-
- {% if obj.get_event_place_name %}
-
- {{ obj.get_event_place_name }}
- {% endif %}
- |
-
-
-
-
- {% trans "подробнее" %}
- |
-
+
+ | {% trans "в москве" %} |
+
+
+ {% for sqs_obj in moscow %}
+ {% with sqs_obj.object as obj %}
+
+ {% endwith %}
+ {% endfor %}
+
- |
-
-
- {% endwith %}
- {% endfor %}
-
|
+
{% endif %}
@@ -228,63 +266,88 @@
-
-
+
+
- | {% trans "В России" %} |
-
-
- {% for sqs_obj in russia %}
- {% with sqs_obj.object as obj %}
-
-
-
- {% thumbnail obj.get_logo '109x114' as im %}
-
- {% endthumbnail %}
- |
-
+ |
-
- {% if obj.get_event_place_name %}
-
- {{ obj.get_event_place_name }}
- {% endif %}
- |
-
-
-
- | {{ obj.name|safe }} |
-
-
-
- | {{ obj.main_title|safe }} |
+ {% trans "В России" %} |
-
-
-
-
- {{ obj.get_dates }}
+ |
+ {% for sqs_obj in russia %}
+ {% with sqs_obj.object as obj %}
+
+
+
+
+ {% thumbnail obj.get_logo '100x100' as im %}
+
+ {% endthumbnail %}
+
+ |
+
+
+
+ {% if forloop.first %}
+
+ {% if obj.get_event_place_name %}
+
+ {{ obj.get_event_place_name }}
+ {% endif %}
+ |
+ {% elif forloop.counter == 2 %}
+
+ {% if obj.get_event_place_name %}
+
+ {{ obj.get_event_place_name }}
+ {% endif %}
+ |
+ {% elif forloop.counter == 3 %}
+
+ {% if obj.get_event_place_name %}
+
+ {{ obj.get_event_place_name }}
+ {% endif %}
+ |
+ {% endif %}
+
+
+
+ | {{ obj.name|safe }} |
+
+
+
+ | {{ obj.main_title|safe }} |
+
+
+
+
+
+ {{ obj.get_dates }}
+ |
+
+
+
+
+ {% trans "подробнее" %}
+ |
+
+
|
+
+ {% endwith %}
+ {% endfor %}
+
- |
-
-
- {% endwith %}
- {% endfor %}
-
@@ -297,62 +360,70 @@
{% if foreign %}
-
-
- | {% trans "За рубежом" %} |
-
-
+
-
+
+
+ | {% trans "За рубежом" %} |
+
+
- {% for sqs_obj in foreign %}
- {% with sqs_obj.object as obj %}
-
-
-
-
- {% thumbnail obj.get_logo '109x114' as im %}
-
- {% endthumbnail %}
- |
-
-
-
- {% if obj.get_event_place_name %}
-
- {{ obj.get_event_place_name }}
- {% endif %}
- |
-
-
- | {{ obj.name|safe }} |
-
-
-
-
- {{ obj.get_dates }}
- |
-
-
- |
- {% for tag in obj.tags %}
- {{ tag.name }}{% if not forloop.last %},{% endif %}
+ |
+
+
+ {% for sqs_obj in foreign %}
+ {% with sqs_obj.object as obj %}
+ |
+
+ |
+ {% endwith %}
{% endfor %}
-
-
-
+ |
+
|
- {% endwith %}
- {% endfor %}
-
-
-
-
-
- {% trans "Посмотреть все" %}
+ |
+
+ {% trans "Посмотреть все" %}
+ |
+
+
|
@@ -393,11 +464,11 @@
- | {{ news.preview|safe|striptags }} |
+ {{ news.preview|safe|truncatewords_html:25 }} |
- {% trans "Все новости" %}
+ {% trans "Все новости" %}
|
@@ -445,7 +516,7 @@
|
- {% trans "посмотреть Подробнее" %}
+ {% trans "посмотреть Подробнее" %}
|
@@ -469,11 +540,11 @@
|
-
-
-
-
-
+
+
+
+
+
|
@@ -494,7 +565,7 @@
|
- {% trans "Настроить" %}
+ {% trans "Настроить" %}
|
diff --git a/proj/middleware.py b/proj/middleware.py
index 62b2d743..15b61b69 100644
--- a/proj/middleware.py
+++ b/proj/middleware.py
@@ -120,7 +120,7 @@ MIDDLEWARE_CLASSES += ('core_utils.middleware.SpacelessMiddleware',)
class SpacelessMiddleware(object):
""" trim spaces between tags if not in DEBUG """
def process_response(self, request, response):
- if response.get('Content-Type').startswith('text/html'):
+ if response.get('Content-Type', '').startswith('text/html'):
cont = strip_spaces_between_tags(response.content)
response.content = re.sub(r'^\s+<','<', cont)
return response
| |