diff --git a/conference/views.py b/conference/views.py index c01ce80c..bbbc63c6 100644 --- a/conference/views.py +++ b/conference/views.py @@ -10,6 +10,8 @@ from django.views.generic import ListView, DetailView from django.views.generic.edit import FormMixin from django.utils.translation import ugettext as _ from django.utils import translation +from service.models import Service +from service.views import order_forms from note.models import Note from models import Conference from accounts.models import User @@ -17,7 +19,6 @@ from country.models import Country from city.models import City from theme.models import Theme, Tag from service.order_forms import AdvertiseForm -from functions.search_forms import ExpositionSearchForm from meta.views import MetadataMixin from functions.cache_mixin import JitterCacheMixin, CacheMixin @@ -97,7 +98,6 @@ class ConferenceCatalog(JitterCacheMixin, MetadataMixin, ListView): model = Conference paginate_by = settings.CLIENT_PAGINATION template_name = 'client/conference/catalog.html' - search_form = ExpositionSearchForm filter_object = None year = None month = None @@ -152,10 +152,8 @@ class ConferenceCatalog(JitterCacheMixin, MetadataMixin, ListView): return qs.order_by('data_begin') - def get_context_data(self, **kwargs): context = super(ConferenceCatalog, self).get_context_data(**kwargs) - context['search_form'] = self.search_form context['filter_object'] = self.filter_object context['year'] = self.year context['month'] = self.month @@ -164,6 +162,7 @@ class ConferenceCatalog(JitterCacheMixin, MetadataMixin, ListView): class ConferenceCountryCatalog(ConferenceCatalog): catalog_url = '/conference/country/' + def get_filtered_qs(self): #this method used in parent get_queryset slug = self.kwargs.get('slug') @@ -173,6 +172,12 @@ class ConferenceCountryCatalog(ConferenceCatalog): qs = self.model.enable.upcoming().filter(country=country) return qs + def get_context_data(self, **kwargs): + context = super(ConferenceCountryCatalog, self).get_context_data(**kwargs) + context['country'] = str(self.kwargs['country'].id) + return context + + class ConferenceCityCatalog(ConferenceCatalog): catalog_url = '/conference/city/' def get_filtered_qs(self): @@ -184,6 +189,11 @@ class ConferenceCityCatalog(ConferenceCatalog): self.filter_object = city return qs + def get_context_data(self, **kwargs): + context = super(ConferenceCityCatalog, self).get_context_data(**kwargs) + context['city'] = str(self.kwargs['city'].id) + return context + class ConferenceThemeCatalog(ConferenceCatalog): template_name = 'conference/catalog_theme.html' @@ -219,6 +229,9 @@ class ConferenceThemeCatalog(ConferenceCatalog): context['country'] = self.country if self.city: context['city'] = self.city + + context['theme_for_filter'] = self.kwargs['theme'] + context['themes'] = [str(self.kwargs['theme'].id)] return context @@ -233,16 +246,20 @@ class ConferenceTagCatalog(ConferenceCatalog): self.filter_object = tag return qs + def get_context_data(self, **kwargs): + context = super(ConferenceTagCatalog, self).get_context_data(**kwargs) + tag = self.kwargs['tag'] + context['theme_for_filter'] = tag.theme + context['themes'] = [str(tag.theme.id)] + context['tag'] = str(self.kwargs['tag'].id) + return context + class ConferenceVisitors(MetadataMixin, ListView): paginate_by = settings.CLIENT_PAGINATION model = Conference - #template_name = 'event_visitors.html' - template_name = 'client/conference/visitors.html' - obj = None - search_form = ExpositionSearchForm def get_queryset(self): slug = self.kwargs.get('slug') @@ -252,20 +269,19 @@ class ConferenceVisitors(MetadataMixin, ListView): def get_context_data(self, **kwargs): context = super(ConferenceVisitors, self).get_context_data(**kwargs) - context['object'] = self.obj - context['search_form'] = self.search_form + obj = self.obj + context['object'] = obj + context['city'] = str(obj.city_id) + context['country'] = str(obj.country_id) + context['themes'] = [str(item.id) for item in obj.theme.all()] return context class ConferenceMembers(MetadataMixin, ListView): paginate_by = settings.CLIENT_PAGINATION model = Conference - #template_name = 'event_visitors.html' - template_name = 'client/conference/members.html' - obj = None - search_form = ExpositionSearchForm def get_queryset(self): slug = self.kwargs.get('slug') @@ -275,12 +291,14 @@ class ConferenceMembers(MetadataMixin, ListView): def get_context_data(self, **kwargs): context = super(ConferenceMembers, self).get_context_data(**kwargs) - context['object'] = self.obj - context['search_form'] = self.search_form + obj = self.obj + context['object'] = obj + context['city'] = str(obj.city_id) + context['country'] = str(obj.country_id) + context['themes'] = [str(item.id) for item in obj.theme.all()] return context -from service.models import Service -from service.views import order_forms + class ConferenceThankView(MetadataMixin, DetailView): model = Conference @@ -324,7 +342,11 @@ class ConferenceServiceView(FormMixin, DetailView): raise Http404 context['form'] = self.get_form(self.form_class) context['service'] = service - context['object'] = self.get_object() + obj = self.get_object() + context['object'] = obj + context['city'] = str(obj.city_id) + context['country'] = str(obj.country_id) + context['themes'] = [str(item.id) for item in obj.theme.all()] return context def form_valid(self, form): @@ -347,14 +369,11 @@ class ConferenceServiceView(FormMixin, DetailView): 'city':user.profile.city.name if user.profile.city else '', 'phone': user.profile.phone if user.profile.phone else ''} - - return initial else: return self.initial.copy() - class ConferenceDetail(JitterCacheMixin, DetailView): cache_range = settings.CACHE_RANGE model = Conference @@ -370,19 +389,21 @@ class ConferenceDetail(JitterCacheMixin, DetailView): except City.DoesNotExist: return super(ConferenceDetail, self).dispatch(request, *args, **kwargs) - - def get_context_data(self, **kwargs): context = super(ConferenceDetail, self).get_context_data(**kwargs) context['advertising_form'] = AdvertiseForm() + obj = self.object + context['city'] = str(obj.city_id) + context['country'] = str(obj.country_id) + context['themes'] = [str(item.id) for item in obj.theme.all()] return context + class ConferenceList(MetadataMixin, JitterCacheMixin, ListView): cache_range = settings.CACHE_RANGE model = Conference paginate_by = settings.CLIENT_PAGINATION template_name = 'client/conference/conference_list.html' - search_form = ExpositionSearchForm catalog_url = '/conference/' year = None month = None @@ -410,7 +431,6 @@ class ConferenceList(MetadataMixin, JitterCacheMixin, ListView): context = super(ConferenceList, self).get_context_data(**kwargs) context['month'] = self.month context['catalog_url'] = self.catalog_url - context['search_form'] = self.search_form context['year'] = self.year context['month'] = self.month return context diff --git a/core/views.py b/core/views.py index 9545b925..9e0af308 100644 --- a/core/views.py +++ b/core/views.py @@ -244,7 +244,7 @@ class DeletePage(DeleteView): class PageDetailed(DetailView): model = Page - template_name = 'client/base_page.html' + template_name = 'client/base_catalog.html' slug_field = 'url' slug_url_kwarg = 'url' diff --git a/exposition/views.py b/exposition/views.py index 721bd91c..43f5fb8f 100644 --- a/exposition/views.py +++ b/exposition/views.py @@ -2,14 +2,14 @@ import json import datetime from django.http import HttpResponseRedirect, HttpResponse, HttpResponsePermanentRedirect -from django.contrib import messages from django.contrib.contenttypes.models import ContentType from django.conf import settings from django.views.generic import ListView, DetailView from django.utils.translation import ugettext as _ -from django.shortcuts import get_object_or_404, render_to_response +from django.shortcuts import get_object_or_404 from django.http import Http404 -from django.utils import translation +from django.views.generic.edit import FormMixin +from django.core.mail import EmailMessage #models from accounts.models import User from models import Exposition @@ -23,9 +23,7 @@ from service.order_forms import AdvertiseForm from functions.search_forms import ExpositionSearchForm from functions.custom_views import ExpoSearchView from meta.views import MetadataMixin -from functions.cache_mixin import JitterCacheMixin, CacheMixin - - +from functions.cache_mixin import JitterCacheMixin class ExpositionBy(JitterCacheMixin, MetadataMixin, ListView): @@ -156,12 +154,28 @@ class ExpoDetail(JitterCacheMixin, MetadataMixin, DetailView): def get_context_data(self, **kwargs): context = super(ExpoDetail, self).get_context_data(**kwargs) context['advertising_form'] = AdvertiseForm() + obj = self.object + context['city'] = str(obj.city_id) + context['country'] = str(obj.country_id) + context['themes'] = [str(item.id) for item in obj.theme.all()] + return context + class ExpositionProgramme(MetadataMixin, DetailView): model = Exposition slug_field = 'url' template_name = 'client/exposition/programm.html' + queryset = Exposition.objects.language().select_related('place', 'city', 'country', 'paid_new') + + def get_context_data(self, **kwargs): + context = super(ExpositionProgramme, self).get_context_data(**kwargs) + obj = self.object + context['city'] = str(obj.city_id) + context['country'] = str(obj.country_id) + context['themes'] = [str(item.id) for item in obj.theme.all()] + + return context class ExpositionPrice(MetadataMixin, DetailView): @@ -170,20 +184,47 @@ class ExpositionPrice(MetadataMixin, DetailView): template_name = 'client/exposition/price.html' queryset = Exposition.objects.language().select_related('place', 'city', 'country', 'paid_new') + def get_context_data(self, **kwargs): + context = super(ExpositionPrice, self).get_context_data(**kwargs) + obj = self.object + context['city'] = str(obj.city_id) + context['country'] = str(obj.country_id) + context['themes'] = [str(item.id) for item in obj.theme.all()] + + return context class ExpositionStatistic(MetadataMixin, DetailView): model = Exposition slug_field = 'url' template_name = 'client/exposition/statistic.html' + queryset = Exposition.objects.language().select_related('place', 'city', 'country', 'paid_new') + + def get_context_data(self, **kwargs): + context = super(ExpositionStatistic, self).get_context_data(**kwargs) + obj = self.object + context['city'] = str(obj.city_id) + context['country'] = str(obj.country_id) + context['themes'] = [str(item.id) for item in obj.theme.all()] + + return context -from django.views.generic.edit import FormMixin, ModelFormMixin class ExpositionThankView(MetadataMixin, DetailView): model = Exposition slug_field = 'url' template_name = 'client/service/thank_u_page.html' + def get_context_data(self, **kwargs): + context = super(ExpositionThankView, self).get_context_data(**kwargs) + obj = self.object + context['city'] = str(obj.city_id) + context['country'] = str(obj.country_id) + context['themes'] = [str(item.id) for item in obj.theme.all()] + + return context + + def visit_redirect(request, slug): obj = get_object_or_404(Exposition, url=slug) redirect = obj.get_permanent_url() + 'price/' @@ -226,7 +267,12 @@ class ExpositionServiceView(MetadataMixin, FormMixin, DetailView): raise Http404 context['form'] = self.get_form(self.form_class) context['service'] = self.service - context['object'] = self.get_object() + obj = self.get_object() + context['object'] = obj + context['city'] = str(obj.city_id) + context['country'] = str(obj.country_id) + context['themes'] = [str(item.id) for item in obj.theme.all()] + return context def form_valid(self, form): @@ -248,8 +294,6 @@ class ExpositionServiceView(MetadataMixin, FormMixin, DetailView): 'city':user.profile.city.name if user.profile.city else '', 'phone': user.profile.phone if user.profile.phone else ''} - - return initial else: return self.initial.copy() @@ -260,12 +304,12 @@ class ExpoList(MetadataMixin, JitterCacheMixin, ListView): model = Exposition paginate_by = settings.CLIENT_PAGINATION template_name = 'client/exposition/exposition_list.html' - search_form = ExpositionSearchForm catalog_url = '/expo/' year = None month = None def get_queryset(self): + MONTHES = settings.MONTHES if self.request.user.is_staff: qs = self.model.objects.upcoming() else: @@ -286,18 +330,16 @@ class ExpoList(MetadataMixin, JitterCacheMixin, ListView): context = super(ExpoList, self).get_context_data(**kwargs) context['month'] = self.month context['catalog_url'] = self.catalog_url - context['search_form'] = self.search_form context['year'] = self.year context['month'] = self.month return context -MONTHES = settings.MONTHES + class ExpoCatalog(MetadataMixin, ListView): model = Exposition paginate_by = settings.CLIENT_PAGINATION template_name = 'client/exposition/catalog.html' - search_form = ExpositionSearchForm filter_object = None year = None month = None @@ -351,10 +393,8 @@ class ExpoCatalog(MetadataMixin, ListView): return qs.order_by('data_begin') - def get_context_data(self, **kwargs): context = super(ExpoCatalog, self).get_context_data(**kwargs) - context['search_form'] = self.search_form context['filter_object'] = self.filter_object context['year'] = self.year context['month'] = self.month @@ -363,6 +403,7 @@ class ExpoCatalog(MetadataMixin, ListView): context['tag_for_filter'] = self.kwargs['tag'] return context + class ExpoCountryCatalog(ExpoCatalog): catalog_url = '/expo/country/' def get_filtered_qs(self): @@ -379,6 +420,7 @@ class ExpoCountryCatalog(ExpoCatalog): context['country'] = str(self.kwargs['country'].id) return context + class ExpoCityCatalog(ExpoCatalog): catalog_url = '/expo/city/' def get_filtered_qs(self): @@ -428,9 +470,9 @@ class ExpoThemeCatalog(ExpoCatalog): def get_context_data(self, **kwargs): context = super(ExpoThemeCatalog, self).get_context_data(**kwargs) if self.country: - context['country'] = str(self.country.id) + context['country'] = self.country if self.city: - context['city'] = str(self.city.id) + context['city'] = self.city context['theme_for_filter'] = self.kwargs['theme'] context['themes'] = [str(self.kwargs['theme'].id)] return context @@ -438,6 +480,7 @@ class ExpoThemeCatalog(ExpoCatalog): class ExpoTagCatalog(ExpoCatalog): catalog_url = '/expo/tag/' + def get_filtered_qs(self): #this method used in parent get_queryset slug = self.kwargs.get('slug') @@ -459,12 +502,8 @@ class ExpoTagCatalog(ExpoCatalog): class ExpoVisitors(MetadataMixin, ListView): paginate_by = settings.CLIENT_PAGINATION model = Exposition - #template_name = 'event_visitors.html' - template_name = 'client/exposition/visitors.html' - obj = None - search_form = ExpositionSearchForm def get_queryset(self): slug = self.kwargs.get('slug') @@ -475,20 +514,19 @@ class ExpoVisitors(MetadataMixin, ListView): def get_context_data(self, **kwargs): context = super(ExpoVisitors, self).get_context_data(**kwargs) - context['object'] = self.obj - context['search_form'] = self.search_form + obj = self.obj + context['object'] = obj + context['city'] = str(obj.city_id) + context['country'] = str(obj.country_id) + context['themes'] = [str(item.id) for item in obj.theme.all()] return context class ExpoMembers(MetadataMixin, ListView): paginate_by = settings.CLIENT_PAGINATION model = Exposition - #template_name = 'event_visitors.html' - template_name = 'client/exposition/members.html' - obj = None - search_form = ExpositionSearchForm def get_queryset(self): slug = self.kwargs.get('slug') @@ -499,8 +537,11 @@ class ExpoMembers(MetadataMixin, ListView): def get_context_data(self, **kwargs): context = super(ExpoMembers, self).get_context_data(**kwargs) - context['object'] = self.obj - context['search_form'] = self.search_form + obj = self.obj + context['object'] = obj + context['city'] = str(obj.city_id) + context['country'] = str(obj.country_id) + context['themes'] = [str(item.id) for item in obj.theme.all()] return context @@ -536,8 +577,6 @@ def add_note(request, slug): return HttpResponse(json.dumps(args), content_type='application/json') -from django.core.mail import send_mail -from django.core.mail import EmailMessage def send_to_organiser(request, slug): exposition = get_object_or_404(Exposition, url=slug) mail_send = 'evm@expomap.ru' @@ -552,5 +591,4 @@ def send_to_organiser(request, slug): msg.send() redirect_to = '%sservice/thanks/'%exposition.get_permanent_url() - return HttpResponse(json.dumps({'success':True, 'redirect_to': redirect_to}), content_type='application/json') - + return HttpResponse(json.dumps({'success':True, 'redirect_to': redirect_to}), content_type='application/json') \ No newline at end of file diff --git a/place_exposition/urls.py b/place_exposition/urls.py index 6f68b806..6c40ed2b 100644 --- a/place_exposition/urls.py +++ b/place_exposition/urls.py @@ -1,13 +1,11 @@ # -*- coding: utf-8 -*- from django.conf.urls import patterns, include, url -from views import PlaceSearchView, PlaceDetail, PlaceList, PlaceCityCatalog, PlaceCountryCatalog, PlacePhoto +from views import PlaceDetail, PlaceList, PlaceCityCatalog, PlaceCountryCatalog, PlacePhoto urlpatterns = patterns('', - # correct - url(r'search/', PlaceSearchView.as_view()), - # correct + #url(r'country/$', PlaceCountryCatalog.as_view()), url(r'country/(?P.*)/page/(?P\d+)/$', PlaceCountryCatalog.as_view(), {'meta_id':49}), url(r'country/(?P.*)/$', PlaceCountryCatalog.as_view(), {'meta_id':49}), diff --git a/place_exposition/views.py b/place_exposition/views.py index c72b2c38..a40f28d7 100644 --- a/place_exposition/views.py +++ b/place_exposition/views.py @@ -42,19 +42,11 @@ def place(request, url, photo=None): return render_to_response('photoreport.html', args, context_instance=RequestContext(request)) return render_to_response('place.html', args, context_instance=RequestContext(request)) -from functions.custom_views import ExpoSearchView -from functions.search_forms import PlaceSearchForm -class PlaceSearchView(ExpoSearchView): - #paginate_by = 10 - template_name = 'place/search.html' - search_form = PlaceSearchForm - model = PlaceExposition class PlaceDetail(JitterCacheMixin, MetadataMixin, DetailView): cache_range = settings.CACHE_RANGE model = PlaceExposition - search_form = PlaceSearchForm slug_field = 'url' template_name = 'client/place/place_detail.html' @@ -96,7 +88,9 @@ class PlaceDetail(JitterCacheMixin, MetadataMixin, DetailView): def get_context_data(self, **kwargs): context = super(PlaceDetail, self).get_context_data(**kwargs) - context['search_form'] = self.search_form + obj = self.object + context['city'] = str(obj.city_id) + context['country'] = str(obj.country_id) return context class PlacePhoto(ListView): @@ -118,7 +112,10 @@ class PlacePhoto(ListView): def get_context_data(self, **kwargs): context = super(PlacePhoto, self).get_context_data(**kwargs) - context['object'] = self.obj + obj = self.obj + context['object'] = obj + context['city'] = str(obj.city_id) + context['country'] = str(obj.country_id) return context @@ -126,7 +123,6 @@ class PlaceList(JitterCacheMixin, MetadataMixin, ListView): model = PlaceExposition paginate_by = 10 template_name = 'client/place/place_list.html' - search_form = PlaceSearchForm def get_queryset(self): @@ -135,11 +131,6 @@ class PlaceList(JitterCacheMixin, MetadataMixin, ListView): conf_qs = PlaceConference.objects.language().all() return list(qs)+list(conf_qs) - def get_context_data(self, **kwargs): - context = super(PlaceList, self).get_context_data(**kwargs) - context['search_form'] = self.search_form - return context - class PlaceCatalog(JitterCacheMixin, MetadataMixin, ListView): cache_range = settings.CACHE_RANGE @@ -170,6 +161,11 @@ class PlaceCountryCatalog(PlaceCatalog): return list(qs) + list(conf_qs) + def get_context_data(self, **kwargs): + context = super(PlaceCountryCatalog, self).get_context_data(**kwargs) + context['country'] = str(self.kwargs['country'].id) + return context + class PlaceCityCatalog(PlaceCatalog): catalog_url = '/places/' @@ -181,4 +177,9 @@ class PlaceCityCatalog(PlaceCatalog): self.filter_object = city qs = self.model.objects.language().select_related('country', 'city').filter(city=city).order_by('-rating') conf_qs = PlaceConference.objects.language().select_related('country', 'city').filter(city=city) - return list(qs) + list(conf_qs) \ No newline at end of file + return list(qs) + list(conf_qs) + + def get_context_data(self, **kwargs): + context = super(PlaceCityCatalog, self).get_context_data(**kwargs) + context['city'] = str(self.kwargs['city'].id) + return context \ No newline at end of file diff --git a/proj/urls.py b/proj/urls.py index a8906dc1..03c2a385 100644 --- a/proj/urls.py +++ b/proj/urls.py @@ -8,7 +8,7 @@ import debug_toolbar from django.views.generic.base import TemplateView class Robot(TemplateView): - template_name = 'robots.txt' + template_name = 'client/robots.txt' content_type = 'text/plain' class YandexCheck(TemplateView): @@ -71,9 +71,7 @@ urlpatterns = patterns('', url(r'^', include('password_reset.urls')), url(r'^i18n/', include('django.conf.urls.i18n')), url(r'^redirect/', include('banners.urls')), - #url(r'^social/', include('social_auth.urls')), url(r'^', include('settings.old_urls')), - #url(r'^search/', include('haystack.urls')), url(r'^', include('service.urls')), ) diff --git a/templates/client/base_catalog.html b/templates/client/base_catalog.html index 106ec884..46746b57 100644 --- a/templates/client/base_catalog.html +++ b/templates/client/base_catalog.html @@ -17,54 +17,33 @@
{% include 'client/includes/online_consult.html' %} - {% include 'client/includes/banners/aside_1.html' %} - {% block aside_banner1 %} - {% if theme_for_filter.id == 27 or theme_for_filter.id == 9 or theme_for_filter.id == 48 %} -
-
- - - -
-
- {% endif %} - {% endblock %} + {% include 'client/includes/banners/aside_1.html' %} {% include 'client/includes/services.html' %}
{% include 'client/includes/announces.html' %} - {% block asside_banner2 %} - - - {% comment %} -
-
- - - -
-
- {% endcomment %} - - - {% endblock %} {% include 'client/includes/side_confs.html' %} +
{% include 'client/includes/banners/aside_2.html' %} +
+
{% include 'client/includes/news.html' with news=news_list %}
+ {% include 'client/includes/banners/aside_3.html' %} {% block aside_vk %} -
- {% include 'client/includes/social_widjet.html' %} -
+
+ {% include 'client/includes/social_widjet.html' %} +
{% endblock %} + {% include 'client/includes/banners/aside_4.html' %} diff --git a/templates/client/base_page.html b/templates/client/base_page.html deleted file mode 100644 index 42d7fcaa..00000000 --- a/templates/client/base_page.html +++ /dev/null @@ -1,113 +0,0 @@ -{% extends 'blank.html' %} - -{% load static %} -{% load i18n %} -{% load template_filters %} - - -{% block main_part %} -
-
- - -
- {% with search_form=search_form %} - {% include 'client/includes/catalog_search.html' %} - {% endwith %} - {% block under_search_baner %} - {% include 'client/includes/banners/under_search.html' %} - {% endblock %} - - {% block bread_scrumbs %} - - {% endblock %} - -
- {% block page_title %} - - {% endblock %} -
- - {% block page_filter %} - {% endblock %} - - {% block page_body %} -
- {% block content_list %} - {% endblock %} - - {% block paginator %} - - - {% endblock %} - - {% block content_footer_banner %} - {% endblock %} -
- - {% block content_text %} - {% comment %} - {% with filter=filter %} - {% include 'includes/event_list_description.html' %} - {% endwith %} - {% endcomment %} - - {% endblock %} - {% endblock %} -
-
-
-{% endblock %} diff --git a/templates/client/blank.html b/templates/client/blank.html index 9d4b6acf..00219448 100644 --- a/templates/client/blank.html +++ b/templates/client/blank.html @@ -81,7 +81,7 @@ This template include basic anf main styles and js files, + {% include 'client/includes/banners/catalog_inner.html' %} {%endif %} {% endfor %} diff --git a/templates/client/includes/conference/conference_object.html b/templates/client/includes/conference/conference_object.html index 6fc8b293..02b61d28 100644 --- a/templates/client/includes/conference/conference_object.html +++ b/templates/client/includes/conference/conference_object.html @@ -196,6 +196,12 @@ {% endif %} + +
+
+ {% include 'client/includes/banners/detail_inner.html' %} +
+
diff --git a/templates/client/includes/exposition/expo_list_paid.html b/templates/client/includes/exposition/expo_list_paid.html deleted file mode 100644 index 1b5fdd3e..00000000 --- a/templates/client/includes/exposition/expo_list_paid.html +++ /dev/null @@ -1,154 +0,0 @@ -{% load static %} -{% load i18n %} -{% load template_filters %} -{% with objects=object_list %} - {% if objects %} -
    - - {% for obj in objects %} -
  • -
    - - {% if obj.canceled %} -
    - {% else %} - {% if obj.expohit %} -
    - {% endif %} - {% endif %} -
    - {% with obj=obj %} - {% include 'client/includes/show_logo.html' %} - {% endwith %} -
    -
    -
    -
    - {% if obj.quality_label.ufi.is_set %} -
    - -
    - {% endif %} -
    - -
    -
    - {{ obj.main_title|safe }} -
    -
    -
    -
    - {% with obj=obj %} - {% include 'client/includes/show_date_block.html' %} - {% endwith %} -
    - {% if obj.country %} -
    - {{ obj.country }}, {{ obj.city }} - {% if obj.place %} - , {{ obj.place }} - {% endif %} -
    - {% endif %} -
    -
    -
    -
    - {% include 'client/includes/exposition/services.html' with obj=obj %} - {% include 'client/includes/calendar_button.html' with obj=obj%} -
    - {% with note=obj|note_by_user:request.user %} - {% trans 'заметка' %} -
    -
    - -
    -
    - {% endwith %} -
    - {% if request.user.is_admin %} - - {% endif %} -
    -
    -
    - {% include 'client/buttons/booking_button.html' with object=obj %} -
    -
    -
    -
    -
    - {% if obj.visitors %} - {{ obj.visitors }} - {% endif %} - {% if obj.members %} - {{ obj.members }} - {% endif %} -
    -
    - {% include 'client/includes/exposition/tags.html' with obj=obj %} -
    -
    -
  • - - {% if forloop.counter == 8 %} - - - {%endif %} - {% endfor %} - -
