Merge branch 'develop' of git.general-servers.com:expomap/expomap into develop

remotes/origin/1203
Ivan 10 years ago
commit baf08d8cc8
  1. 6
      emencia/django/newsletter/views/admin_views.py
  2. 17
      expobanner/admin.py
  3. 1
      expobanner/admin_urls.py
  4. 6
      expobanner/management/commands/banner_log_update.py
  5. 1
      expobanner/views.py
  6. 6
      functions/forms.py
  7. 41
      functions/signal_additional_func.py
  8. 3
      functions/signal_handlers.py
  9. 11
      proj/views.py
  10. 36
      settings/admin.py
  11. 3
      settings/admin_urls.py
  12. 156
      settings/forms.py
  13. 92
      settings/models.py
  14. 15
      specialist_catalog/forms.py
  15. 2
      specialist_catalog/models.py
  16. 26
      templates/admin/expobanner/main_page_block.html
  17. 1
      templates/admin/includes/admin_nav.html
  18. 3
      templates/client/base_catalog.html
  19. 12
      templates/client/includes/booking_block.html
  20. 2
      templates/client/includes/conference/conference_object.html
  21. 319
      templates/client/includes/event_object.html
  22. 2
      templates/client/includes/exposition/expo_paid.html
  23. 2
      templates/client/includes/exposition/exposition_object.html
  24. 8
      templates/client/includes/main_page_video_block.html
  25. 14
      templates/client/includes/translators_aside.html
  26. 12
      templates/client/index.html
  27. 6
      templates/client/popups/announce_subscription.html
  28. 10
      templates/client/popups/announces.html
  29. 2
      templates/client/service/participation.html
  30. 2
      templates/client/service/remotely.html
  31. 2
      templates/client/service/tickets.html
  32. 2
      templates/client/service/tour.html
  33. 2
      templates/client/service/translator.html
  34. 25
      templates/client/specialist_catalog/catalog_detailed.html

@ -332,9 +332,9 @@ from ..models import PopupCount
from theme.models import Theme
def count_popups(request):
if not request.is_ajax():
return HttpResponse("request is not ajax")
else:
#if not request.is_ajax():
# return HttpResponse("request is not ajax")
#else:
themes = request.GET.getlist('theme')
if themes:
for theme_id in themes:

@ -9,6 +9,8 @@ from expobanner.forms import UrlCreateForm, BannerCreateGroupForm, BannerCreateF
PaidCreateForm, PaidUpdateForm, TopCreateForm, BannerLinkCreateForm, MainCreateForm, MainConfCreateForm, MainUpdateForm, TopUpdateForm
from exposition.models import Exposition
from conference.models import Conference
from settings.models import Html
from settings.forms import HtmlForm
class BannersControl(TemplateView):
template_name = 'admin/expobanner/banners_control.html'
@ -356,9 +358,22 @@ class TopUpdate(UpdateView):
template_name = 'admin/expobanner/top_create.html'
success_url = '/admin/expobanners/top/list/'
def get_context_data(self, **kwargs):
context = super(TopUpdate, self).get_context_data(**kwargs)
obj = self.object
context['exposition'] = obj.get_event()
return context
class MainPageBlock(UpdateView):
model = Html
form_class = HtmlForm
template_name = 'admin/expobanner/main_page_block.html'
def get_context_data(self, **kwargs):
context = super(MainPageBlock, self).get_context_data(**kwargs)
context['languages'] = settings.LANGUAGES
return context
def get_success_url(self):
return '/admin/'

@ -42,4 +42,5 @@ urlpatterns = patterns('expobanner.admin',
url(r'^main/conf/$', MainConfCreate.as_view(), name='expobanner-conf-create_main'),
url(r'^main/conf/turn/(?P<pk>\d+)/(?P<status>.*)/$', main_turn, name='expobanner-conf-main-turn'),
#url(r'^main/conf/(?P<pk>\d+)/stat/$', MainStat.as_view(), name='expobanner_stat_main'),
url(r'^main/block/(?P<pk>\d+)/$', MainPageBlock.as_view()),
)

@ -1,12 +1,14 @@
# -*- coding: utf-8 -*-
from datetime import date
from django.core.management.base import BaseCommand
from expobanner.models import Log, LogStat, Banner, PaidStat
from exposition.models import Exposition
class Command(BaseCommand):
def handle(self, *args, **options):
from exposition.models import Exposition
from expobanner.models import Log, LogStat, Banner, PaidStat
today = date.today()
# banners
for banner in Banner.objects.select_related('group').filter(public=True):

