Rosupack banner

remotes/origin/1203
Kotiuk Nazarii 11 years ago
parent 32b6a69915
commit b559cd7fde
  1. 2
      exposition/views.py
  2. 1
      proj/settings.py
  3. 5
      proj/views.py
  4. 3
      templates/client/exposition/exposition_list.html
  5. 13
      templates/client/includes/banners/expo_detail.html
  6. 6
      templates/client/includes/banners/expo_list_baner.html
  7. 4
      templates/client/includes/exposition/exposition_list.html
  8. 1
      templates/client/includes/exposition/exposition_object.html

@ -344,6 +344,8 @@ class ExpoCatalog(MetadataMixin, ListView):
context['year'] = self.year
context['month'] = self.month
context['catalog_url'] = self.catalog_url
if self.kwargs.get('tag'):
context['tag_for_filter'] = self.kwargs['tag']
return context
class ExpoCountryCatalog(ExpoCatalog):

@ -404,6 +404,7 @@ MONTHES = {'jan': {'value': 1, 'name': _(u'Январь')}, 'feb': {'value': 2,
SNG_COUNTRIES = [159, 186, 31, 6, 99, 13, 189, 64]
CLIENT_DATE_FORMAT = ["%d.%m.%Y"]
# cache pages in random seconds. random in this range

@ -17,9 +17,12 @@ from functions.custom_views import ExpoListView
from accounts.forms import RegistrationCompleteForm
def expo_context(request):
banners_themes = [24, 34, 4]
banner_tags = [141, 142, 143, 156, 206, 231, 232, 390, 391, 400, 457, 500, 536, 537, 539, 457, 500, 686, 715, 765, 766, 857, 927, 964, 971, 972, 987, 1009, 1010, 1021, 2508, 2509, 2516, 2518, 2536, 2568, 2583, 2585, 3811, 3940, 4130, 4192, 4236, 4512, 4841, 5353, 5532, 5854, 106, 107, 195, 380, 930, 931, 932, 3845, 3846, 3863, 3873, 4141, 4142, 4343, 4344, 4347, 211, 212, 277, 631]
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(), 'sng_countries': settings.SNG_COUNTRIES
'news_list': Article.objects.main_page_news(), 'sng_countries': settings.SNG_COUNTRIES,
'banner_themes' : banners_themes, 'banner_tags' : banner_tags
}
user = request.user

@ -24,7 +24,8 @@
{% block page_title %}
<div class="page-title">
<h1>{% if meta %}{{ meta.h1 }}{% else %}{% trans 'Выставки' %}{% endif %}</h1>
{% with a=[111,2] %}
{% endwith %}
</div>
{% include 'includes/exposition/catalog_filter_period.html' %}

@ -0,0 +1,13 @@
{% load static %}
{% load template_filters %}
<div class="abn">
{% with themes=object.theme.all %}
{% for theme in themes %}
{% if theme.id in banner_themes %}
{% endif %}
{% endfor %}
{% endwith %}
</div>

@ -0,0 +1,6 @@
{% load static %}
<div class="abn">
{% if theme_for_filter.id in banner_themes or tag_for_filter.id in banner_tags %}
{% endif %}
</div>

@ -92,7 +92,9 @@
</div>
</footer>
</li>
{% if forloop.counter == 5 or objects|length < 5 %}
{% include 'client/includes/banners/expo_list_baner.html' %}
{% endif %}
{% if forloop.counter == 8 %}
<!-- Яндекс.Директ -->

@ -134,6 +134,7 @@
</div>
<hr />
{% endif %}
{% include 'client/includes/banners/expo_detail.html' %}
<div class="i-event-additional clearfix">
<div class="sect-title">{% trans 'Дополнительная информация' %}</div>
<ul class="e-docs">

Loading…
Cancel
Save