Subscription fixes

remotes/origin/1203
Nazar Kotjuk 10 years ago
parent 7e39dea97a
commit 24ee1b1c92
  1. 2
      emencia/django/newsletter/forms.py
  2. 6
      emencia/django/newsletter/models.py
  3. 28
      emencia/django/newsletter/urls/__init__.py
  4. 33
      emencia/django/newsletter/views/expo_views.py
  5. 17
      settings/templatetags/template_filters.py
  6. 1
      templates/admin/includes/admin_nav.html
  7. 2
      templates/client/includes/footer.html
  8. 25
      templates/client/newsletters/activation_send.html
  9. 27
      templates/client/newsletters/activation_template.html
  10. 55
      templates/client/newsletters/announce_template.html
  11. 131
      templates/client/popups/announce_subscription.html
  12. 2
      templates/registration/activation_email.html

@ -68,6 +68,7 @@ class AllMailingListSubscriptionForm(MailingListSubscriptionForm):
class ContactForm(forms.ModelForm):
email = forms.CharField(required=True, widget=forms.TextInput(attrs={'placeholder': _(u'Ваш e-mail')}))
first_name = forms.CharField(required=True, widget=forms.TextInput(attrs={'placeholder': _(u'Ваше имя')}))
class Meta:
model = Contact
fields = ('email', 'first_name', )
@ -76,6 +77,7 @@ class ContactForm(forms.ModelForm):
class ContactSettingsForm(forms.ModelForm):
theme = forms.MultipleChoiceField(choices=[(str(item.id), item.name) for item in list(Theme.objects.language().all())],
widget=forms.CheckboxSelectMultiple(attrs={'class': 'pr-checkbox'}), required=False)
class Meta:
model = ContactSettings
fields = ('exponent_practicum', 'organiser_practicum', 'theme')

@ -215,8 +215,7 @@ class Contact(models.Model):
('/img/soc-medias/sm-icon-fb.png', 'fb'),
('/img/soc-medias/sm-icon-lin.png', 'linkedin'),
('/img/soc-medias/sm-icon-vk.png', 'vk'),
('/img/soc-medias/sm-icon-twit.png', 'twit'),
('/img/mail-logo-2.jpg','logo2'))
('/img/soc-medias/sm-icon-twit.png', 'twit'))
for img in images:
fp = open(settings.STATIC_ROOT+img[0], 'rb')
msg_img = MIMEImage(fp.read())
@ -243,7 +242,8 @@ class ContactSettings(models.Model):
]
contact = models.OneToOneField(Contact)
periodic = models.PositiveIntegerField(verbose_name=_(u'Периодичность отправки'), choices=PERIODIC_CHOICES, default=WEEK)
periodic = models.PositiveIntegerField(verbose_name=_(u'Периодичность отправки'),
choices=PERIODIC_CHOICES, default=WEEK)
exponent_practicum = models.BooleanField(default=True, verbose_name=_(u'Практикум экспонента'))
organiser_practicum = models.BooleanField(default=True, verbose_name=_(u'Практикум организатора событий'))
theme = models.ManyToManyField('theme.Theme', blank=True, null=True, verbose_name=_(u'Тематики'))