@ -87,6 +87,7 @@ def get_banners(request):
return response
def get_top(request):
params = {'theme': request.GET.getlist('theme', []),
'tag': request.GET.get('tag'),

@ -69,7 +69,7 @@ from django.conf import settings
from django.utils.translation import get_language
from django.forms.models import save_instance
class TranslatableModelForm(forms.ModelForm):
class ExpoTranslatableModelForm(forms.ModelForm):
translatable_fields = []
@ -88,7 +88,7 @@ class TranslatableModelForm(forms.ModelForm):
else:
kwargs.update({'initial': init_tr_data})
super(TranslatableModelForm, self).__init__(*args, **kwargs)
super(ExpoTranslatableModelForm, self).__init__(*args, **kwargs)
if not self.translatable_fields:
self.translatable_fields = self._all_tr_field_names
@ -113,7 +113,7 @@ class TranslatableModelForm(forms.ModelForm):
# todo: fix commit False error
init_lang = get_language()[:2]
is_new = not self.instance.pk
inst = super(TranslatableModelForm, self).save()
inst = super(ExpoTranslatableModelForm, self).save()
if is_new:
for lang in self.data_by_lang:

@ -1,10 +1,8 @@
# -*- coding: utf-8 -*-
from settings.models import settings_dict, Setting
from django.conf import settings
from functions.translate import get_translated_fields
def fill_missing_languages(obj):
"""
looking for missing languages
@ -30,39 +28,4 @@ def fill_missing_languages(obj):
for field in fields:
setattr(obj, field, getattr(translation, field))
obj.save()
def fill_meta_information(obj):
"""
looking for available settings for this object
and fill empty field with settings rules
"""
# return list of settings for this object
s_list = settings_dict.get(obj.__class__.__name__)
if s_list:
for s in s_list:
# get Setting model object
setting = Setting.objects.get(key=s.get('key'))
field = s.get('field_name')
if setting.type != 'transl':
# simple field
if getattr(obj, field)=="":
setattr(obj, field, setting.get_value())
obj.save()
else:
# translated field
for code, lang in settings.LANGUAGES:
# get translation object
tr = obj._meta.translations_model.objects.get(language_code=code, master__id=getattr(obj, 'id'))
if getattr(tr, field)=="":
value = setting.get_value(code)
try:
value = value%tr.__dict__
except KeyError:
pass
# ! charfield -> textfield
setattr(tr, field, value[:250])
tr.save()
obj.save()

@ -1,7 +1,7 @@
import random
import string
from django.db.models.fields.files import FieldFile
from signal_additional_func import fill_missing_languages, fill_meta_information
from signal_additional_func import fill_missing_languages
from functions.form_check import translit_with_separator
@ -34,7 +34,6 @@ def post_save_handler(sender, **kwargs):
"""
obj = kwargs['instance']
fill_missing_languages(obj)
fill_meta_information(obj)
def file_cleanup(sender, instance, *args, **kwargs):

@ -16,6 +16,8 @@ from conference.models import Conference
from emencia.django.newsletter.forms import SubscribeAssideForm
from django.db.models.loading import get_model
def clear_slashes(str_):
if str_[0] == r'/':
str_ = str_[1:]
@ -73,6 +75,12 @@ class MainPageView(JitterCacheMixin, TemplateView):
conf = Conference.objects.conf_main()
ev = ex + conf
events = sorted(ev, key=lambda x: x.main.position)
Html = get_model('settings', 'Html')
try:
main_page_block = Html.objects.language().get(id=22)
except Html.DoesNotExist:
main_page_block = None
# update main_page counter
for event in events:
event.main.link.log(self.request, 1)
@ -80,7 +88,8 @@ class MainPageView(JitterCacheMixin, TemplateView):
conference_themes = Theme.objects.language().order_by('-main_page').filter(types=Theme.types.conference)[:6]
args = {'events': events, 'exposition_themes': exposition_themes, 'conference_themes': conference_themes,
'search_form': ExpositionSearchForm, 'search_action': '/expo/search/'}
'search_form': ExpositionSearchForm, 'search_action': '/expo/search/',
'main_page_block': main_page_block}
context.update(args)

@ -1,27 +1,9 @@
# -*- coding: utf-8 -*-
import json
from django.shortcuts import render_to_response
from django.http import HttpResponseRedirect, HttpResponse
from django.http import HttpResponseRedirect
from django.core.context_processors import csrf
from django.conf import settings
from django.contrib.auth.decorators import login_required
#
from forms import SettingsForm
@login_required
def change_settings(request):
if request.POST:
pass
else:
form = SettingsForm()
args = {'form': form, 'languages': settings.LANGUAGES}
args.update(csrf(request))
return render_to_response('settings.html', args)
from forms import MainPageEvent, MainPagePhotoreport, MainPageArticle, MainPageNews, MainPageThemes
from forms import MainPageArticle, MainPageNews, MainPageThemes
def handle_form(request, Form):
@ -36,21 +18,18 @@ def handle_form(request, Form):
return HttpResponseRedirect('/admin/settings/main-page/')
def handle_events(request):
return handle_form(request, MainPageEvent)
def handle_news(request):
return handle_form(request, MainPageNews)
def handle_articles(request):
return handle_form(request, MainPageArticle)
def handle_themes(request):
return handle_form(request, MainPageThemes)
def handle_photoreports(request):
return handle_form(request, MainPagePhotoreport)
from exposition.models import Exposition
from conference.models import Conference
@ -60,6 +39,7 @@ from theme.models import Theme
from article.models import Article
import datetime
def main_page(request):
now = datetime.datetime.now()
expositions = Exposition.objects.filter(main_page=1)
@ -83,10 +63,8 @@ def main_page(request):
news_form.fields['main_page_news'].widget.attrs['data-init-text'] = json.dumps(a)
article_form = MainPageArticle(initial={'article' : blogs})
event_data = {'expositions': ','.join(['%s:%s'%(item.id, item.name) for item in expositions])}
event_form = MainPageEvent(initial=event_data)
args = {'event_form' : event_form, 'theme_form' : MainPageThemes(initial=themes),
args = { 'theme_form' : MainPageThemes(initial=themes),
'article_form' : article_form,
'news_form' : news_form, 'photoreport_form' : MainPagePhotoreport(),}
'news_form' : news_form}
args.update(csrf(request))
return render_to_response('admin/settings/main_page.html', args)

@ -3,10 +3,7 @@ from django.conf.urls import patterns, include, url
urlpatterns = patterns('settings.admin',
url(r'^main-page/$', 'main_page'),
url(r'^main-page/events/$', 'handle_events'),
url(r'^main-page/photoreports/$', 'handle_photoreports'),
url(r'^main-page/themes/$', 'handle_themes'),
url(r'^main-page/news/$', 'handle_news'),
url(r'^main-page/blogs/$', 'handle_articles'),
url(r'^$', 'change_settings'),
)

