diff --git a/accounts/edit_forms.py b/accounts/edit_forms.py index 654166bc..14f2860e 100644 --- a/accounts/edit_forms.py +++ b/accounts/edit_forms.py @@ -92,9 +92,11 @@ class AboutCompanyForm(forms.ModelForm): class PhoneForm(forms.ModelForm): phone = forms.CharField(label=_(u'Контактный телефон'), required=False) + show_phone = forms.BooleanField(label=_(u'Контактный телефон'), required=False) + class Meta: model = Profile - fields = ('phone',) + fields = ('phone', 'show_phone') def clean_phone(self): phone = self.cleaned_data['phone'] diff --git a/accounts/models.py b/accounts/models.py index 761b92d1..94251f8d 100644 --- a/accounts/models.py +++ b/accounts/models.py @@ -236,7 +236,8 @@ class Profile(models.Model): on_delete=models.PROTECT) about_company = models.TextField(verbose_name=_(u'Описание компании'), blank=True) - phone = models.BigIntegerField(verbose_name='Телефон', blank=True, null=True) + phone = models.BigIntegerField(verbose_name=_(u'Телефон'), blank=True, null=True) + show_phone = models.NullBooleanField(verbose_name=_(u'Показывать телефон'), blank=True, null=True, default=1) web_page = models.URLField(verbose_name='Вебсайт',blank=True) about = models.TextField(verbose_name='О себе', blank=True) avatar = models.ImageField(verbose_name='Фото', upload_to='accounts/avatar/', blank=True) diff --git a/company/forms.py b/company/forms.py index b50f12e5..ad2ff764 100644 --- a/company/forms.py +++ b/company/forms.py @@ -282,6 +282,8 @@ class CreateCompanyForm(forms.Form): def clean_url(self): url = self.cleaned_data['url'] + url = url.replace('http://expomap.ru/members/', '') + if not is_latin(url): raise forms.ValidationError(_(u'url должен состоять только из латинских букв')) diff --git a/functions/signal_handlers.py b/functions/signal_handlers.py index d2a49d65..3a37aef1 100644 --- a/functions/signal_handlers.py +++ b/functions/signal_handlers.py @@ -6,7 +6,7 @@ from functions.form_check import translit_with_separator def pre_save_handler(sender, **kwargs): obj = kwargs['instance'] - if obj.language_code =='en': + if hasattr(obj, 'language_code') and obj.language_code =='en': try: name = getattr(obj, 'name') obj.url = translit_with_separator(name) diff --git a/place_exposition/admin.py b/place_exposition/admin.py index ce467f5a..3cc7ba63 100644 --- a/place_exposition/admin.py +++ b/place_exposition/admin.py @@ -20,7 +20,7 @@ import random #custom fields from functions.custom_views import objects_list, delete_object from functions.views_help import get_referer -from functions.admin_views import AdminView, AdminListView, upload_photo +from functions.admin_views import AdminView, AdminListView, upload_photo, FormView def exposition_all(request): @@ -282,3 +282,28 @@ class PlaceExpositionListView(AdminListView): def upload_place_photo(request, place_id): return upload_photo(request, place_id, PlaceExposition) + + + + +def edit_hall(request, place_url, hall_id): + place = get_object_or_404(PlaceExposition, url=place_url) + hall = get_object_or_404(Hall, id=hall_id) + + if request.POST: + form = HallForm(request.POST) + if form.is_valid(): + form.save(place, hall_id) + return HttpResponseRedirect('/admin/place_exposition/%s/'%place.url) + else: + data = {'capacity': hall.capacity, 'number': hall.number} + for code, name in settings.LANGUAGES: + trans_obj = Hall._meta.translations_model.objects.get(language_code = code, master__id=hall.id) #access to translated fields + data['name_%s'%code] = trans_obj.name + form = HallForm(initial=data) + + context = {'form': form, 'languages': settings.LANGUAGES} + context.update(csrf(request)) + + return render_to_response('admin/place_exposition/hall.html', context) + diff --git a/place_exposition/admin_urls.py b/place_exposition/admin_urls.py index 6de2ec5c..d1283dc1 100644 --- a/place_exposition/admin_urls.py +++ b/place_exposition/admin_urls.py @@ -7,6 +7,7 @@ urlpatterns = patterns('place_exposition.admin', url(r'^add-hall/(?P.*)/$', 'add_hall'), url(r'^delete-hall/(?P.*)/$', 'delete_hall'), url(r'^upload-photo/(?P.*)/$', 'upload_place_photo'), + url(r'^hall/(?P.*)/(?P.*)/$', 'edit_hall'), url(r'^all/$', PlaceExpositionListView.as_view()), #url(r'^add.*/$', 'exposition_add'), diff --git a/place_exposition/forms.py b/place_exposition/forms.py index 0aac6a59..41d9e473 100644 --- a/place_exposition/forms.py +++ b/place_exposition/forms.py @@ -148,10 +148,9 @@ class ExpositionForm(forms.Form): place_exposition.country = Country.objects.get(id=data['country']) if data.get('city'): place_exposition.city = City.objects.get(id=data['city']) - a = place_exposition.logo - place_exposition.save() - fill_with_signal(PlaceExposition, place_exposition, data) + fill_with_signal(PlaceExposition, place_exposition, data) + place_exposition.save() return place_exposition @@ -279,8 +278,10 @@ class HallForm(forms.ModelForm): class HallForm(forms.Form): url = '/admin/place_exposition/add-hall/' - number = forms.CharField(widget=forms.TextInput(attrs={'style': 'width:30px'}),required=False) - capacity = forms.CharField(widget=forms.TextInput(attrs={'style': 'width:60px'}), required=False) + number = forms.CharField(widget=forms.TextInput(attrs={'style': 'width:30px'}),required=False, + label='Номер') + capacity = forms.CharField(widget=forms.TextInput(attrs={'style': 'width:60px'}), required=False, + label='Вместимость') def __init__(self, *args, **kwargs): """ create dynamical translated fields fields @@ -295,11 +296,6 @@ class HallForm(forms.Form): required = True if lid == 0 else False self.fields['name_%s' % code] = forms.CharField(label='Название', required=required) - def clean_number(self): - cleaned_data = super(HallForm, self).clean() - number = cleaned_data.get('number').strip() - return is_positive_integer(number, 'Номер должен состоять из цифр') - def clean_capacity(self): cleaned_data = super(HallForm, self).clean() capacity = cleaned_data.get('capacity').strip() @@ -314,6 +310,7 @@ class HallForm(forms.Form): hall.capacity = data['capacity'] hall.number = data['number'] hall.place_exposition = place_exposition + hall.save() fill_with_signal(Hall, hall, data) return hall diff --git a/place_exposition/models.py b/place_exposition/models.py index 96dda2c7..0c572908 100644 --- a/place_exposition/models.py +++ b/place_exposition/models.py @@ -80,6 +80,7 @@ class PlaceExposition(TranslatableModel, ExpoMixin): # logo = models.ImageField(verbose_name='Logo', upload_to=logo_name, blank=True, max_length=255) rating = models.IntegerField(default=0) + partner = models.NullBooleanField(default=0) # delete after profiling files = generic.GenericRelation('file.FileModel', content_type_field='content_type', object_id_field='object_id') @@ -255,7 +256,7 @@ class Hall(TranslatableModel): Create Hall model which saves information about halls in PlaceExposition """ place_exposition = models.ForeignKey(PlaceExposition, related_name='halls') - number = models.PositiveIntegerField(blank=True, null=True) + number = models.CharField(blank=True, max_length=6) capacity = models.PositiveIntegerField(blank=True, null=True) translations = TranslatedFields( name = models.CharField(max_length=255, blank=True) diff --git a/settings/views.py b/settings/views.py index ea8fd076..d9435df6 100644 --- a/settings/views.py +++ b/settings/views.py @@ -93,7 +93,7 @@ def expo_autosearch(request): term = request.GET['term'] qs = SearchQuerySet().models(Exposition, Theme, Tag).autocomplete(content_auto=term).order_by('text') result = [{'cat': get_by_lang(item, 'catalog_name', lang), - 'text': '%s(%s)'%(get_by_lang(item, 'name', lang),get_by_lang(item, 'parent', lang)) if get_by_lang(item, 'parent', lang) else get_by_lang(item, 'name', lang), + 'text': '%s (%s)'%(get_by_lang(item, 'name', lang),get_by_lang(item, 'parent', lang)) if get_by_lang(item, 'parent', lang) else get_by_lang(item, 'name', lang), 'url':item.url, 'id':item.pk, 'name': item.form_name} for item in qs] diff --git a/templates/admin/place_exposition/hall.html b/templates/admin/place_exposition/hall.html new file mode 100644 index 00000000..8566f449 --- /dev/null +++ b/templates/admin/place_exposition/hall.html @@ -0,0 +1,59 @@ +{% extends 'base.html' %} +{% load static %} + +{% block scripts %} + + + {# google map не забыть скачать скрипты на локал #} + + + + + {# selects #} + + + + + {# ajax #} + + + + +{% endblock %} + +{% block body %} +
{% csrf_token %} +
+ Изменить зал +
+
+