@ -7,16 +7,20 @@ from emencia.django.newsletter.views.expo_views import SubscribeView, Activation
urlpatterns = patterns('',
url(r'^mailing/', include('emencia.django.newsletter.urls.mailing_list')),
url(r'^tracking/', include('emencia.django.newsletter.urls.tracking')),
url(r'^statistics/', include('emencia.django.newsletter.urls.statistics')),
url(r'^', include('emencia.django.newsletter.urls.newsletter')),
url(r'^mailing/', include('emencia.django.newsletter.urls.mailing_list')),
url(r'^tracking/', include('emencia.django.newsletter.urls.tracking')),
url(r'^statistics/', include('emencia.django.newsletter.urls.statistics')),
url(r'^', include('emencia.django.newsletter.urls.newsletter')),
url(r'^test-letter/', TemplateView.as_view(template_name='client/newsletters/announce_template.html')),
url(r'^activation/complete/', TemplateView.as_view(template_name='client/newsletters/activation_complete.html'),
name='subscription_activation_complete'),
url(r'^activate/(?P<activation_key>.*)/$', ActivationView.as_view(), name='subscription_activation'),
url(r'^subsribe/aside/$', 'emencia.django.newsletter.views.expo_views.subscribe_aside',
name='newsletter_subscription_aside'),
url(r'^$', SubscribeView.as_view(), name='newsletter_subscription'),
)
url(r'^test-letter/', TemplateView.as_view(template_name='client/newsletters/announce_template.html')),
url(r'^activation/send/', TemplateView.as_view(template_name='client/newsletters/activation_send.html'),
name='subscription_activation_send'),
url(r'^activation/complete/', TemplateView.as_view(template_name='client/newsletters/activation_complete.html'),
name='subscription_activation_complete'),
url(r'^activate/(?P<activation_key>.*)/$', ActivationView.as_view(), name='subscription_activation'),
url(r'^popup/validate/$', 'emencia.django.newsletter.views.expo_views.popup_validate',
name='newsletter_subscription_popup_validate'),
url(r'^subsribe/aside/$', 'emencia.django.newsletter.views.expo_views.subscribe_aside',
name='newsletter_subscription_aside'),
url(r'^$', SubscribeView.as_view(), name='newsletter_subscription'),
)

@ -12,7 +12,7 @@ from country.models import Country
class SubscribeView(FormView):
form_class = ContactForm
template_name = 'client/newsletters/subcribe.html'
success_url = '/'
success_url = '/newsletters/activation/send/'
def get_form(self, form_class):
if self.request.POST:
@ -40,24 +40,25 @@ class SubscribeView(FormView):
if form2.is_valid():
contact_setting = form2.save(commit=False)
if not contact_setting.contact_id:
contact_setting.contact = contact
contact_setting.save()
form2.save_m2m()
"""
# get country from request
country_code = self.request.META.get('HTTP_GEOIP_COUNTRY_CODE')
try:
country = Country.objects.get(country_code=country_code)
contact_setting.country.add(country)
contact_setting.area.add(country.area)
except Country.DoesNotExist:
pass
else:
contact_setting.contact_country = country
contact_setting.save()
"""
contact.send_activation()
return HttpResponseRedirect(self.success_url)
def get_context_data(self, **kwargs):
context = super(SubscribeView, self).get_context_data(**kwargs)
context['form2'] = ContactSettingsForm(initial=self.get_initial())
@ -137,3 +138,25 @@ def subscribe_aside(request):
return HttpResponse('not form request')
def popup_validate(request):
response = {'success': False}
if request.GET:
form = ContactForm(request.GET)
if form.is_valid():
contact = form.save()
form2 = ContactSettingsForm(request.GET)
if form2.is_valid():
contact_setting = form2.save(commit=False)
contact_setting.contact = contact
contact_setting.exponent_practicum, contact_setting.organiser_practicum = True, True
contact_setting.save()
form2.save_m2m()
contact.send_activation()
response['success'] = True
else:
response['errors'] = form.errors
return HttpResponse(json.dumps(response, indent=2), content_type='application/json')

@ -1,11 +1,13 @@
# -*- coding: utf-8 -*-
from django import template
import base64
import phonenumbers
import datetime, random
import datetime
import random
from dateutil.relativedelta import relativedelta
from datetime import timedelta
from django import template
from dateutil.relativedelta import relativedelta
from django.utils import translation
from theme.models import Theme
from exposition.models import Exposition
from conference.models import Conference
from seminar.models import Seminar
@ -309,3 +311,12 @@ def how_many_years(value):
delta = now - value
return delta.days/365
@register.filter
def get_theme_name(id):
try:
theme = Theme.objects.language().get(id=id)
except Theme.DoesNotExist:
return ''
else:
return theme.name