@ -1,146 +1,19 @@
# -*- coding: utf-8 -*-
from django import forms
from models import Setting, settings_dict
from django.conf import settings
from functions.translate import fill_trans_fields, populate, ZERO_LANGUAGE, populate_all, fill_trans_fields_all
class SettingsForm(forms.Form):
"""
Create Settings form for creating settings
__init__ uses for dynamic creates fields
save function saves data in Settings object. If it doesnt exist create new object
"""
def __init__(self, *args, **kwargs):
super(SettingsForm, self).__init__(*args, **kwargs)
# creates translated form fields, example: name_ru, name_en
# len(10) is a hack for detect if settings.LANGUAGES is not configured it return all langs
for model_name in settings_dict.values():
for setting in model_name:
item = Setting.objects.get(key=setting['key'])
if setting['type'] != 'transl':
self.fields[setting['key']] = forms.CharField(label=setting['verbose_name'], initial=item.get_value(),
required=False)
else:
if len(settings.LANGUAGES) in range(10):
for lid, (code, name) in enumerate(settings.LANGUAGES):
# using enumerate for detect iteration number
# first iteration is a default lang so it required fields
required = True if lid == 0 else False
self.fields['%s_%s' %(setting['key'], code)] = forms.CharField(label=setting['verbose_name'],
initial=item.get_value(code),
required=required,
widget=forms.TextInput(
attrs={'style':'width: 450px'}))
"""
settings_list = Setting.objects.all()
for item in settings_list:
if item.type != 'transl':
self.fields['%s'%item.key] = forms.CharField(label='%s'%item.key, initial=item.get_value(),
required=False)
else:
if len(settings.LANGUAGES) in range(10):
for lid, (code, name) in enumerate(settings.LANGUAGES):
# using enumerate for detect iteration number
# first iteration is a default lang so it required fields
required = True if lid == 0 else False
self.fields['%s_%s' %(item.key, code)] = forms.CharField(label=getattr(item, 'key'),
initial=item.get_value(code),
required=required,
widget=forms.TextInput(
attrs={'style':'width: 450px'}))
"""
def save(self):
"""
changes Settings model
"""
data = self.cleaned_data
capacity_tmpl = Setting.objects.get(key='hall_template')
for code, name in settings.LANGUAGES:
capacity_tmpl.set_value(data['hall_capacity_tmpl_%s'%code], code)
from exposition.models import Exposition
from conference.models import Conference
from seminar.models import Seminar
from webinar.models import Webinar
from photoreport.models import Photoreport
from news.models import News
from ckeditor.widgets import CKEditorWidget
from theme.models import Theme
from .models import Html
from article.models import Article
from functions.forms import ExpoTranslatableModelForm
import datetime
class MainPageEvent(forms.Form):
expositions = forms.CharField(label=u'Выставки', widget=forms.HiddenInput(), required=False)
conferences = forms.CharField(label=u'Конференции', widget=forms.HiddenInput(), required=False)
def save(self):
data = self.cleaned_data
expositions = data['expositions']
conferences = data['conferences']
Exposition.objects.filter(main_page=1).update(main_page=0)
Exposition.objects.filter(id__in=expositions).update(main_page=1)
#Conference.objects.filter(main_page=1).update(main_page=0)
#Conference.update(main_page=1)
class HtmlForm(ExpoTranslatableModelForm):
class Meta:
model = Html
widgets = {
'text': CKEditorWidget,
}
def clean_expositions(self):
expositions = self.cleaned_data.get('expositions')
if expositions:
res = []
for id in expositions.split(','):
try:
res.append(int(id))
except:
continue
return res
else:
return []
"""
class MainPageEvent(forms.Form):
def __init__(self, *args, **kwargs):
super(MainPageEvent, self).__init__(*args, **kwargs)
now = datetime.datetime.now
self.fields['expositions' ] = forms.ModelMultipleChoiceField(
queryset=Exposition.objects.all(),
required=False
)
self.fields['conferences' ] = forms.ModelMultipleChoiceField(
queryset=Conference.objects.all(),
required=False
)
self.fields['seminars' ] = forms.ModelMultipleChoiceField(
queryset=Seminar.objects.all(),
required=False
)
self.fields['webinars' ] = forms.ModelMultipleChoiceField(
queryset=Webinar.objects.all(),
required=False
)
def save(self):
data = self.cleaned_data
expositions = data['expositions']
conferences = data['conferences']
seminars = data['seminars']
webinars = data['webinars']
Exposition.objects.all().update(main_page=0)
expositions.update(main_page=1)
Conference.objects.all().update(main_page=0)
conferences.update(main_page=1)
Seminar.objects.all().update(main_page=0)
seminars.update(main_page=1)
Webinar.objects.all().update(main_page=0)
webinars.update(main_page=1)
"""
class MainPageThemes(forms.Form):
exposition_themes = forms.ModelMultipleChoiceField(queryset=Theme.objects.filter(types=Theme.types.exposition),
@ -163,17 +36,6 @@ class MainPageThemes(forms.Form):
#seminar_themes.update(main_page=1)
class MainPagePhotoreport(forms.Form):
photoreports = forms.ModelMultipleChoiceField(queryset=Photoreport.objects.all())
def save(self):
data = self.cleaned_data
photoreports = data['photoreports']
photoreports.update(main_page=1)
class MainPageNews(forms.Form):
main_page_news = forms.CharField(label=u'Новости', widget=forms.HiddenInput(), required=False,)

@ -4,95 +4,11 @@ from hvad.models import TranslatableModel, TranslatedFields
from functions.custom_fields import EnumField
class Setting(TranslatableModel):
"""
Create Settings model, which stores different settings of project
Uses hvad.TranslatableModel which is child of django.db.models class
Setting create only by admin
"""
VALUES = ('int', 'text', 'transl', 'date')
key = models.CharField(max_length=50)
type = EnumField(values=VALUES)
int = models.IntegerField(blank=True, null=True)
text = models.CharField(max_length=255, blank=True)
date = models.DateTimeField(blank=True, null=True)
class Html(TranslatableModel):
name = models.CharField(max_length=100, blank=True)
translations = TranslatedFields(
transl = models.CharField(max_length=255, blank=True,default='111'),
name = models.CharField(max_length=50),
text=models.TextField()
)
def __unicode__(self):
return self.key
def get_value(self, code=None):
"""
returns value of setting
value can be - int, text, date or translated field
"""
if self.type == 'transl':
obj = Setting._meta.translations_model.objects.get(language_code = code,master__id=getattr(self, 'id'))
return getattr(obj, self.type)
else:
return getattr(self,self.type)
def set_value(self, value, code=None):
"""
sets value of setting
"""
if self.type == 'transl':
obj = Setting._meta.translations_model.objects.get(language_code = code,master__id=getattr(self, 'id'))
setattr(obj, self.type, value)
obj.save()
else:
setattr(self, self.type, value)
# dictionaty of models settings
# every model have list of settings
# key: setting in db, field_name: field in model
settings_dict = dict(#City=[{'key': 'city_title', 'field_name': 'title', 'type': 'transl', 'verbose_name': 'title Городов'},
# {'key': 'city_keywords', 'field_name': 'keywords', 'type': 'transl', 'verbose_name': 'keywords'},
# {'key': 'city_descriptions', 'field_name': 'descriptions', 'type': 'transl', 'verbose_name': 'description'}],
#Exposition=[{'key': 'exposition_title', 'field_name': 'title', 'type': 'transl', 'verbose_name': 'title Выставок'},
# {'key': 'exposition_keywords', 'field_name': 'keywords', 'type': 'transl', 'verbose_name': 'keywords Выставок'}],
# Country=[{'key': 'country_title', 'field_name': 'title', 'type': 'transl', 'verbose_name': 'title'},
# {'key': 'country_keywords', 'field_name': 'keywords', 'type': 'transl', 'verbose_name': 'keywords'},
# {'key': 'country_descriptions', 'field_name': 'descriptions', 'type': 'transl', 'verbose_name': 'description'}]
# Exposition=[{'key': 'exposition_title', 'field_name': 'title', 'type': 'transl', 'verbose_name': 'Exposition title'},
# {'key': 'exposition_keywords', 'field_name': 'keywords', 'type': 'transl', 'verbose_name': 'Exposition keywords'},
# {'key': 'exposition_descriptions', 'field_name': 'descriptions', 'type': 'transl', 'verbose_name': 'Exposition description'}]
)
#from settings.models import settings, Setting
#country_set = settings.get('country')
#for s in country_set:
# set = Setting(key=s['key'], type=s['type'])
# set.save()
from django.db.models.signals import post_save
from django.dispatch import receiver
#@receiver(post_save, sender=Setting)
def create_transl_fields(sender, **kw):
"""
"""
setting = kw['instance']
setting.text = '111'
setting.save()
#if kwargs['created'] and setting.type == 'transl':
# setting.int = 1
#if len(setting.LANGUAGES) in range(10):
# for lid, (code, name) in enumerate(settings.LANGUAGES):
# using enumerate for detect iteration number
# first iteration is a default lang so it required fields
#post_save.connect(create_transl_fields, sender=Setting)
return self.name

@ -33,6 +33,21 @@ class SpecialistCatalogForm(TranslatableModelForm):
'big_cities': CKEditorWidget,
}
def __init__(self, *args, **kwargs):
super(SpecialistCatalogForm, self).__init__(*args, **kwargs)
if kwargs.get('instance'):
instance = kwargs['instance']
if instance.type == SpecialistCatalog._country:
qs = Specialist.objects.filter(country=instance.country)
else:
qs = Specialist.objects.filter(city=instance.city)
self.fields['specialists'] = forms.ModelMultipleChoiceField(label=u"Специалисты", required=False,
queryset=qs)
def save(self, commit=True):
place = self.cleaned_data.get('city') or self.cleaned_data.get('country')
place_inflect = place.inflect or place.name

