SNG countries

remotes/origin/1203
Назар Котюк 11 years ago
parent d612b1e776
commit 73779a7320
  1. 2
      proj/settings.py
  2. 2
      proj/views.py
  3. 2
      templates/client/includes/conference/conference_services.html
  4. 28
      templates/client/includes/event_steps.html
  5. 4
      templates/client/includes/exposition/exposition_object.html
  6. 3
      templates/client/includes/exposition/exposition_services.html
  7. 3
      templates/client/includes/exposition/services.html

@ -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]

@ -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

@ -5,8 +5,10 @@
<li>
<a href="{{ event.get_permanent_url }}service/translator/">{% trans 'Устный переводчик' %}</a>
</li>
{% if event.country_id not in sng_countries %}
<li>
<a href="{{ event.get_permanent_url }}service/visit/">{% trans 'Бизнес-тур "под ключ"' %}</a>
</li>
{% endif %}
</ul>
</div>

@ -3,14 +3,26 @@
<div class="i-steps">
<div class="is-title">{% if event.catalog == '/expo/' %}{% trans 'Посетить выставку' %}{% else %}{% trans 'Посетить конференцию' %}{% endif %}</div>
<ul>
<li class="s1">
<div class="label">1. {% trans 'Зарегистрируйтесь на событие' %}</div>
<a class="step"
href="{% if event.registration_link %}{{ registration_link }}{% else %}{{ event.get_permanent_url }}service/tickets/{% endif %}"
target="_blank">
{% if event.catalog == '/expo/' %}{% trans 'Билеты на выставку' %}{% else %}{% trans 'Регистрация' %}{% endif %}
</a>
</li>
{% if event.country_id in sng_countries %}
<li class="s1">
<div class="label">1. {% trans 'Участвовать в событии' %}</div>
<a class="step"
href="{{ event.get_permanent_url }}service/participation/"
target="_blank">
{% trans 'Участвовать' %}
</a>
</li>
{% else %}
<li class="s1">
<div class="label">1. {% trans 'Зарегистрируйтесь на событие' %}</div>
<a class="step"
href="{% if event.registration_link %}{{ registration_link }}{% else %}{{ event.get_permanent_url }}service/tickets/{% endif %}"
target="_blank">
{% if event.catalog == '/expo/' %}{% trans 'Билеты на выставку' %}{% else %}{% trans 'Регистрация' %}{% endif %}
</a>
</li>
{% endif %}
<li class="s2">
<div class="label">2. {% trans 'Забронируйте отель по лучшей цене' %}</div>

@ -104,8 +104,8 @@
</div>
</div>
</div>
{% 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" %}
<hr />

@ -8,10 +8,11 @@
<li>
<a href="{{ exposition.get_permanent_url }}service/translator/">{% trans 'Устный переводчик' %}</a>
</li>
{% if exposition.country_id not in sng_countries %}
<li>
<a href="{{ exposition.get_permanent_url }}service/visit/">{% trans 'Бизнес-тур "под ключ"' %}</a>
</li>
{% endif %}
<li>
<a href="{{ exposition.get_permanent_url }}service/remote/">{% trans 'Заочное посещение' %}</a>
</li>

@ -9,6 +9,9 @@
<li><a href="{{ obj.get_permanent_url }}service/{{ service.url }}/">{{ service.name }}</a></li>
{% endfor %}
{% endwith %}
{% if obj.country_id in sng_countries %}
<li><a href="http://www.booking.com/searchresults.html?aid={{ book_aid }}&city={{ obj.city.id }}&do_availability_check=on&label=expo_search&lang={{ request.LANGUAGE_CODE }}&checkin_monthday={{ obj.data_begin|date:'j' }}&checkin_year_month={{ obj.data_begin|date:'Y' }}-{{ obj.data_begin|date:'n' }}&checkout_monthday={{ obj.data_end|date:'j' }}&checkout_year_month={{ obj.data_end|date:'Y' }}-{{ obj.data_end|date:'n' }}">{% trans 'Заказать отель' %}</a></li>
{% endif %}
</ul>
</div>
</div>
Loading…
Cancel
Save