@ -114,7 +114,6 @@
<li><a href="/admin/newsletters/contact/all/">Подписчики</a></li>
<li><a href="/admin/newsletters/mailinglist/all/">Списки рассылок</a></li>
<li><a href="/admin/newsletters/newsletters/all/">Рассылки</a></li>
<li><a href="#">Статистика</a></li>
</ul>
</li>

@ -5,7 +5,7 @@
<div class="layout-wrap footer-wrap">
<aside>
<div class="copy">© 2008 — 2015 Expomap.ru</div>
<div class="copy">© 2008 — {% now "Y" %} Expomap.ru</div>
<ul class="soc-media-buttons">
{% comment %}
<!-- task EXPO-145-->

@ -0,0 +1,25 @@
{% extends "base_catalog.html" %}
{% load i18n %}
{% block page_body %}
<div class="m-article event-page">
<div class="item-wrap event clearfix" style="padding-left: 10px;">
<div class="i-info">
<header>
<div class="i-title">
{% trans 'Проверьте почту' %}
</div>
</header>
<div class="i-address">
<header>
<div class="address">
{% trans 'Мы работаем для настоящий и живых подписчиков! Поэтому подтвердите свой email, письмо уже на Вашей почте!' %}
</div>
</header>
</div>
</div>
</div>
</div>
{% endblock %}

@ -62,12 +62,6 @@
</td>
</tr>
<tr valign="top">
<td style="padding:32px 0 20px 0; text-align: left;">
В личном кабинете вам доступен собственный профиль, персональная лента <span style="border-bottom: 1px dashed #ee3824;">событий</span>,свое расписание, сообщения и многое другое.
</td>
</tr>
</table>
@ -76,28 +70,11 @@
</tr>
</table>
<table cellpadding="0" cellspacing="0" border="0" width="600" style="width: 600px; border-bottom: 1px dotted #cccccc;">
<tr>
<td style="vertical-align: top; padding: 15px 0 10px;">
<div class="logo">
<a style="text-decoration: none; color: #a2a2a2; font-size: 12px;" href="#">
<img src="cid:logo2" alt="Expomap.ru" />
</a>
</div>
</td>
<td style="vertical-align: top; padding: 25px 0 5px;">
<ul class="t-links" style="margin: 0 0 15px; padding: 0; list-style: none; text-align: right; font-size: 14px; line-height: 15px; font-weight: bold;">
<li style="display: inline-block;"><a target="_blank" style="text-decoration: none; color: #ff6600" href="http://expomap.ru/expo/">СОБЫТИЯ</a></li>
<li style="display: inline-block; margin-left: 20px;"><a target="_blank" style="text-decoration: none; color: #ff6600" href="http://expomap.ru/places/">МЕСТА</a></li>
<li style="display: inline-block; margin-left: 20px;"><a target="_blank" style="text-decoration: none; color: #ff6600" href="http://expomap.ru/members/">УЧАСТНИКИ</a></li>
</ul>
</td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" border="0" width="600" style="width: 600px; font-size: 12px; line-height: 15px;">
<tr>
<td style="vertical-align: top; padding: 15px 0 15px; color: #a2a2a2; text-align: right;">
© 2007 — 2015 <a style="color: #a2a2a2; text-decoration: none;" href="http://expomap.ru/">Expomap.ru</a>
© 2007 — {% now "Y" %} <a style="color: #a2a2a2; text-decoration: none;" href="http://expomap.ru/">Expomap.ru</a>
</td>
</tr>
</table>

