From 73779a73203d76e17a0cabff1c3d04f3df7c2b3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B0=D0=B7=D0=B0=D1=80=20=D0=9A=D0=BE=D1=82=D1=8E?= =?UTF-8?q?=D0=BA?= Date: Mon, 4 May 2015 18:59:55 +0300 Subject: [PATCH] SNG countries --- proj/settings.py | 2 ++ proj/views.py | 2 +- .../conference/conference_services.html | 2 ++ templates/client/includes/event_steps.html | 28 +++++++++++++------ .../exposition/exposition_object.html | 4 +-- .../exposition/exposition_services.html | 3 +- .../client/includes/exposition/services.html | 3 ++ 7 files changed, 32 insertions(+), 12 deletions(-) diff --git a/proj/settings.py b/proj/settings.py index 4c5b602e..8656fdeb 100644 --- a/proj/settings.py +++ b/proj/settings.py @@ -402,6 +402,8 @@ MONTHES = {'jan': {'value': 1, 'name': _(u'Январь')}, 'feb': {'value': 2, 'sep': {'value': 9, 'name': _(u'Сентябрь')}, 'oct': {'value': 10, 'name': _(u'Октябрь')}, 'nov': {'value': 11, 'name': _(u'Ноябрь')}, 'dec': {'value': 12, 'name': _(u'Декабрь')}} +SNG_COUNTRIES = [159, 186, 31, 6, 99, 13, 189, 64] + # cache pages in random seconds. random in this range CACHE_RANGE = [60, 120] diff --git a/proj/views.py b/proj/views.py index 925e676f..86de716f 100644 --- a/proj/views.py +++ b/proj/views.py @@ -19,7 +19,7 @@ from accounts.forms import RegistrationCompleteForm def expo_context(request): cont = {'theme_search_form': ThemeSearch(), 'expo_catalog': Exposition.catalog, 'book_aid': settings.BOOKING_AID, 'blogs': Article.objects.main_page_blogs(), - 'news_list': Article.objects.main_page_news() + 'news_list': Article.objects.main_page_news(), 'sng_countries': settings.SNG_COUNTRIES } user = request.user diff --git a/templates/client/includes/conference/conference_services.html b/templates/client/includes/conference/conference_services.html index b8590ccc..829bfd97 100644 --- a/templates/client/includes/conference/conference_services.html +++ b/templates/client/includes/conference/conference_services.html @@ -5,8 +5,10 @@
  • {% trans 'Устный переводчик' %}
  • + {% if event.country_id not in sng_countries %}
  • {% trans 'Бизнес-тур "под ключ"' %}
  • + {% endif %} \ No newline at end of file diff --git a/templates/client/includes/event_steps.html b/templates/client/includes/event_steps.html index a6e9c869..376c865f 100644 --- a/templates/client/includes/event_steps.html +++ b/templates/client/includes/event_steps.html @@ -3,14 +3,26 @@
    {% if event.catalog == '/expo/' %}{% trans 'Посетить выставку' %}{% else %}{% trans 'Посетить конференцию' %}{% endif %}
    - {% include 'client/includes/exposition/exposition_services.html' %} - {% include 'includes/event_steps.html' with event=exposition %} + {% include 'client/includes/exposition/exposition_services.html' with object=exposition %} + {% include 'client/includes/event_steps.html' with event=exposition %} {% if exposition.get_photos %} {% with photos=exposition.get_photos|slice:"5" %}
    diff --git a/templates/client/includes/exposition/exposition_services.html b/templates/client/includes/exposition/exposition_services.html index fb4f7b67..519a9b37 100644 --- a/templates/client/includes/exposition/exposition_services.html +++ b/templates/client/includes/exposition/exposition_services.html @@ -8,10 +8,11 @@
  • {% trans 'Устный переводчик' %}
  • + {% if exposition.country_id not in sng_countries %}
  • - {% trans 'Бизнес-тур "под ключ"' %}
  • + {% endif %}
  • {% trans 'Заочное посещение' %}
  • diff --git a/templates/client/includes/exposition/services.html b/templates/client/includes/exposition/services.html index ef4dfc36..217182c4 100644 --- a/templates/client/includes/exposition/services.html +++ b/templates/client/includes/exposition/services.html @@ -9,6 +9,9 @@
  • {{ service.name }}
  • {% endfor %} {% endwith %} + {% if obj.country_id in sng_countries %} +
  • {% trans 'Заказать отель' %}
  • + {% endif %} \ No newline at end of file