@ -26,6 +26,8 @@ class Specialist(models.Model):
class SpecialistCatalog(TranslatableModel):
_country = 1
_city = 2
price = models.IntegerField(verbose_name=u"Цена", default=200)
currency = models.CharField(max_length=255, verbose_name=u"Валюта", default=u"EUR")
logo = models.ImageField(db_column= "logo_preview", verbose_name=u"Логотип", blank=True, upload_to='specialist_catalog/logo_preview/')

@ -0,0 +1,26 @@
{% extends 'admin/base.html' %}
{% load static %}
{% load i18n %}
{% block body %}
<form method="post" class="form-horizontal" name="form2" id="form2" enctype="multipart/form-data"> {% csrf_token %}
<fieldset>
<div class="box span8">
<div class="box-header well">
<h2><i class="icon-pencil"></i> Блок на главной</h2>
</div>
<div class="box-content">
{% include 'admin/forms/multilang.html' with field='text' form=form languages=languages %}
</div>
</div>
</fieldset>
<div class="controls">
<input class="btn btn-large btn-primary" type="submit" value="Готово">
<input class="btn btn-large" type="reset" value="Отмена">
</div>
</form>
{% endblock %}

@ -105,6 +105,7 @@
<li><a href="/admin/expobanners/top/list/">Выставки в топе</a></li>
<li><a href="/admin/expobanners/main/list/">Выставки на главной</a></li>
<li><a href="/admin/expobanners/main/conf/list/">Конференции на главной</a></li>
<li><a href="/admin/expobanners/main/block/22/">Блок на главной</a></li>
</ul>
</li>

@ -27,9 +27,10 @@
{% include 'client/includes/side_confs.html' %}
<hr />
{% include 'client/includes/banners/aside_2.html' %}
{% include 'client/includes/translators_aside.html' %}
<hr />
<div class="s-news-list">