@ -1,8 +1,9 @@
{% load static %}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html style="margin: 0; padding: 0; height: 100%;">
<head>
<title></title>
<title>Тестовове письмо</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
</head>
<body style="margin: 0; padding: 0; min-height: 100%; background: #f4f2ee;">
@ -15,7 +16,7 @@
<td style="vertical-align: top;">
<div class="logo">
<a style="text-decoration: none; color: #a2a2a2; font-size: 12px;" href="#">
<img src="img/logo.png" alt="Expomap.ru" />
<img src="{% static 'client/img/logo.png' %}" alt="Expomap.ru" />
<b style="display: block; padding-left: 67px; margin-top: -5px;">Выставки, конференции, семинары</b>
</a>
</div>
@ -28,11 +29,11 @@
</ul>
<ul class="soc-media-buttons" style="margin: 0; padding: 0; list-style: none; text-align: right;">
<li style="display: inline-block;"><a href="#"><img src="img/soc-medias/sm-icon-rss.png" title="RSS" alt="RSS" /></a></li>
<li style="display: inline-block; margin-left: 5px;"><a href="#"><img src="img/soc-medias/sm-icon-fb.png" title="Facebook" alt="Facebook" /></a></li>
<li style="display: inline-block; margin-left: 5px;"><a href="#"><img src="img/soc-medias/sm-icon-lin.png" title="LinkedIn" alt="LinkedIn" /></a></li>
<li style="display: inline-block; margin-left: 5px;"><a href="#"><img src="img/soc-medias/sm-icon-vk.png" title="В контакте" alt="В контакте" /></a></li>
<li style="display: inline-block; margin-left: 5px;"><a href="#"><img src="img/soc-medias/sm-icon-twit.png" title="Twitter" alt="Twitter" /></a></li>
<li style="display: inline-block;"><a href="#"><img src="{% static 'client/img/soc-medias/sm-icon-rss.png' %}" title="RSS" alt="RSS" /></a></li>
<li style="display: inline-block; margin-left: 5px;"><a href="#"><img src="{% static 'client/img/soc-medias/sm-icon-fb.png' %}" title="Facebook" alt="Facebook" /></a></li>
<li style="display: inline-block; margin-left: 5px;"><a href="#"><img src="{% static 'client/img/soc-medias/sm-icon-lin.png' %}" title="LinkedIn" alt="LinkedIn" /></a></li>
<li style="display: inline-block; margin-left: 5px;"><a href="#"><img src="{% static 'client/img/soc-medias/sm-icon-vk.png' %}" title="В контакте" alt="В контакте" /></a></li>
<li style="display: inline-block; margin-left: 5px;"><a href="#"><img src="{% static 'client/img/soc-medias/sm-icon-twit.png' %}" title="Twitter" alt="Twitter" /></a></li>
</ul>
</td>
</tr>
@ -52,7 +53,7 @@
<td style="padding: 15px 15px 15px 0; width: 76px; border-bottom: 1px dotted #cccccc;">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td style="background: #ffffff; padding: 3px; width: 70px; height: 70px; vertical-align: middle; text-align: center; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px;"><a href="#"><img src="img/_del-temp/cl-logo-1.png" style="width: 100%;" alt="" /></a></td>
<td style="background: #ffffff; padding: 3px; width: 70px; height: 70px; vertical-align: middle; text-align: center; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px;"><a href="#"><img src="{% static 'client/img/_del-temp/cl-logo-1.png' %}" style="width: 100%;" alt="" /></a></td>
</tr>
</table>
</td>
@ -60,10 +61,10 @@
<h2 style="margin: 0 0 5px; font-family: Tahoma, Arial, sans-serif; font-size: 18px; line-height: 21px;"><a style="color: #464646; text-decoration: none;" href="#">Foire de Pau 2013</a></h2>
<p style="margin: 0 0 7px; font-size: 12px; line-height: 15px; color: #a2a2a2"><a style="color: #a2a2a2; text-decoration: none;" href="#">Международная ярмарка потребительских товаров</a></p>
<a class="button" style="display: inline-block; padding: 4px 10px 3px; text-decoration: none; color: #ff6600; font-size: 11px; font-weight: bold; line-height: 14px; border: 1px solid #feb17d; text-transform: uppercase; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px;" href="#">добавить в расписание</a>
<div class="addr" style="margin-top: 10px; font-size: 13px; line-height: 15px;"><img src="img/pin.png" width="10" height="15" alt="" style="vertical-align: middle; margin-top: -1px;" /> Россия, Москва, ЦВК «Экспоцентр»</div>
<div class="addr" style="margin-top: 10px; font-size: 13px; line-height: 15px;"><img src="{% static 'client/img/pin.png' %}" width="10" height="15" alt="" style="vertical-align: middle; margin-top: -1px;" /> Россия, Москва, ЦВК «Экспоцентр»</div>
</td>
<td style="padding: 17px 0; text-align: right; font-size: 13px; line-height: 16px; color: #ff6600; width: 140px; border-bottom: 1px dotted #cccccc;">
<img src="img/clock.png" width="14" height="15" style="vertical-align: middle; margin-top: -1px;" alt="" /> с 5 по 20 октября
<img src="{% static 'client/img/clock.png' %}" width="14" height="15" style="vertical-align: middle; margin-top: -1px;" alt="" /> с 5 по 20 октября
</td>
</tr>
@ -71,7 +72,7 @@
<td style="padding: 15px 15px 15px 0; width: 76px; border-bottom: 1px dotted #cccccc;">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td style="background: #ffffff; padding: 3px; width: 70px; height: 70px; vertical-align: middle; text-align: center; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px;"><a href="#"><img src="img/_del-temp/cl-logo-2.png" style="width: 100%;" alt="" /></a></td>
<td style="background: #ffffff; padding: 3px; width: 70px; height: 70px; vertical-align: middle; text-align: center; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px;"><a href="#"><img src="{% static 'client/img/_del-temp/cl-logo-2.png' %}" style="width: 100%;" alt="" /></a></td>
</tr>
</table>
</td>
@ -79,10 +80,10 @@
<h2 style="margin: 0 0 5px; font-family: Tahoma, Arial, sans-serif; font-size: 18px; line-height: 21px;"><a style="color: #464646; text-decoration: none;" href="#">Foire de Pau 2013</a></h2>
<p style="margin: 0 0 7px; font-size: 12px; line-height: 15px; color: #a2a2a2"><a style="color: #a2a2a2; text-decoration: none;" href="#">Международная ярмарка потребительских товаров</a></p>
<a class="button" style="display: inline-block; padding: 4px 10px 3px; text-decoration: none; color: #ff6600; font-size: 11px; font-weight: bold; line-height: 14px; border: 1px solid #feb17d; text-transform: uppercase; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px;" href="#">добавить в расписание</a>
<div class="addr" style="margin-top: 10px; font-size: 13px; line-height: 15px;"><img src="img/pin.png" width="10" height="15" alt="" style="vertical-align: middle; margin-top: -1px;" /> Россия, Москва, ЦВК «Экспоцентр»</div>
<div class="addr" style="margin-top: 10px; font-size: 13px; line-height: 15px;"><img src="{% static 'client/img/pin.png' %}" width="10" height="15" alt="" style="vertical-align: middle; margin-top: -1px;" /> Россия, Москва, ЦВК «Экспоцентр»</div>
</td>
<td style="padding: 17px 0; text-align: right; font-size: 13px; line-height: 16px; color: #ff6600; width: 140px; border-bottom: 1px dotted #cccccc;">
<img src="img/clock.png" width="14" height="15" style="vertical-align: middle; margin-top: -1px;" alt="" /> с 5 по 20 октября
<img src="{% static 'client/img/clock.png' %}" width="14" height="15" style="vertical-align: middle; margin-top: -1px;" alt="" /> с 5 по 20 октября
</td>
</tr>
@ -90,7 +91,7 @@
<td style="padding: 15px 15px 15px 0; width: 76px; border-bottom: 1px dotted #cccccc;">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td style="background: #ffffff; padding: 3px; width: 70px; height: 70px; vertical-align: middle; text-align: center; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px;"><a href="#"><img src="img/_del-temp/cl-logo-3.png" style="width: 100%;" alt="" /></a></td>
<td style="background: #ffffff; padding: 3px; width: 70px; height: 70px; vertical-align: middle; text-align: center; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px;"><a href="#"><img src="{% static 'client/img/_del-temp/cl-logo-3.png' %}" style="width: 100%;" alt="" /></a></td>
</tr>
</table>
</td>
@ -98,10 +99,10 @@
<h2 style="margin: 0 0 5px; font-family: Tahoma, Arial, sans-serif; font-size: 18px; line-height: 21px;"><a style="color: #464646; text-decoration: none;" href="#">Foire de Pau 2013</a></h2>
<p style="margin: 0 0 7px; font-size: 12px; line-height: 15px; color: #a2a2a2"><a style="color: #a2a2a2; text-decoration: none;" href="#">Международная ярмарка потребительских товаров</a></p>
<a class="button" style="display: inline-block; padding: 4px 10px 3px; text-decoration: none; color: #ff6600; font-size: 11px; font-weight: bold; line-height: 14px; border: 1px solid #feb17d; text-transform: uppercase; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px;" href="#">добавить в расписание</a>
<div class="addr" style="margin-top: 10px; font-size: 13px; line-height: 15px;"><img src="img/pin.png" width="10" height="15" alt="" style="vertical-align: middle; margin-top: -1px;" /> Россия, Москва, ЦВК «Экспоцентр»</div>
<div class="addr" style="margin-top: 10px; font-size: 13px; line-height: 15px;"><img src="{% static 'client/img/pin.png' %}" width="10" height="15" alt="" style="vertical-align: middle; margin-top: -1px;" /> Россия, Москва, ЦВК «Экспоцентр»</div>
</td>
<td style="padding: 17px 0; text-align: right; font-size: 13px; line-height: 16px; color: #ff6600; width: 140px; border-bottom: 1px dotted #cccccc;">
<img src="img/clock.png" width="14" height="15" style="vertical-align: middle; margin-top: -1px;" alt="" /> с 5 по 20 октября
<img src="{% static 'client/img/clock.png' %}" width="14" height="15" style="vertical-align: middle; margin-top: -1px;" alt="" /> с 5 по 20 октября
</td>
</tr>
@ -130,7 +131,7 @@
<td style="padding: 15px 15px 15px 0; width: 76px; border-bottom: 1px dotted #cccccc;">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td style="background: #ffffff; padding: 0; width: 76px; height: 76px; vertical-align: middle; text-align: center;"><a href="#"><img style="width: 100%; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px;" alt="" src="img/_del-temp/news-1.jpg" /></a></td>
<td style="background: #ffffff; padding: 0; width: 76px; height: 76px; vertical-align: middle; text-align: center;"><a href="#"><img style="width: 100%; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px;" alt="" src="{% static 'client/img/_del-temp/news-1.jpg' %}" /></a></td>
</tr>
</table>
</td>
@ -151,7 +152,7 @@
<td style="padding: 15px 15px 15px 0; width: 76px; border-bottom: 1px dotted #cccccc;">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td style="background: #ffffff; padding: 0; width: 76px; height: 76px; vertical-align: middle; text-align: center;"><a href="#"><img style="width: 100%; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px;" alt="" src="img/_del-temp/news-1.jpg" /></a></td>
<td style="background: #ffffff; padding: 0; width: 76px; height: 76px; vertical-align: middle; text-align: center;"><a href="#"><img style="width: 100%; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px;" alt="" src="{% static 'client/img/_del-temp/news-1.jpg' %}" /></a></td>
</tr>
</table>
</td>
@ -172,7 +173,7 @@
<td style="padding: 15px 0; width: 76px; border-bottom: 1px dotted #cccccc;">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td style="background: #ffffff; padding: 0; width: 76px; height: 76px; vertical-align: middle; text-align: center;"><a href="#"><img style="width: 100%; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px;" alt="" src="img/_del-temp/news-1.jpg" /></a></td>
<td style="background: #ffffff; padding: 0; width: 76px; height: 76px; vertical-align: middle; text-align: center;"><a href="#"><img style="width: 100%; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px;" alt="" src="{% static 'client/img/_del-temp/news-1.jpg' %}" /></a></td>
</tr>
</table>
</td>
@ -214,11 +215,11 @@
<table cellpadding="0" cellspacing="0" border="0" style="margin-bottom: 10px;">
<tr>
<td style="width: 100px;"><a href="#"><img src="img/_del-temp/phr-1.jpg" width="100" height="100" alt="" /></a></td>
<td style="width: 100px; padding-left: 10px;"><a href="#"><img src="img/_del-temp/phr-2.jpg" width="100" height="100" alt="" /></a></td>
<td style="width: 100px; padding-left: 10px;"><a href="#"><img src="img/_del-temp/phr-3.jpg" width="100" height="100" alt="" /></a></td>
<td style="width: 100px; padding-left: 10px;"><a href="#"><img src="img/_del-temp/phr-4.jpg" width="100" height="100" alt="" /></a></td>
<td style="width: 100px; padding-left: 10px;"><a href="#"><img src="img/_del-temp/phr-2.jpg" width="100" height="100" alt="" /></a></td>
<td style="width: 100px;"><a href="#"><img src="{% static 'client/img/_del-temp/phr-1.jpg' %}" width="100" height="100" alt="" /></a></td>
<td style="width: 100px; padding-left: 10px;"><a href="#"><img src="{% static 'client/img/_del-temp/phr-2.jpg' %}" width="100" height="100" alt="" /></a></td>
<td style="width: 100px; padding-left: 10px;"><a href="#"><img src="{% static 'client/img/_del-temp/phr-3.jpg' %}" width="100" height="100" alt="" /></a></td>
<td style="width: 100px; padding-left: 10px;"><a href="#"><img src="{% static 'client/img/_del-temp/phr-4.jpg' %}" width="100" height="100" alt="" /></a></td>
<td style="width: 100px; padding-left: 10px;"><a href="#"><img src="{% static 'client/img/_del-temp/phr-2.jpg' %}" width="100" height="100" alt="" /></a></td>
</tr>
</table>
@ -239,7 +240,7 @@
<table cellpadding="0" cellspacing="0" border="0" width="600" style="width: 600px; margin-bottom: 10px;">
<tr>
<td style="padding: 20px 0 0;"><a href="#"><img src="img/_del-temp/mail-banner.jpg" width="600" height="145" alt="" /></a></td>
<td style="padding: 20px 0 0;"><a href="#"><img src="{% static 'client/img/_del-temp/mail-banner.jpg' %}" width="600" height="145" alt="" /></a></td>
</tr>
</table>
@ -256,7 +257,7 @@
<td style="padding: 15px 15px 0 0; width: 76px;">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td style="background: #ffffff; padding: 0; width: 76px; height: 76px; vertical-align: middle; text-align: center;"><a href="#"><img style="width: 100%; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px;" alt="" src="img/_del-temp/news-1.jpg" /></a></td>
<td style="background: #ffffff; padding: 0; width: 76px; height: 76px; vertical-align: middle; text-align: center;"><a href="#"><img style="width: 100%; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px;" alt="" src="{% static 'client/img/_del-temp/news-1.jpg' %}" /></a></td>
</tr>
</table>
</td>
@ -279,7 +280,7 @@
<td style="vertical-align: top; padding: 15px 0 10px;">
<div class="logo">
<a style="text-decoration: none; color: #a2a2a2; font-size: 12px;" href="#">
<img src="img/mail-logo-2.jpg" alt="Expomap.ru" />
<img src="{% static 'client/img/mail-logo-2.jpg' %}" alt="Expomap.ru" />
</a>
</div>
</td>