- {% else %} -

- - {% trans "Выставки по указанным параметрам не найдены. Попробуйте задать менее точный запрос по теме или расширить период времени" %} - -

- {% endif %} - -{% endwith %} - - - -{% block scripts %} -{% if request.GET.debug == '1' %} - -{% else %} - -{% endif %} -{% endblock %} \ No newline at end of file diff --git a/templates/client/includes/exposition/exposition_list.html b/templates/client/includes/exposition/exposition_list.html index 5e73135e..6f27536d 100644 --- a/templates/client/includes/exposition/exposition_list.html +++ b/templates/client/includes/exposition/exposition_list.html @@ -100,9 +100,9 @@ - {% if forloop.counter == 5 or objects|length < 5 %} - {% include 'client/includes/banners/expo_list_baner.html' %} - {% endif %} + {% if forloop.counter == 5 or objects|length < 5 %} + {% include 'client/includes/banners/catalog_inner_2.html' %} + {% endif %} {% if forloop.counter == 8 %} {% include 'client/includes/banners/catalog_inner.html' %} diff --git a/templates/client/includes/exposition/exposition_object.html b/templates/client/includes/exposition/exposition_object.html index 8ae51315..dc783ff0 100644 --- a/templates/client/includes/exposition/exposition_object.html +++ b/templates/client/includes/exposition/exposition_object.html @@ -206,10 +206,10 @@
-
-
- {% include 'client/includes/banners/detail_inner.html' %} -
+
+
+ {% include 'client/includes/banners/detail_inner.html' %} +