@ -8,16 +8,16 @@
<div class="h-booking">
<header class="clearfix">
<div class="sect-title">
<a target="_blank" href="http://www.booking.com/searchresults.html?aid={{ book_aid }}&city={{ city.id }}">{% trans 'Отели рядом с выставкой от' %} <b>Booking</b>.com</a>
<a target="_blank" href="http://www.booking.com/searchresults.html?aid={{ book_aid }}&city={{ city.id }}{% if event %}&checkin_monthday={{ event.data_begin|date:'j' }}&checkin_year_month={{ event.data_begin|date:'Y' }}-{{ event.data_begin|date:'n' }}&checkout_monthday={{ event.data_end|date:'j' }}&checkout_year_month={{ event.data_end|date:'Y' }}-{{ event.data_end|date:'n' }}{% endif %}">{% trans 'Отели рядом с выставкой от' %} <b>Booking</b>.com</a>
</div>
<a class="more blue2" target="_blank" href="http://www.booking.com/searchresults.html?aid={{ book_aid }}&city={{ city.id }}">{% trans 'Все отели поблизости' %}</a>
<a class="more blue2" target="_blank" href="http://www.booking.com/searchresults.html?aid={{ book_aid }}&city={{ city.id }}{% if event %}&checkin_monthday={{ event.data_begin|date:'j' }}&checkin_year_month={{ event.data_begin|date:'Y' }}-{{ event.data_begin|date:'n' }}&checkout_monthday={{ event.data_end|date:'j' }}&checkout_year_month={{ event.data_end|date:'Y' }}-{{ event.data_end|date:'n' }}{% endif %}">{% trans 'Все отели поблизости' %}</a>
</header>
<ul>
{% if place %}
{% for hotel in place.get_nearest_hotels %}
<li>
<div class="hb-item">
<a href="{{ hotel.url }}?aid={{ book_aid }}" target="_blank">
<a href="{{ hotel.url }}?aid={{ book_aid }}{% if event %}&checkin_monthday={{ event.data_begin|date:'j' }}&checkin_year_month={{ event.data_begin|date:'Y' }}-{{ event.data_begin|date:'n' }}&checkout_monthday={{ event.data_end|date:'j' }}&checkout_year_month={{ event.data_end|date:'Y' }}-{{ event.data_end|date:'n' }}{% endif %}" target="_blank">
<span class="hb-pict">
{% thumbnail hotel.photo "150x150" crop="center" as im %}
<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}">
@ -28,7 +28,7 @@
{% if hotel.min_price %}
<div class="hb-price">{{ hotel.min_price|floatformat:0 }} {{ hotel.currency }}/{% trans 'ночь' %}</div>
{% endif %}
<a class="button blue2 lc icon-bell" href="{{ hotel.url }}?aid={{ book_aid }}" target="_blank">{% trans 'Забронировать' %}</a>
<a class="button blue2 lc icon-bell" href="{{ hotel.url }}?aid={{ book_aid }}{% if event %}&checkin_monthday={{ event.data_begin|date:'j' }}&checkin_year_month={{ event.data_begin|date:'Y' }}-{{ event.data_begin|date:'n' }}&checkout_monthday={{ event.data_end|date:'j' }}&checkout_year_month={{ event.data_end|date:'Y' }}-{{ event.data_end|date:'n' }}{% endif %}" target="_blank">{% trans 'Забронировать' %}</a>
</div>
</li>
{% endfor %}
@ -36,7 +36,7 @@
{% for hotel in city.get_hotels %}
<li>
<div class="hb-item">
<a href="{{ hotel.url }}?aid={{ book_aid }}" target="_blank">
<a href="{{ hotel.url }}?aid={{ book_aid }}{% if event %}&checkin_monthday={{ event.data_begin|date:'j' }}&checkin_year_month={{ event.data_begin|date:'Y' }}-{{ event.data_begin|date:'n' }}&checkout_monthday={{ event.data_end|date:'j' }}&checkout_year_month={{ event.data_end|date:'Y' }}-{{ event.data_end|date:'n' }}{% endif %}" target="_blank">
<span class="hb-pict">
{% thumbnail hotel.photo "150x150" crop="center" as im %}
<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}">
@ -48,7 +48,7 @@
{% if hotel.min_price %}
<div class="hb-price">{{ hotel.min_price|floatformat:0 }} {{ hotel.currency }}/{% trans 'ночь' %}</div>
{% endif %}
<a class="button blue2 lc icon-bell" href="{{ hotel.url }}?aid={{ book_aid }}" target="_blank">{% trans 'Забронировать' %}</a>
<a class="button blue2 lc icon-bell" href="{{ hotel.url }}?aid={{ book_aid }}{% if event %}&checkin_monthday={{ event.data_begin|date:'j' }}&checkin_year_month={{ event.data_begin|date:'Y' }}-{{ event.data_begin|date:'n' }}&checkout_monthday={{ event.data_end|date:'j' }}&checkout_year_month={{ event.data_end|date:'Y' }}-{{ event.data_end|date:'n' }}{% endif %}" target="_blank">{% trans 'Забронировать' %}</a>
</div>
</li>
{% endfor %}

@ -288,7 +288,7 @@
</div>
{% endif %}
</div>
{% include 'client/includes/booking_block.html' with city=event.city place=event.place %}
{% include 'client/includes/booking_block.html' with city=event.city place=event.place event=event %}
<hr />
{% if event.get_nearest_events|slice:":6" %}
<div class="e-cat">