Основная информация

+
+
+ {# name #} + {% with field='name' form=form languages=languages %} + {% include 'admin/forms/multilang.html' %} + {% endwith %} +
+ +
{{ form.number }} + {{ form.number.errors }} +
+
+ +
+ +
{{ form.capacity }} + {{ form.capacity.errors }} +
+
+
+
+
+ + +
+
+
+ +{% endblock %} \ No newline at end of file diff --git a/templates/admin/place_exposition/place_exposition.html b/templates/admin/place_exposition/place_exposition.html index add84f46..a94fed0a 100644 --- a/templates/admin/place_exposition/place_exposition.html +++ b/templates/admin/place_exposition/place_exposition.html @@ -212,7 +212,10 @@ {{ hall.name }} {{ hall.number }} {{ hall.capacity }} - Удалить + + Удалить + Изменить + {% endfor %} diff --git a/templates/client/blank.html b/templates/client/blank.html index b2c2480d..e2e0e81c 100644 --- a/templates/client/blank.html +++ b/templates/client/blank.html @@ -28,7 +28,8 @@ This template include basic anf main styles and js files, - + {% block styles %} + {% endblock %} diff --git a/templates/client/includes/accounts/current_user.html b/templates/client/includes/accounts/current_user.html index f4060113..47abd31f 100644 --- a/templates/client/includes/accounts/current_user.html +++ b/templates/client/includes/accounts/current_user.html @@ -325,6 +325,7 @@
{{ phone_form.phone.value|phone }} +
{% trans 'редактировать' %} @@ -337,6 +338,7 @@
{{ phone_form.phone }} + {{ phone_form.show_phone }}
diff --git a/templates/client/includes/accounts/simple_user.html b/templates/client/includes/accounts/simple_user.html index 15a87db1..2d71d955 100644 --- a/templates/client/includes/accounts/simple_user.html +++ b/templates/client/includes/accounts/simple_user.html @@ -71,7 +71,7 @@
\ No newline at end of file diff --git a/templates/client/service/catalog.html b/templates/client/service/catalog.html index d186fb54..1e90d85d 100644 --- a/templates/client/service/catalog.html +++ b/templates/client/service/catalog.html @@ -178,10 +178,18 @@ diff --git a/templates/client/service/participation.html b/templates/client/service/participation.html index b4b3c307..ef7f9e8d 100644 --- a/templates/client/service/participation.html +++ b/templates/client/service/participation.html @@ -257,10 +257,17 @@ diff --git a/templates/client/service/remotely.html b/templates/client/service/remotely.html index 366a241e..78e37758 100644 --- a/templates/client/service/remotely.html +++ b/templates/client/service/remotely.html @@ -247,10 +247,17 @@ diff --git a/templates/client/service/tickets.html b/templates/client/service/tickets.html index 245451af..1778b32e 100644 --- a/templates/client/service/tickets.html +++ b/templates/client/service/tickets.html @@ -220,7 +220,7 @@
Денис Хома
- Мне понравилось работать с вашей компанией и в частности с Евгенией Булавиной. Все быстро и предельно понятно. Большое спасибо!» + Мне понравилось работать с вашей компанией и в частности с Евгенией Булавиной. Все быстро и предельно понятно. Большое спасибо!
@@ -261,10 +261,17 @@ @@ -326,8 +333,6 @@ - - {% endblock %} \ No newline at end of file diff --git a/templates/client/service/tour.html b/templates/client/service/tour.html index e650f103..6cdbf1e9 100644 --- a/templates/client/service/tour.html +++ b/templates/client/service/tour.html @@ -387,10 +387,17 @@ diff --git a/templates/client/service/translator.html b/templates/client/service/translator.html index 539e22e4..a071dda4 100644 --- a/templates/client/service/translator.html +++ b/templates/client/service/translator.html @@ -356,10 +356,17 @@ diff --git a/templates/client/simple_pages/about.html b/templates/client/simple_pages/about.html index 91f71dda..a3beb10a 100644 --- a/templates/client/simple_pages/about.html +++ b/templates/client/simple_pages/about.html @@ -2,6 +2,33 @@ {% load static %} {% load i18n %} {% load template_filters %} +{% load thumbnail %} + +{% block styles %} + + +{% endblock %} {% block bread_scrumbs %} +
  • +
    +
    + + +
    +
    +
    + + +
    Anatolios Spyrlidis
    + +
    + Мы принимали участие со своим стендом в выставке Boot Duesseldorf в Германии в январе 2014. Выражаем благодарность сотрудникам Expomap, а также персональному консультанту Руслану Шапилову за оперативность, мы остались довольны качеством оказанных услуг! + +
    +
    + +
    +
    +
  • +
  • +
    +
    + + +
    +
    +
    + + +
    Рязанцев Денис
    + +
    + Особой оценки достойна оперативность предоставления услуг и их качество. Хочу отметить профессионализм, организованность, добросовестность, вежливость, грамотность сотрудников компании! + +
    +
    + +
    +
    +
  • +
  • +
    +
    + + +
    +
    +
    +
    +
    + +
    +
    + +
    Ангелина Плещеева
    + +
    + Спасибо Вам за Вашу работу. Все быстро и четко. + +
    +
    + +
    +
    +
  • +
  • +
    +
    + + +
    +
    +
    + + +
    Калинина Светлана
    + +
    + + Очень нравится с Вами сотрудничать, так как всегда есть отклик на наши требования. Разочарований не было. Спасибо за отличную работу! + +
    +
    + +
    +
    +
  • diff --git a/templates/client/static_client/img/partners/new/Bologna Fiere.jpg b/templates/client/static_client/img/partners/new/Bologna Fiere.jpg new file mode 100644 index 00000000..cbeb1753 Binary files /dev/null and b/templates/client/static_client/img/partners/new/Bologna Fiere.jpg differ diff --git a/templates/client/static_client/img/partners/new/Expoforum.gif b/templates/client/static_client/img/partners/new/Expoforum.gif new file mode 100644 index 00000000..0d73e3ef Binary files /dev/null and b/templates/client/static_client/img/partners/new/Expoforum.gif differ diff --git a/templates/client/static_client/img/partners/new/Fiera Milano.png b/templates/client/static_client/img/partners/new/Fiera Milano.png new file mode 100644 index 00000000..e3345a23 Binary files /dev/null and b/templates/client/static_client/img/partners/new/Fiera Milano.png differ diff --git a/templates/client/static_client/img/partners/new/ITE_Logo.png b/templates/client/static_client/img/partners/new/ITE_Logo.png new file mode 100644 index 00000000..147c170e Binary files /dev/null and b/templates/client/static_client/img/partners/new/ITE_Logo.png differ diff --git a/templates/client/static_client/img/partners/new/Lippman Connects.jpg b/templates/client/static_client/img/partners/new/Lippman Connects.jpg new file mode 100644 index 00000000..39838720 Binary files /dev/null and b/templates/client/static_client/img/partners/new/Lippman Connects.jpg differ diff --git a/templates/client/static_client/img/partners/new/Messe Duesseldorf.png b/templates/client/static_client/img/partners/new/Messe Duesseldorf.png new file mode 100644 index 00000000..3f6a3140 Binary files /dev/null and b/templates/client/static_client/img/partners/new/Messe Duesseldorf.png differ diff --git a/templates/client/static_client/img/partners/new/Messe Dusseldorf.jpg b/templates/client/static_client/img/partners/new/Messe Dusseldorf.jpg new file mode 100644 index 00000000..6370f2dc Binary files /dev/null and b/templates/client/static_client/img/partners/new/Messe Dusseldorf.jpg differ diff --git a/templates/client/static_client/img/partners/new/Restec.jpg b/templates/client/static_client/img/partners/new/Restec.jpg new file mode 100644 index 00000000..cc9b389f Binary files /dev/null and b/templates/client/static_client/img/partners/new/Restec.jpg differ diff --git a/templates/client/static_client/img/partners/new/VDNH.jpg b/templates/client/static_client/img/partners/new/VDNH.jpg new file mode 100644 index 00000000..d208ea9a Binary files /dev/null and b/templates/client/static_client/img/partners/new/VDNH.jpg differ diff --git a/templates/client/static_client/img/partners/new/cnr expo.png b/templates/client/static_client/img/partners/new/cnr expo.png new file mode 100644 index 00000000..22cce742 Binary files /dev/null and b/templates/client/static_client/img/partners/new/cnr expo.png differ diff --git a/templates/client/static_client/img/partners/new/crocus_expo.png b/templates/client/static_client/img/partners/new/crocus_expo.png new file mode 100644 index 00000000..b37aa536 Binary files /dev/null and b/templates/client/static_client/img/partners/new/crocus_expo.png differ diff --git a/templates/client/static_client/img/partners/new/deutsche-messe-ag-logo.jpg b/templates/client/static_client/img/partners/new/deutsche-messe-ag-logo.jpg new file mode 100644 index 00000000..12a05f8d Binary files /dev/null and b/templates/client/static_client/img/partners/new/deutsche-messe-ag-logo.jpg differ diff --git a/templates/client/static_client/img/partners/new/evroexpo.jpg b/templates/client/static_client/img/partners/new/evroexpo.jpg new file mode 100644 index 00000000..a1e07698 Binary files /dev/null and b/templates/client/static_client/img/partners/new/evroexpo.jpg differ diff --git a/templates/client/static_client/img/partners/new/expocentr_logo.gif b/templates/client/static_client/img/partners/new/expocentr_logo.gif new file mode 100644 index 00000000..74dd19e5 Binary files /dev/null and b/templates/client/static_client/img/partners/new/expocentr_logo.gif differ diff --git a/templates/client/static_client/img/partners/new/imgo.jpg b/templates/client/static_client/img/partners/new/imgo.jpg new file mode 100644 index 00000000..3261c07d Binary files /dev/null and b/templates/client/static_client/img/partners/new/imgo.jpg differ diff --git a/templates/client/static_client/img/partners/new/koelnmesse_logo.png b/templates/client/static_client/img/partners/new/koelnmesse_logo.png new file mode 100644 index 00000000..501ab9bb Binary files /dev/null and b/templates/client/static_client/img/partners/new/koelnmesse_logo.png differ diff --git a/templates/client/static_client/img/partners/new/logo_VDNH.gif b/templates/client/static_client/img/partners/new/logo_VDNH.gif new file mode 100644 index 00000000..fac768b8 Binary files /dev/null and b/templates/client/static_client/img/partners/new/logo_VDNH.gif differ diff --git a/templates/client/static_client/img/partners/new/reed exhibition.png b/templates/client/static_client/img/partners/new/reed exhibition.png new file mode 100644 index 00000000..c15f8f0d Binary files /dev/null and b/templates/client/static_client/img/partners/new/reed exhibition.png differ diff --git a/templates/client/static_client/img/partners/new/ubm-plc.jpg b/templates/client/static_client/img/partners/new/ubm-plc.jpg new file mode 100644 index 00000000..fb1f4728 Binary files /dev/null and b/templates/client/static_client/img/partners/new/ubm-plc.jpg differ diff --git a/templates/client/static_client/img/partners/new/РАЭК.jpg b/templates/client/static_client/img/partners/new/РАЭК.jpg new file mode 100644 index 00000000..c28345a4 Binary files /dev/null and b/templates/client/static_client/img/partners/new/РАЭК.jpg differ