@ -1,71 +1,94 @@
{% load static %}
{% load i18n %}
{% load template_filters %}
{% if not request.COOKIES.subscribe_popup %}
<div id="pw-subscribe-popup" class="popup-window subscribe-modal">
<header class="clearfix">
<div class="step1">
<div class="pw-title ">{% trans 'Анонсы' %} <span class="type-of-event">{% trans 'конференций' %}</span> {% trans 'на ваш email' %}</div>
{# <p class="sub-header">{% trans 'по тематике' %} <a href="#">&laquo;Маркетинг&raquo;</a></p>#}
</div>
</header>
<div class="pw-body clearfix">
<div class="step1" >
<div class="label">
<p>
{% trans 'Более <b>30 000 профессионалов</b> получают наши анонсы событий каждую среду. Присоединяйтесь!' %}
</p>
</div>
{% if not user.contact_set.exists %}
<div id="pw-subscribe-popup" class="popup-window subscribe-modal">
<header class="clearfix">
<div class="step1">
<div class="pw-title ">{% trans 'Анонсы' %} <span class="type-of-event">{% trans 'конференций' %}</span> {% trans 'на ваш email' %}</div>
{% if themes %}
<p class="sub-header">{% trans 'по тематике' %} {% for th in themes %}<a href="#">&laquo;{{ th|get_theme_name }}&raquo;</a>{% if not forloop.last %}, {% endif %}{% endfor %}</p>
{% endif %}
<form action="/newsletters/" id="subscribe-form" class="pw-form">
<div style="display: none">
{% for theme in themes %}
<input checked="checked" name="theme" type="checkbox" value="{{ theme }}"/>
{% endfor %}
</div>
</header>
<div class="pw-body clearfix">
<div class="step1" >
<div class="label">
<p>
{% trans 'Более <b>30 000 профессионалов</b> получают наши анонсы событий каждую среду. Присоединяйтесь!' %}
</p>
</div>
<div class="pwf-line">
<div class="pwf-field">
<input type="text" placeholder="Ваше имя" name="first_name" id="id_first_name">
<form action="{% if not themes %}/newsletters/{% else %}/newsletters/popup/validate/{% endif %}" id="subscribe-form" class="pw-form{% if themes %} simple-validate{% endif %}">
<div style="display: none">
{% for theme in themes %}
<input checked="checked" name="theme" type="checkbox" value="{{ theme }}"/>
{% endfor %}
</div>
</div>
<div class="pwf-line">
<div class="pwf-field">
<input type="text" placeholder="Email" name="email" id="id_email">
<div class="pwf-line">
<div class="pwf-field">
<input type="text" placeholder="Ваше имя" name="first_name" id="id_first_name">
</div>
</div>
</div>
<div class="pwf-buttons-line">
<button type="submit" class="submit">{% trans 'Хочу быть в курсе' %}</button>
<img src="/static/client/img/arrow.png" alt="" class="submit-arrow"/>
</div>
</form>
</div>
<div class="pwf-line">
<div class="pwf-field">
<input type="text" placeholder="Email" name="email" id="id_email">
</div>
</div>
<div class="pwf-buttons-line">
<button type="submit" class="submit">{% trans 'Хочу быть в курсе' %}</button>
<img src="/static/client/img/arrow.png" alt="" class="submit-arrow"/>
</div>
</form>
</div>
</div>
</div>
</div>
<script>
function setCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
</div>
<script>
function setCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}
$(function() {
$(function() {
setCookie('subscribe_popup', '1', 30);
setTimeout(function(){
$.fancybox.open(
[{href: '#pw-subscribe-popup'}],
{}
);
}, 1000);
setCookie('subscribe_popup', '1', 30);
setTimeout(function(){
$.fancybox.open(
[{href: '#pw-subscribe-popup'}],
{}
);
}, 1000);
});
</script>
});
</script>
{% else %}
<script>
function setCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}
$(function() {
setCookie('subscribe_popup', '1', 30);
});
</script>
{% endif %}
{% endif %}

@ -101,7 +101,7 @@
<table cellpadding="0" cellspacing="0" border="0" width="600" style="width: 600px; font-size: 12px; line-height: 15px;">
<tr>
<td style="vertical-align: top; padding: 15px 0 15px; color: #a2a2a2; text-align: right;">
© 2007 — 2015 <a style="color: #a2a2a2; text-decoration: none;" href="http://expomap.ru/">Expomap.ru</a>
© 2007 — {% now "Y" %} <a style="color: #a2a2a2; text-decoration: none;" href="http://expomap.ru/">Expomap.ru</a>
</td>
</tr>
</table>

Loading…
Cancel
Save