diff --git a/templates/client/includes/exposition/members.html b/templates/client/includes/exposition/members.html index f9c74e1a..d0bd4e4a 100644 --- a/templates/client/includes/exposition/members.html +++ b/templates/client/includes/exposition/members.html @@ -49,5 +49,12 @@
+ {% if forloop.counter == 5 or objects|length < 5 %} + {% include 'client/includes/banners/catalog_inner_2.html' %} + {% endif %} + + {% if forloop.counter == 8 %} + {% include 'client/includes/banners/catalog_inner.html' %} + {%endif %} {% endfor %} \ No newline at end of file diff --git a/templates/client/includes/exposition/search_result.html b/templates/client/includes/exposition/search_result.html index a387d86c..93bc23af 100644 --- a/templates/client/includes/exposition/search_result.html +++ b/templates/client/includes/exposition/search_result.html @@ -83,6 +83,13 @@
+ {% if forloop.counter == 5 or objects|length < 5 %} + {% include 'client/includes/banners/catalog_inner_2.html' %} + {% endif %} + + {% if forloop.counter == 8 %} + {% include 'client/includes/banners/catalog_inner.html' %} + {%endif %} {% endfor %} {% block scripts %} diff --git a/templates/client/includes/exposition/visitors.html b/templates/client/includes/exposition/visitors.html index ecf0a7d2..0958316b 100644 --- a/templates/client/includes/exposition/visitors.html +++ b/templates/client/includes/exposition/visitors.html @@ -51,6 +51,13 @@ + {% if forloop.counter == 5 or objects|length < 5 %} + {% include 'client/includes/banners/catalog_inner_2.html' %} + {% endif %} + + {% if forloop.counter == 8 %} + {% include 'client/includes/banners/catalog_inner.html' %} + {%endif %} {% endfor %} diff --git a/templates/client/includes/place/place_list.html b/templates/client/includes/place/place_list.html index d5aae814..936a8bf6 100644 --- a/templates/client/includes/place/place_list.html +++ b/templates/client/includes/place/place_list.html @@ -48,6 +48,13 @@ + {% if forloop.counter == 5 or objects|length < 5 %} + {% include 'client/includes/banners/catalog_inner_2.html' %} + {% endif %} + + {% if forloop.counter == 8 %} + {% include 'client/includes/banners/catalog_inner.html' %} + {%endif %} {% endfor %} {% endwith %} \ No newline at end of file diff --git a/templates/client/includes/place/place_object.html b/templates/client/includes/place/place_object.html index 2ca4bd36..9d6b5e10 100644 --- a/templates/client/includes/place/place_object.html +++ b/templates/client/includes/place/place_object.html @@ -287,6 +287,10 @@
{% include 'client/includes/booking_block.html' with city=place.city place=place %}
+
+
+ {% include 'client/includes/banners/detail_inner.html' %} +
{% if place.get_nearest_places %}
{% trans 'Ближайшие выставочные центры' %}
diff --git a/templates/client/index.html b/templates/client/index.html index 96882fb3..a887eb2a 100644 --- a/templates/client/index.html +++ b/templates/client/index.html @@ -55,22 +55,7 @@
- -
- {% block menu_banner %} - {% comment %} - {% if False|random3 == 1 %} - - {% else %} - {% if False|random3 == 2 %} - - {% else %} - - {% endif %} - {% endif %} - {% endcomment %} - {% endblock %} -
+ {% include 'client/includes/banners/main_page_inner.html' %} @@ -159,12 +144,6 @@
{% include 'client/includes/index/blogs.html' with blogs=blogs %} - {% comment %} - -
-
-
- {% endcomment %}
diff --git a/templates/client/page/page_view.html b/templates/client/page/page_view.html index b9e50244..d233787f 100644 --- a/templates/client/page/page_view.html +++ b/templates/client/page/page_view.html @@ -1,4 +1,4 @@ -{% extends 'base_page.html' %} +{% extends 'client/base_catalog.html' %} {% load static %} {% load i18n %} diff --git a/templates/client/place/catalog.html b/templates/client/place/catalog.html index 77939ade..1753dc27 100644 --- a/templates/client/place/catalog.html +++ b/templates/client/place/catalog.html @@ -18,7 +18,7 @@ {% endblock %} {% block content_list %} - {% include 'includes/place/place_list.html' with object_list=object_list %} + {% include 'client/includes/place/place_list.html' with object_list=object_list %} {% endblock %} {% block paginator %} diff --git a/templates/client/robots.txt b/templates/client/robots.txt index f98ce0b4..13f41eb9 100644 --- a/templates/client/robots.txt +++ b/templates/client/robots.txt @@ -97,6 +97,7 @@ Disallow: /*/serv-visa-info.php Disallow: /*/serv-uchastie-info.php Disallow: /*/serv-catalogue-info.php Disallow: /*/serv-catalogs-info.php +Disallow: /expo-b/ Sitemap: http://expomap.ru/sitemap.xml User-agent: Googlebot @@ -198,6 +199,7 @@ Disallow: /*/serv-visa-info.php Disallow: /*/serv-uchastie-info.php Disallow: /*/serv-catalogue-info.php Disallow: /*/serv-catalogs-info.php +Disallow: /expo-b/ Sitemap: http://expomap.ru/sitemap.xml User-agent: Yandex @@ -299,5 +301,6 @@ Disallow: /*/serv-visa-info.php Disallow: /*/serv-uchastie-info.php Disallow: /*/serv-catalogue-info.php Disallow: /*/serv-catalogs-info.php +Disallow: /expo-b/ Host: expomap.ru Sitemap: http://expomap.ru/sitemap.xml \ No newline at end of file diff --git a/templates/registration/acquire_email.html b/templates/registration/acquire_email.html index 17a0c5f0..2aac49a2 100644 --- a/templates/registration/acquire_email.html +++ b/templates/registration/acquire_email.html @@ -1,4 +1,4 @@ -{% extends "client/base_page.html" %} +{% extends "client/base_catalog.html" %} {% block title %}Email confirmation{% endblock %} diff --git a/templates/registration/social_registration_complete.html b/templates/registration/social_registration_complete.html index 755add9b..1f01c1c8 100644 --- a/templates/registration/social_registration_complete.html +++ b/templates/registration/social_registration_complete.html @@ -1,4 +1,4 @@ -{% extends "client/base_page.html" %} +{% extends "client/base_catalog.html" %} {% block title %}Registration complete{% endblock %}