@ -1,319 +0,0 @@
{% load static %}
{% load i18n %}
{% load thumbnail %}
{% load template_filters %}
{% block page_body %}
<div class="m-article">
<div class="item-wrap event clearfix">
<aside>
{% if exposition.expohit %}
<div class="hit"></div>
{% endif %}
<div class="i-pict">
{% with obj=exposition %}
{% include 'client/includes/show_logo.html' %}
{% endwith %}
</div>
<!--
<div class="i-rating" title="Рейтинг: 551">551</div>
-->
<div class="i-stats">
{% if exposition.visitors %}
<span class="visitors" title="Посетители">{{ exposition.visitors }}</span>
{% endif %}
{% if exposition.members %}
<span class="participants" title="Участники">{{ exposition.members }}</span>
{% endif %}
</div>
<div class="i-discount">
{% if exposition.discount %}
<a class="discount-button" href="#">{% trans 'Скидка' %} -{{ exposition.discount }}%</a>
<div class="dsc-text">{{ exposition.discount_description|safe|linebreaks }}</div>
{% endif %}
</div>
</aside>
<div class="i-info">
<header>
<div class="i-title">
{% if exposition.main_title %}
{{ exposition.main_title|safe }} {{ exposition.name|safe }}
{% else %}
{{ exposition.name|safe }}
{% endif %}
</div>
</header>
<div class="i-date">
{% with obj=exposition %}
{% include 'client/includes/show_date_block.html' %}
{% endwith %}
</div>
{% if exposition.place %}
<div class="i-address">
<header>
<div class="address">
{{ exposition.place.adress }}
</div>
<div class="show-map"><a class="toggle-map" href="#">{% trans 'Раскрыть карту' %}</a></div>
</header>
<div class="i-map">
<div class="close-map"><a class="toggle-map" href="#">{% trans 'Скрыть карту' %}</a>
</div>
<div class="map-canvas" id="map-canvas" data-coords="{{ exposition.place.address.lat|stringformat:'f' }},{{ exposition.place.address.lng|stringformat:'f' }}" ></div>
</div>
</div>
{% endif %}
<hr />
<div class="i-buttons clearfix">
<div class="ib-main">
{% with event=exposition user=user %}
{% include 'client/includes/visit_button.html' %}
{% endwith %}
{% with event=exposition user=user %}
{% include 'client/includes/calendar_button.html' %}
{% endwith %}
<a class="button green icon-note" href="#">{% trans 'заметка' %}</a>
</div>
<!--
<div class="ib-add"><a class="button blue2 icon-find" href="#">{% trans 'Найти отель' %}</a></div>
-->
</div>
<hr />
<div class="i-divs clearfix">
<div class="i-subj">
<ul>
{% for theme in exposition.theme.all %}
<li><a href="/{{ filter|generate_url:'model' }}/theme-{{ theme.url }}">{{ theme }} ({{ theme.expositions_number }})</a></li>
{% endfor %}
</ul>
</div>
<div class="i-tags">
{% for tag in exposition.tag.all %}
<a href="/{{ filter|generate_url:'model' }}/tag-{{ tag.url }}">{{ tag }}</a>,
{% endfor %}
</div>
</div>
</div>
</div>
<div class="i-sub-articles">
<ul>
{% for service in exposition.get_services %}
<li><a href="/{{ filter|generate_url }}/service/{{ service.url }}">{{ service.name }}</a></li>
{% endfor %}
</ul>
</div>
{% include 'includes/event_steps.html' with event=exposition filter=filter %}
{% if exposition.get_photos %}
{% with photos=exposition.get_photos|slice:"5" %}
<hr />
<div class="i-photo-slides">
<div class="sect-title"><a href="#">{% trans 'Фотографии с прошлой выставки' %}</a></div>
<div id="ps-photo-gallery" class="ps-photo-gallery swiper-container">
<ul class="swiper-wrapper">
{% for photo in photos %}
<li class="swiper-slide">
<img src="{{ photo.get_display_url }}" alt="" />
</li>
{% endfor %}
</ul>
<div class="re-controls">
<a class="prev" href="#">&lt;</a>
<a class="next" href="#">&gt;</a>
</div>
</div>
</div>
{% endwith %}
{% endif %}
{% if exposition.description %}
<div class="i-event-description">
<div class="ied-title">{% trans 'О выставке' %} {{ exposition.name|safe }}</div>
<div class="ied-text">{{ exposition.description|safe|linebreaks }}</div>
</div>
<hr />
{% endif %}
<div class="i-event-additional clearfix">
<div class="sect-title">{% trans 'Дополнительная информация' %}</div>
<ul class="e-docs">
{% if exposition.business_program.all %}
<li><a href="/{{ filter|generate_url}}/program/">{% trans 'Деловая программа' %}</a></li>
{% endif %}
<li><a href="/{{ filter|generate_url}}/price/">{% trans 'Условия участия' %}</a></li>
<li><a href="/{{ filter|generate_url}}/statistic/">{% trans 'Статистика' %}</a></li>
</ul>
<dl class="add-info">
<dt>{% trans 'Организатор' %}:</dt>
<dd>
{% for organiser in exposition.organiser.all %}
{{ organiser.name }}<br />
<a target="_blank" href="{{ organiser.web_page }}">{{ organiser.web_page }}</a><br />
{{ organiser.email }}
{% endfor %}
</dd>
{% if exposition.web_page %}
<dt>{% trans 'Веб-сайт' %}:</dt>
<dd>
<a target="_blank" href="{{ exposition.web_page }}">{{ exposition.web_page }}</a>
</dd>
{% endif %}
{% if exposition.get_audience %}
<dt>{% trans 'Аудитория' %}:</dt>
<dd>
{{ exposition.get_audience }}
</dd>
{% endif %}
{% if exposition.get_periodic %}
<dt>{% trans 'Периодичность' %}:</dt>
<dd>{{ exposition.get_periodic }}</dd>
{% endif %}
{% if exposition.products %}
<dt>{% trans 'Экспонируемые продукты' %}:</dt>
<dd>{{ exposition.products|safe|linebreaks }}</dd>
{% endif %}
</dl>
</div>
<hr />
<div class="i-members clearfix">
<div class="im-participants">
<header>
<div class="im-title">{% trans 'Участники' %}</div>
<a class="more" href="/{{ filter|generate_url }}/members">{% trans 'Все участники' %}</a>
</header>
<ul>
{% for company in exposition.company.all|slice:":6" %}
<li>
<a href="{{ company.get_permanent_url }}">
<span class="imp-pict">
{% with obj=company %}
{% include 'includes/show_logo.html' %}
{% endwith %}
</span>
{{ company.name }}
</a>
</li>
{% endfor %}
</ul>
</div>
<div class="im-visitors">
<header>
<div class="im-title">{% trans 'Посетители' %}</div>
</header>
<ul>
{% for user in exposition.users.all|slice:":17" %}
<li><a href="{{ user.get_permanent_url }}">{{ user.get_full_name }}</a></li>
{% endfor %}
</ul>
<a class="more" href="/{{ filter|generate_url }}/visitors">{% trans 'Все посетители' %}</a>
</div>
</div>
{% if exposition.place %}
<hr/>
<div class="e-num-info">
{% if exposition.place %}
<div class="eni-area-wrap">
<div class="eni-title">{% trans 'Общая выставочная площадь' %}</div>
<div class="eni-area">
{% if exposition.place.total_area %}
{{ exposition.place.total_area }} {% trans 'м²' %}
{% endif %}
</div>
</div>
{% endif %}
<div class="eni-stats">
{% if exposition.visitors %}
<div class="enis-item"><b>{{ exposition.visitors }}</b> {% trans 'учасников' %}</div>
{% endif %}
{% if exposition.members %}
<div class="enis-item"><b>{{ exposition.members }}</b> {% trans 'посетителей' %}</div>
{% endif %}
{% if exposition.foundation_year %}
<div class="eni-founded">{% trans 'Основано в' %} <b>{{ exposition.foundation_year }}</b> {% trans 'году' %}</div>
{% endif %}
</div>
</div>
{% endif %}
</div>
{% include 'client/includes/booking_block.html' with city=exposition.city place=exposition.place %}
<hr />
{% if exposition.get_nearest_events|slice:":6" %}
<div class="e-cat">
<div class="sect-title">{% trans 'Ближайшие выставки по тематике' %} <a href="{{ expo_catalog }}theme-{{ exposition.theme.all.0.url }}">«{{ exposition.theme.all.0 }}»</a></div>
<ul class="cat-list cl-exhibitions">
{% for exp in exposition.get_nearest_events %}
<li class="cl-item">
<div class="cl-item-wrap clearfix">
<a href="{{ exp.get_permanent_url }}">
<div class="cli-pict">
{% with obj=exp %}
{% include 'client/includes/show_logo.html' %}
{% endwith %}
</div>
</a>
<div class="cli-info">
<div class="cli-top clearfix">
{% if exp.approved %}
<div class="cli-approved">
<img src="{% static 'client/img/approved-logo.png' %}" alt="" title="Approved Event" />
</div>
{% endif %}
<header>
<div class="cli-title"><a href="{{ exp.get_permanent_url }}">{{ exp.name|safe }}</a></div>
</header>
<div class="cli-descr">
{{ exp.main_title|safe|linebreaks }}
</div>
<div class="cli-bot clearfix">
<div class="cli-date">
{% with obj=exp %}
{% include 'client/includes/show_date_block.html' %}
{% endwith %}
</div>
<div class="cli-place">
<a href="{{ exp.country.get_permanent_url }}">{{ exp.country }}</a>, <a href="{{ exp.city.get_permanent_url }}">{{ exp.city }}</a>
{% if exp.place %}
, <a href="{{ exp.place.get_permanent_url }}">{{ exp.place }}</a>
{% endif %}
</div>
</div>
</div>
</div>
</div>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
<!--
<div class="abn"><a href="#"><img src="{% static 'client/img/_del-temp/banner-2.gif' %}" alt="" /></a></div>
-->
{% endblock %}
{% block content_text %}
{% endblock %}

@ -318,7 +318,7 @@
{% endif %}
</div>
{% include 'client/includes/booking_block.html' with city=exposition.city place=exposition.place %}
{% include 'client/includes/booking_block.html' with city=exposition.city place=exposition.place event=exposition %}
<hr />
{% if exposition.get_nearest_events|slice:":6" %}
<div class="e-cat">

@ -315,7 +315,7 @@
</div>
{% endif %}
</div>
{% include 'client/includes/booking_block.html' with city=exposition.city place=exposition.place %}
{% include 'client/includes/booking_block.html' with city=exposition.city place=exposition.place event=exposition %}
<hr />
{% if exposition.get_nearest_events|slice:":6" %}
<div class="e-cat">

@ -0,0 +1,8 @@
{% load i18n %}
<header class="clearfix">
<div class="pg-title"><a target="_blank" href="https://www.youtube.com/channel/UCE2QX9Q8YalEXHwaJoQf0MQ">{% trans ' Видеорепортажи' %}</a></div>
</header>
<div id="mp-photo-gallery" class="photo-gallery swiper-container">
<iframe width="100%" height="363" src="https://www.youtube.com/embed/4DUrpYvh3V4" frameborder="0" allowfullscreen></iframe>
</div>

@ -0,0 +1,14 @@
{% load i18n %}
<div class="mps-sect">
<header>{% trans 'Переводчики' %}</header>
<nav>
<ul>
<li><a href="/translators/country/">{% trans 'По странам' %}</a></li>
<li><a href="/translators/city/">{% trans 'По городам' %}</a></li>
<li><a href="/translators/city/moscow/">{% trans 'Переводчики в Москве' %}</a></li>
<li><a href="/translators/country/germany/">{% trans 'Переводчики в Германии' %}</a></li>
<li><a href="/translators/country/italy/">{% trans 'Переводчики в Италии' %}</a></li>
<li><a href="/translators/country/china/">{% trans 'Переводчики в Китае' %}</a></li>
</ul>
</nav>
</div>

@ -72,15 +72,9 @@
<div class="mcl">
<div class="mp-photo-gallery">
<header class="clearfix">
<div class="pg-title"><a target="_blank" href="https://www.youtube.com/channel/UCE2QX9Q8YalEXHwaJoQf0MQ">{% trans ' Видеорепортажи' %}</a></div>
</header>
<div id="mp-photo-gallery" class="photo-gallery swiper-container">
<iframe width="100%" height="363" src="https://www.youtube.com/embed/4DUrpYvh3V4" frameborder="0" allowfullscreen></iframe>
</div>
{% if main_page_block %}
{{ main_page_block.text|safe }}
{% endif %}
{% comment %}
<div id="mp-photo-gallery" class="photo-gallery swiper-container">
<ul class="swiper-wrapper">

@ -1,12 +1,12 @@
{% load static %}
{% load i18n %}
{% load template_filters %}
{% if not request.COOKIES.subscribe_popup %}#}
{% if not user.contact_set.exists %}#}
{% if not request.COOKIES.subscribe_popup %}
{% 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>
<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>

@ -1,8 +1,10 @@
{% load i18n %}
<div id="pw-subscribe" class="popup-window pw-subscribe">
<header class="clearfix">
<div class="pw-title">Получать анонсы </div>
<div class="pw-title">{% trans 'Получать анонсы' %} </div>
<ul class="tabs">
<li class="active"><a class="icon-big-email" href="#">по e-mail</a></li>
<li class="active"><a class="icon-big-email" href="#">{% trans 'по e-mail' %}</a></li>
</ul>
</header>
<div class="pw-body clearfix">
@ -12,7 +14,7 @@
<div class="pwf-line mail">
<div class="pwf-field">{{ announce_subscribe.email }}</div>
<div class="pwf-msg"><a target="_blank" href="/newsletters/test-letter/">Пример рассылки</a></div>
<div class="pwf-msg"><a target="_blank" href="/newsletters/test-letter/">{% trans 'Пример рассылки' %}</a></div>
</div>
<div class="pwf-line country">
@ -44,7 +46,7 @@
</div>
<div class="pwf-buttons-line">
<button type="submit" class="icon-check">подписаться</button>
<button type="submit" class="icon-check">{% trans 'подписаться' %}</button>
</div>

@ -286,7 +286,7 @@
</div>
{% if object %}
<div class="m-article">
{% include 'client/includes/booking_block.html' with city=object.city place=object.place %}
{% include 'client/includes/booking_block.html' with city=object.city place=object.place event=object %}
</div>
{% endif %}
</div>

@ -278,7 +278,7 @@
</div>
{% if object %}
<div class="m-article">
{% include 'client/includes/booking_block.html' with city=object.city place=object.place %}
{% include 'client/includes/booking_block.html' with city=object.city place=object.place event=object %}
</div>
{% endif %}

@ -290,7 +290,7 @@
</div>
{% if object %}
<div class="m-article">
{% include 'client/includes/booking_block.html' with city=object.city place=object.place %}
{% include 'client/includes/booking_block.html' with city=object.city place=object.place event=object %}
</div>
{% endif %}

@ -374,7 +374,7 @@
</div>
{% if object %}
<div class="m-article">
{% include 'client/includes/booking_block.html' with city=object.city place=object.place %}
{% include 'client/includes/booking_block.html' with city=object.city place=object.place event=object %}
</div>
{% endif %}
</div>

@ -374,7 +374,7 @@
</div>
{% if object %}
<div class="m-article">
{% include 'client/includes/booking_block.html' with city=object.city place=object.place %}
{% include 'client/includes/booking_block.html' with city=object.city place=object.place event=object %}
</div>
{% endif %}

@ -36,10 +36,9 @@
<div class="i-title">{{ object.title }}</div>
</header>
<div class="i-descr">
<div class="i-descr" style="min-height: 80px;">
{{ object.main_descr|safe }}
</div>
<hr/>
<div class="i-address map-opened country_map">
@ -63,7 +62,7 @@
</div>
{% if object.big_cities %}
<div class="country_towns">
<h4>Крупные города:</h4>
<h4>{% trans 'Города, в которых мы предоставляем переводчиков:' %}</h4>
{{ object.big_cities|safe }}
</div>
{% endif %}
@ -72,7 +71,7 @@
<div class="i-services country_content">
<div class="i-descr">
<h4>Коротко о наших преимуществах:</h4>
<h4>{% trans 'Коротко о наших преимуществах:' %}</h4>
<div style="margin-top:20px;">
{{ object.benefits|safe }}
</div>
@ -228,9 +227,9 @@
<div class="rqb-button">
<div class="rq-order-button">
<div class="rqob-wrap">
<div class="rqob-price">от {{ object.price }} {{ object.currency }} / день</div>
<div class="rqob-price">от {{ object.price }} {{ object.currency }} / {% trans 'день' %}</div>
<div class="rqob-button">
<a class="ob-text" href="#">заказать услугу</a>
<a class="ob-text" href="#">{% trans 'заказать услугу' %}</a>
</div>
</div>
</div>
@ -238,9 +237,6 @@
</div>
</div>
<hr>
{% if request.GET.debug == '1' %}
<script src="{% static 'client/js/_modules/page.translator.js' %}"></script>
@ -257,14 +253,12 @@
{% with object.specialists.all as specialists %}
{% if specialists %}
<div class="i-staff">
<div class="sect-title">Наши специалисты</div>
<div class="sect-title">{% trans 'Наши специалисты' %}</div>
<div class="i-staff-list">
<ul>
{% for spec in specialists %}
<li>
<a href="#">
<div class="sl-item clearfix">
<div class="sl-pict">
{% thumbnail spec.photo "100x100" crop="center" as im %}
@ -278,15 +272,10 @@
</div>
</div>
</div>
</a>
</li>
{% endfor %}
</ul>
</div>
</div>
{% endif %}
{% endwith %}
@ -297,7 +286,7 @@
<div class="rq-to-hide">
<div class="s-comments">
<div class="sect-title">Отзывы клиентов:</div>
<div class="sect-title">{% trans 'Отзывы клиентов:' %}</div>
<div class="cat-list sc-comments">
{% for feedback in feedbacks %}
<div class="cl-item">

Loading…
Cancel
Save