diff --git a/accounts/edit_forms.py b/accounts/edit_forms.py index 8f484635..1c6e79e7 100644 --- a/accounts/edit_forms.py +++ b/accounts/edit_forms.py @@ -8,7 +8,7 @@ from company.models import Company class AvatarForm(forms.ModelForm): avatar = forms.ImageField(label=_(u'Выберите файл (GIF, JPG, PNG. Размер 100 × 100 пикселей)'), - required=False) + required=False, widget=forms.FileInput(attrs={'class': 'input'})) class Meta: model = Profile fields = ('avatar',) diff --git a/accounts/views.py b/accounts/views.py index f8d756bf..dd40c9d7 100644 --- a/accounts/views.py +++ b/accounts/views.py @@ -14,6 +14,8 @@ from models import User import json, datetime import calendar as python_calendar from django.views.generic import TemplateView, FormView, ListView +from sorl.thumbnail import get_thumbnail + class SettingsView(TemplateView): template_name = 'accounts/settings.html' @@ -240,10 +242,19 @@ class AvatarView(BaseProfileView): def form_valid(self, form): profile = self.request.user.profile + if not self.request.FILES: + response = {'success': False, 'message':'files is empty'} + return HttpResponse(json.dumps(response), content_type='application/json') form = self.form_class(self.request.POST, self.request.FILES, instance=profile) form.save() - response = {'success': True} - return HttpResponse(json.dumps(response), content_type='application/json') + if self.request.is_ajax(): + im = get_thumbnail(profile.avatar, '100x100', crop='center') + response = {'success': True, 'url': im.url} + #response = {'success': True} + + return HttpResponse(json.dumps(response), content_type='application/json') + else: + return HttpResponseRedirect('/profile/') class HomeView(BaseProfileView): @@ -300,7 +311,6 @@ def test(request): from exposition.models import Exposition - def get_user(url): try: url = int(url) @@ -354,5 +364,4 @@ class UserSeminarView(UserEventView): url = self.kwargs.get('url') user = get_user(url) self.obj = user - return user.seminar_users.all() - + return user.seminar_users.all() \ No newline at end of file diff --git a/city/admin.py b/city/admin.py index 75efe755..c09eec7c 100644 --- a/city/admin.py +++ b/city/admin.py @@ -6,12 +6,13 @@ from django.conf import settings from django.contrib.auth.decorators import login_required from django.contrib.contenttypes.models import ContentType #models and forms -from forms import CityForm, CityDeleteForm +from forms import CityForm, CityDeleteForm, CityFilterForm from models import City from file.models import FileModel from file.forms import FileModelForm #custom views from functions.custom_views import objects_list, add_object_with_file, delete_object +from functions.admin_views import AdminListView def city_all(request): @@ -104,4 +105,9 @@ def search_city(request): qs = City.objects.language().filter(country=country, translations__name__contains=term) result = [{'id': city.id, 'label': city.name} for city in qs] - return HttpResponse(json.dumps(result), content_type='application/json') \ No newline at end of file + return HttpResponse(json.dumps(result), content_type='application/json') + +class CityListView(AdminListView): + template_name = 'admin/city/city_list.html' + form_class = CityFilterForm + model = City \ No newline at end of file diff --git a/city/admin_urls.py b/city/admin_urls.py index 74f4f589..046f8ac6 100644 --- a/city/admin_urls.py +++ b/city/admin_urls.py @@ -1,11 +1,12 @@ # -*- coding: utf-8 -*- from django.conf.urls import patterns, url +from admin import CityListView urlpatterns = patterns('city.admin', url(r'^add/$', 'city_add'), url(r'^delete/(?P.*)/$', 'city_delete'), url(r'^change/(.*)/$', 'city_change'), - url(r'^all/$', 'city_all'), + url(r'^all/$', CityListView.as_view()), url(r'^search/$', 'search_city'), ) \ No newline at end of file diff --git a/city/forms.py b/city/forms.py index 3ba51a0b..b1d5fc9a 100644 --- a/city/forms.py +++ b/city/forms.py @@ -13,6 +13,7 @@ from directories.models import Iata from functions.translate import fill_with_signal from functions.form_check import is_positive_integer, translit_with_separator from functions.files import check_tmp_files +from functions.admin_forms import AdminFilterForm class CityForm(forms.Form): @@ -158,4 +159,8 @@ class CityDeleteForm(forms.ModelForm): class Meta: model = City - fields = ('url',) \ No newline at end of file + fields = ('url',) + + +class CityFilterForm(AdminFilterForm): + model = City \ No newline at end of file diff --git a/exposition/admin.py b/exposition/admin.py index 04cafb98..18a4cbc7 100644 --- a/exposition/admin.py +++ b/exposition/admin.py @@ -9,7 +9,7 @@ from django.contrib.contenttypes.models import ContentType from django.contrib.auth.decorators import login_required # models and forms from models import Exposition, TimeTable, Statistic, TmpTimeTable -from forms import ExpositionCreateForm, ExpositionDeleteForm, TimeTableForm, StatisticForm +from forms import ExpositionCreateForm, ExpositionDeleteForm, TimeTableForm, StatisticForm, ExpositionFilterForm from theme.models import Tag from city.models import City from file.models import FileModel, TmpFile @@ -19,6 +19,7 @@ import random # custom views from functions.custom_views import objects_list, delete_object from functions.views_help import get_referer +from functions.admin_views import AdminListView def exposition_all(request): @@ -229,4 +230,9 @@ def exposition_change(request, url): object_id=getattr(exposition, 'id')) args['obj_id'] = getattr(exposition, 'id') - return render_to_response('exposition_add.html', args) \ No newline at end of file + return render_to_response('exposition_add.html', args) + +class ExpositionListView(AdminListView): + template_name = 'admin/exposition/exposition_list.html' + form_class = ExpositionFilterForm + model = Exposition \ No newline at end of file diff --git a/exposition/admin_urls.py b/exposition/admin_urls.py index 20cf1d45..e34e9b1b 100644 --- a/exposition/admin_urls.py +++ b/exposition/admin_urls.py @@ -1,11 +1,12 @@ # -*- coding: utf-8 -*- from django.conf.urls import patterns, include, url +from admin import ExpositionListView urlpatterns = patterns('exposition.admin', url(r'^add.*/$', 'exposition_add'), url(r'^delete/(?P.*)/$', 'exposition_delete'), url(r'^change/(?P.*)/$', 'exposition_change'), - url(r'^all/$', 'exposition_all'), + url(r'^all/$', ExpositionListView.as_view()), url(r'^switch/(?P.*)/(?P.*)$', 'exposition_switch'), url(r'^copy/(?P.*)$', 'exposition_copy'), ) diff --git a/exposition/forms.py b/exposition/forms.py index 2f5becb7..4b678cc9 100644 --- a/exposition/forms.py +++ b/exposition/forms.py @@ -22,6 +22,7 @@ from functions.form_check import is_positive_integer from functions.files import check_tmp_files from functions.form_check import translit_with_separator from settings.settings import date_formats +from functions.admin_forms import AdminFilterForm class ExpositionCreateForm(forms.Form): @@ -479,4 +480,8 @@ class TimeTableForm(forms.Form): else: fill_with_signal(TimeTable, timetable, data) - return timetable \ No newline at end of file + return timetable + + +class ExpositionFilterForm(AdminFilterForm): + model = Exposition \ No newline at end of file diff --git a/functions/admin_forms.py b/functions/admin_forms.py index bb232bf5..83878772 100644 --- a/functions/admin_forms.py +++ b/functions/admin_forms.py @@ -1,5 +1,7 @@ +# -*- coding: utf-8 -*- from django import forms from django.conf import settings +from django.utils.translation import ugettext_lazy as _ class AdminForm(forms.Form): @@ -14,3 +16,27 @@ class AdminForm(forms.Form): # uses enumerate for detect iteration number # first iteration is a default lang so it required fields required = True if lid == 0 else False + + +class AdminFilterForm(forms.Form): + """ + class for filtering lists in admin panel + """ + model = None # which models work with + name = forms.CharField(label=_(u'Имя'), required=False) + + def filter(self): + """ + + return filtered queryset + form must be cleaned before calling this method + + """ + data = self.cleaned_data + name = data['name'] + model = self.model + qs = model.objects.all() + if name: + qs = qs.filter(translations__name__contains=name) + + return qs \ No newline at end of file diff --git a/functions/admin_views.py b/functions/admin_views.py index 46287b9f..14478e1c 100644 --- a/functions/admin_views.py +++ b/functions/admin_views.py @@ -1,4 +1,4 @@ -from django.views.generic import FormView +from django.views.generic import FormView, ListView from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponseRedirect from django.conf import settings @@ -59,4 +59,86 @@ class AdminView(FormView): return form_class(data) else: return form_class() - """ \ No newline at end of file + """ + + +from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger +def paginate_results(qs, page=None): + paginator = Paginator(qs, settings.ADMIN_PAGINATION) + + try: + result = paginator.page(page) + except PageNotAnInteger: + # If page is not an integer, deliver first page. + result = paginator.page(1) + except EmptyPage: + # If page is out of range (e.g. 9999), deliver last page of results. + result = paginator.page(paginator.num_pages) + + return result + + +class AdminListView(FormView): + def get_form(self, form_class): + + if self.request.GET: + return form_class(self.request.GET) + else: + return form_class(**self.get_form_kwargs()) + + def get(self, request, *args, **kwargs): + + if request.GET: + form_class = self.get_form_class() + form = self.get_form(form_class) + if form.is_valid(): + return self.form_valid(form) + else: + return self.form_invalid(form) + else: + return super(AdminListView, self).get(request, *args, **kwargs) + + def form_valid(self, form): + """ + + filtering queryset and return paginated results + + """ + + qs = form.filter() + result = paginate_results(qs, page=self.request.GET.get('page')) + context = self.get_context_data(form=form) + context.update({'object_list': result}) + return self.render_to_response(context) + + def get_context_data(self, **kwargs): + context = super(AdminListView, self).get_context_data(**kwargs) + qs = self.model.objects.all() + result = paginate_results(qs, page=self.request.GET.get('page')) + context['object_list'] = result + return context + + +""" +class AdminListView(ListView): + model = None + paginate_by = settings.ADMIN_PAGINATION + template_name = None + filter_form = None + + def get_queryset(self): + + if self.filter_form is None: + return super(AdminListView, self).get_queryset() + else: + form = self.filter_form(self.request.GET) + if form.is_valid(): + result = form.filter() + return result + else: + return super(AdminListView, self).get_queryset() + + def get_context_data(self, **kwargs): + context = super(AdminListView, self).get_context_data(self, **kwargs) + context = +""" \ No newline at end of file diff --git a/photologue/client_urls.py b/photologue/client_urls.py index 9459fe8e..df707602 100644 --- a/photologue/client_urls.py +++ b/photologue/client_urls.py @@ -3,7 +3,9 @@ from django.conf.urls import patterns, url from client_view import GalleryView, PhotoView urlpatterns = patterns('', - url(r'gallery/(?P.*)$', GalleryView.as_view()), - url(r'photo/(?P.*)$', PhotoView.as_view()), + #url(r'gallery/(?P.*)$', GalleryView.as_view()), + #url(r'photo/(?P.*)$', PhotoView.as_view()), + url(r'^show/photo/$', 'photologue.client_view.ajax_photo'), + ) diff --git a/photologue/client_view.py b/photologue/client_view.py index cced3417..9dc43dd7 100644 --- a/photologue/client_view.py +++ b/photologue/client_view.py @@ -1,7 +1,9 @@ import warnings +import json from django.conf import settings from django.views.generic import DetailView, ListView from photologue.models import Gallery, Photo +from django.shortcuts import get_object_or_404, HttpResponse # Number of galleries to display per page. @@ -29,3 +31,16 @@ class PhotoView(DetailView): slug_field = 'slug' template_name = 'client/photoreport/photo.html' + +def ajax_photo(request): + if request.GET: + id = request.GET.get('id') + photo = get_object_or_404(Photo, pk=id) + + response = {'title': photo.caption, 'text': photo.title, 'url':photo.get_display_url()} + + return HttpResponse(json.dumps(response), content_type='application/json') + else: + return HttpResponse('123') + + diff --git a/place_exposition/admin.py b/place_exposition/admin.py index b9232e85..ee181dc6 100644 --- a/place_exposition/admin.py +++ b/place_exposition/admin.py @@ -10,7 +10,7 @@ from django.contrib.auth.decorators import login_required from django.forms.formsets import BaseFormSet, formset_factory from django.forms.models import modelformset_factory #models and forms -from forms import ExpositionForm, PlaceExpositionFormDelete, HallForm +from forms import ExpositionForm, PlaceExpositionFormDelete, HallForm, PlaceExpositionFilter from models import PlaceExposition, Hall from city.models import City from file.models import FileModel, TmpFile @@ -192,7 +192,7 @@ def exposition_change(request, url): #test---------------------- -from functions.admin_views import AdminView +from functions.admin_views import AdminView, AdminListView class PlaceExpositionView(AdminView): @@ -257,3 +257,7 @@ class PlaceExpositionView(AdminView): return context +class PlaceExpositionListView(AdminListView): + template_name = 'admin/place_exposition/place_exposition_list.html' + form_class = PlaceExpositionFilter + model = PlaceExposition \ No newline at end of file diff --git a/place_exposition/admin_urls.py b/place_exposition/admin_urls.py index 3a3c4b6e..bee782e0 100644 --- a/place_exposition/admin_urls.py +++ b/place_exposition/admin_urls.py @@ -1,13 +1,15 @@ # -*- coding: utf-8 -*- from django.conf.urls import patterns, include, url -from admin import PlaceExpositionView +from admin import PlaceExpositionView, PlaceExpositionListView urlpatterns = patterns('place_exposition.admin', - url(r'^all/$', 'exposition_all'), + #url(r'^all/$', 'exposition_all'), + url(r'^all/$', PlaceExpositionListView.as_view()), url(r'^add.*/$', 'exposition_add'), url(r'^delete/(?P.*)/$', 'exposition_delete'), url(r'^change/(?P.*)/$', 'exposition_change'), url(r'^copy/(?P.*)/$', 'place_exposition_copy'), + url(r'^$', PlaceExpositionView.as_view()), url(r'^(?P.*)/$', PlaceExpositionView.as_view()), diff --git a/place_exposition/forms.py b/place_exposition/forms.py index 27f6300a..f4c8dc1c 100644 --- a/place_exposition/forms.py +++ b/place_exposition/forms.py @@ -293,5 +293,23 @@ class HallForm(forms.ModelForm): capacity = cleaned_data.get('capacity').strip() return is_positive_integer(capacity, 'Вместимость должна состоять из цифр') -class TestForm(forms.Form): - pass + + +from functions.admin_forms import AdminFilterForm +from django.utils.translation import ugettext_lazy as _ + +class PlaceExpositionFilter(AdminFilterForm): + + country = forms.MultipleChoiceField(choices=[(item.id, item.name) for item in list(Country.objects.all())], + required=False, widget=forms.SelectMultiple()) + model = PlaceExposition + + def filter(self): + qs = super(PlaceExpositionFilter, self).filter() + data = self.cleaned_data + country = data['country'] + + if country: + qs = qs.filter(country_id__in=country) + + return qs \ No newline at end of file diff --git a/settings/templatetags/template_filters.py b/settings/templatetags/template_filters.py index 89f83c9a..e87345da 100644 --- a/settings/templatetags/template_filters.py +++ b/settings/templatetags/template_filters.py @@ -14,6 +14,15 @@ from photoreport.models import Photoreport register = template.Library() +@register.filter +def delete_get_key(request, key=None): + get = request.GET.copy() + + if key in get: + del get[key] + + return get.urlencode() + @register.filter def get_item(dictionary, key): return dictionary.get(key) diff --git a/templates/admin/accounts/user_list.html b/templates/admin/accounts/user_list.html new file mode 100644 index 00000000..0ea0567e --- /dev/null +++ b/templates/admin/accounts/user_list.html @@ -0,0 +1,69 @@ +{% extends 'admin_list.html' %} + +{% block body %} + +
+
+

Фильтры

+
+
+
+ {{ form }} + + +
+
+ +
+
+
+

Список пользователей

+
+
+ + + + + + + + + + + + + {% for item in object_list %} + + + + + + {% if item.is_admin %} + + {% else %} + + {% endif %} + + {% if item.is_translator %} + + {% else %} + + {% endif %} + + + + {% endfor %} + +
idEmailПолное имяАдминПереводчик 
{{ item.id }}{{ item.email }}{{ item.get_full_name }}Да Да  + + Изменить + +
+ +
+ {# pagination #} + {% include 'admin/includes/admin_pagination.html' with page_obj=object_list %} + +
+ +{% endblock %} \ No newline at end of file diff --git a/templates/admin/admin_list.html b/templates/admin/admin_list.html new file mode 100644 index 00000000..2abcf000 --- /dev/null +++ b/templates/admin/admin_list.html @@ -0,0 +1,10 @@ +{% extends 'base.html' %} +{% load static %} + +{% block scripts %} + {# selects #} + + + + +{% endblock %} \ No newline at end of file diff --git a/templates/admin/city/city_list.html b/templates/admin/city/city_list.html new file mode 100644 index 00000000..5bc2e619 --- /dev/null +++ b/templates/admin/city/city_list.html @@ -0,0 +1,56 @@ +{% extends 'admin_list.html' %} + +{% block body %} + +
+
+

Фильтры

+
+
+
+ {{ form }} + + +
+
+ +
+ +
+
+

Список городов

+
+
+ + + + + + + + + + {% for item in object_list %} + + + + + + {% endfor %} + +
ГородСтрана 
{{ item.name }}{% ifnotequal item.country.name None %}{{ item.country }} {% endifnotequal %} + + Изменить + + + Удалить + +
+ Добавить город +
+ + {% include 'admin/includes/admin_pagination.html' with page_obj=object_list %} + +
+ +{% endblock %} \ No newline at end of file diff --git a/templates/admin/company/company_list.html b/templates/admin/company/company_list.html new file mode 100644 index 00000000..5953eb4c --- /dev/null +++ b/templates/admin/company/company_list.html @@ -0,0 +1,62 @@ +{% extends 'admin_list.html' %} + +{% block body %} + +
+
+

Фильтры

+
+
+
+ {{ form }} + + +
+
+ +
+
+
+

Список компаний

+
+
+ + + + + + + + + + + + {% for item in object_list %} + + + + + + + {% endfor %} + +
idКомпания 
{{ item.id }}{{ item.name }} + + Изменить + + + + Удалить + +
+ Добавить компанию + + +
+ +{# pagination #} + {% include 'admin/includes/admin_pagination.html' with page_obj=object_list %} +
+ + +{% endblock %} \ No newline at end of file diff --git a/templates/admin/conference/conference_list.html b/templates/admin/conference/conference_list.html new file mode 100644 index 00000000..04a3f2d6 --- /dev/null +++ b/templates/admin/conference/conference_list.html @@ -0,0 +1,86 @@ +{% extends 'admin_list.html' %} + +{% load static %} +{% block scripts %} + + + +{% endblock %} + +{% block body %} + +
+
+

Фильтры

+
+
+
+ {{ form }} + + +
+
+ +
+ +
+
+

Список конференций

+
+
+ + + + + + + + + + + {% for item in object_list %} + + + + + + + + + + + + + + + + {% endfor %} + +
НазваниеДата начала 
{{ item.name }}{{ item.data_begin }} + + Отключить + + + Включить + + + + Изменить + + + + Копировать + + + + Удалить + +
+ Добавить конференцию +
+ {# pagination #} + {% include 'admin/includes/admin_pagination.html' with page_obj=object_list %} +
+{% endblock %} \ No newline at end of file diff --git a/templates/admin/country/contry_list.html b/templates/admin/country/contry_list.html new file mode 100644 index 00000000..1f920ce7 --- /dev/null +++ b/templates/admin/country/contry_list.html @@ -0,0 +1,57 @@ +{% extends 'admin_list.html' %} + +{% block body %} + +
+
+

Фильтры

+
+
+
+ {{ form }} + + +
+
+ +
+ +
+
+

Список стран

+
+
+ + + + + + + + + + + {% for item in object_list %} + + + + + + + + {% endfor %} + +
idСтранаСтолица 
{{ item.id }}{{ item.name }}{% ifnotequal item.capital None %}{{ item.capital }} {% endifnotequal %} + + Изменить + + + Удалить + +
+ Добавить страну + +
+{% include 'admin/includes/admin_pagination.html' with page_obj=object_list %} +
+{% endblock %} \ No newline at end of file diff --git a/templates/admin/exposition/exposition_list.html b/templates/admin/exposition/exposition_list.html new file mode 100644 index 00000000..0e6169b8 --- /dev/null +++ b/templates/admin/exposition/exposition_list.html @@ -0,0 +1,81 @@ +{% extends 'admin_list.html' %} + +{% block styles %} + +td a{ + float:left; + margin: 0 10px 10px 0 +} + + +{% endblock %} + + + +{% block body %} + +
+
+

Фильтры

+
+
+
+ {{ form }} + + +
+
+ +
+
+
+

Список выставок

+
+
+ + + + + + + + + + + {% for item in object_list %} + + + + + + + + + + {% endfor %} + +
НазваниеДата начала 
{{ item.name }}{{ item.data_begin }} + + Отключить + + + Включить + + + Изменить + + + Копировать + + + Удалить + +
+ Добавить выставку +
+ {# pagination #} + {% include 'admin/includes/admin_pagination.html' with page_obj=object_list %} +
+{% endblock %} \ No newline at end of file diff --git a/templates/admin/includes/admin_pagination.html b/templates/admin/includes/admin_pagination.html index 91daa80d..5b42da9e 100644 --- a/templates/admin/includes/admin_pagination.html +++ b/templates/admin/includes/admin_pagination.html @@ -1,4 +1,4 @@ - +{% comment %} \ No newline at end of file + +{% endcomment %} +{% load template_filters %} + +{% if page_obj.paginator.num_pages > 1 %} +
+ +
+{% endif %} \ No newline at end of file diff --git a/templates/admin/organiser/organiser_list.html b/templates/admin/organiser/organiser_list.html new file mode 100644 index 00000000..5e2a5544 --- /dev/null +++ b/templates/admin/organiser/organiser_list.html @@ -0,0 +1,58 @@ +{% extends 'admin_list.html' %} + +{% block body %} + +
+
+

Фильтры

+
+
+
+ {{ form }} + + +
+
+ +
+ +
+
+

Список организаторов

+
+
+ + + + + + + + + + + {% for item in object_list %} + + + + + + {% endfor %} + +
idОрганизатор 
{{ item.id }}{{ item.name }} + + Изменить + + + + Удалить + +
+ Добавить организатора +
+ {# pagination #} + {% include 'admin/includes/admin_pagination.html' with page_obj=object_list %} + +
+ +{% endblock %} \ No newline at end of file diff --git a/templates/admin/place_conference/place_conference_all.html b/templates/admin/place_conference/place_conference_all.html index 6c71e2e2..19030ef9 100644 --- a/templates/admin/place_conference/place_conference_all.html +++ b/templates/admin/place_conference/place_conference_all.html @@ -2,7 +2,7 @@ {% block body %} -
+

Места проведения конференций

diff --git a/templates/admin/place_conference/place_conference_list.html b/templates/admin/place_conference/place_conference_list.html new file mode 100644 index 00000000..cd9c6233 --- /dev/null +++ b/templates/admin/place_conference/place_conference_list.html @@ -0,0 +1,65 @@ +{% extends 'admin_list.html' %} + +{% block body %} + +
+
+

Фильтры

+
+
+
+ {{ form }} + + +
+
+ +
+ +
+
+

Места проведения конференций

+
+
+ + + + + + + + + + + + {% for item in object_list %} + + + + + + + + + {% endfor %} + +
НазваниеСтранаГород 
{{ item.name }}{% ifnotequal item.country None %}{{ item.country }} {% endifnotequal %}{% ifnotequal item.city None %}{{ item.city }} {% endifnotequal %} + + Изменить + + + + Копировать + + + + Удалить + +
+ Добавить конферец зал +
+ {# pagination #} + {% include 'admin/includes/admin_pagination.html' with page_obj=object_list %} +
+ +{% endblock %} \ No newline at end of file diff --git a/templates/admin/place_exposition/place_exposition_list.html b/templates/admin/place_exposition/place_exposition_list.html new file mode 100644 index 00000000..de9e0847 --- /dev/null +++ b/templates/admin/place_exposition/place_exposition_list.html @@ -0,0 +1,66 @@ +{% extends 'admin_list.html' %} + +{% block body %} + +
+
+

Фильтры

+
+
+
+ {{ form }} + + +
+
+ +
+ +
+
+

Места проведения выставок

+
+
+ + + + + + + + + + + {% for item in object_list %} + + + + + + + + + + {% endfor %} + +
НазваниеСтранаГород 
{{ item.name }}{% ifnotequal item.country None %}{{ item.country }} {% endifnotequal %}{% ifnotequal item.city None %}{{ item.city }} {% endifnotequal %} + + Изменить + + + + Копировать + + + + Удалить + +
+ Добавить выставочный центр +
+ {# pagination #} + {% include 'admin/includes/admin_pagination.html' with page_obj=object_list %} + +
+ +{% endblock %} \ No newline at end of file diff --git a/templates/admin/seminar/seminar_list.html b/templates/admin/seminar/seminar_list.html new file mode 100644 index 00000000..0335fda9 --- /dev/null +++ b/templates/admin/seminar/seminar_list.html @@ -0,0 +1,87 @@ +{% extends 'admin_list.html' %} + +{% load static %} +{% block scripts %} + + + +{% endblock %} + +{% block body %} + +
+
+

Фильтры

+
+
+
+ {{ form }} + + +
+
+ +
+ +
+
+

Список семинаров

+
+
+ + + + + + + + + + + {% for item in object_list %} + + + + + + + + + + + + + + + + {% endfor %} + +
НазваниеДата начала 
{{ item.name }}{{ item.data_begin }} + + Отключить + + + Включить + + + + Изменить + + + + Удалить + + + + Удалить + +
+ Добавить семинар +
+ {# pagination #} + {% include 'admin/includes/admin_pagination.html' with page_obj=object_list %} +
+ +{% endblock %} \ No newline at end of file diff --git a/templates/admin/theme/tag_list.html b/templates/admin/theme/tag_list.html new file mode 100644 index 00000000..45c0963d --- /dev/null +++ b/templates/admin/theme/tag_list.html @@ -0,0 +1,70 @@ +{% extends 'admin_list.html' %} + +{% block body %} + +
+
+

Фильтры

+
+
+
+ {{ form }} + + +
+
+ +
+ +
+
+

Список тегов

+
+
+ + + + + + + + + + + + {% for item in object_list %} + + + + + + + + + + + + + + + {% endfor %} + +
idНазваниеТема 
{{ item.id }}{{ item.name }}{{ item.theme }} + + Изменить + + + + Копировать + + + + Удалить + +
+ Добавить тег +
+ {# pagination #} + {% include 'admin/includes/admin_pagination.html' with page_obj=object_list %} +
+{% endblock %} \ No newline at end of file diff --git a/templates/admin/theme/theme_list.html b/templates/admin/theme/theme_list.html new file mode 100644 index 00000000..1e5cdb1e --- /dev/null +++ b/templates/admin/theme/theme_list.html @@ -0,0 +1,66 @@ +{% extends 'admin_list.html' %} + +{% block body %} + +
+
+

Фильтры

+
+
+
+ {{ form }} + + +
+
+ +
+ +
+
+

Список тем

+
+
+ + + + + + + + + + {% for item in object_list %} + + + + + + + + + + + + + {% endfor %} + +
idНазвание 
{{ item.id }}{{ item.name }} + + Изменить + + + + Копировать + + + + Удалить + +
+ Добавить тематику +
+ {# pagination #} + {% include 'admin/includes/admin_pagination.html' with page_obj=object_list %} +
+{% endblock %} \ No newline at end of file diff --git a/templates/admin/translator/translator_list.html b/templates/admin/translator/translator_list.html new file mode 100644 index 00000000..d64ec743 --- /dev/null +++ b/templates/admin/translator/translator_list.html @@ -0,0 +1,64 @@ +{% extends 'admin_list.html' %} + +{% block body %} + +
+
+

Фильтры

+
+
+
+ {{ form }} + + +
+
+ +
+ +
+
+

Список переводчиков

+
+
+ + + + + + + + + + + + {% for item in object_list %} + + + + {% for u in item.user.all %} + + + {% endfor %} + + + + + + {% endfor %} + +
idПользовательСтрана 
{{ item.id }}{{ u }}{{ u.country }} + + Изменить + + + + Удалить + +
+ Добавить перводчика +
+ {# pagination #} + {% include 'admin/includes/admin_pagination.html' with page_obj=object_list %} +
+{% endblock %} \ No newline at end of file diff --git a/templates/admin/webinar/webinar_list.html b/templates/admin/webinar/webinar_list.html new file mode 100644 index 00000000..ca791a53 --- /dev/null +++ b/templates/admin/webinar/webinar_list.html @@ -0,0 +1,89 @@ +{% extends 'admin_list.html' %} + +{% load static %} + +{% block scripts %} + + + +{% endblock %} + +{% block body %} + +
+
+

Фильтры

+
+
+
+ {{ form }} + + +
+
+ +
+ +
+ +
+

Список вебинаров

+
+
+ + + + + + + + + + + {% for item in object_list %} + + + + + + + + + + + + + + + + {% endfor %} + +
НазваниеДата 
{{ item.name }}{{ item.data_begin }} + + Отключить + + + Включить + + + + Изменить + + + + Копировать + + + + Удалить + +
+ Добавить вебинар +
+ {# pagination #} + {% include 'admin/includes/admin_pagination.html' with page_obj=object_list %} +
+ +{% endblock %} \ No newline at end of file diff --git a/templates/client/accounts/fill_company.html b/templates/client/accounts/fill_company.html index 23ee65d0..8d0d35c9 100644 --- a/templates/client/accounts/fill_company.html +++ b/templates/client/accounts/fill_company.html @@ -1,609 +1,609 @@ -{% extends 'base_catalog.html' %} -{% load static %} -{% load i18n %} -{% load template_filters %} - -{% block style %} - - -{% endblock %} - -{% block bread_scrumbs %} - -{% endblock %} - -{% block page_title %} -{% endblock %} - -{% block content_list %} -
-
- - - -
-
- - - -
- {{ name_form.name.value }} - -
- редактировать -
-
{% csrf_token %} - -
- -
- -
- {{ name_form.name }} -
-
- -
- -
- -
-
- - закрыть -
-
-
-
- - - - -
- {% for th in request.user.company.theme.all %} - {{ th.name }}{% ifnotequal forloop.counter request.user.company.theme.all|length %},{% endifnotequal %} - {% endfor %} -
- -
- - - - -
- - - -
- -
- -
-
- редактировать профиль - завершить редактирование - -
Добавить профили в соц.сетях:
- - - -
- - -
- -
- -
-
Дополнительная информация
- - - - - - - -
- -
-
-
- -{% endblock %} - - -{% block pre_scripts %} - - -{% endblock %} - -{% block scripts %} - - - - - - - - -{% endblock %} +{% extends 'base_catalog.html' %} +{% load static %} +{% load i18n %} +{% load template_filters %} + +{% block style %} + + +{% endblock %} + +{% block bread_scrumbs %} + +{% endblock %} + +{% block page_title %} +{% endblock %} + +{% block content_list %} +
+
+ + + +
+
+ + + +
+ {{ name_form.name.value }} + +
+ редактировать +
+
{% csrf_token %} + +
+ +
+ +
+ {{ name_form.name }} +
+
+ +
+ +
+ +
+
+ + закрыть +
+
+
+
+ + + + +
+ {% for th in request.user.company.theme.all %} + {{ th.name }}{% ifnotequal forloop.counter request.user.company.theme.all|length %},{% endifnotequal %} + {% endfor %} +
+ +
+ + + + +
+ + + +
+ +
+ +
+
+ редактировать профиль + завершить редактирование + +
Добавить профили в соц.сетях:
+ + + +
+ + +
+ +
+ +
+
Дополнительная информация
+ + + + + + + +
+ +
+
+
+ +{% endblock %} + + +{% block pre_scripts %} + + +{% endblock %} + +{% block scripts %} + + + + + + + + +{% endblock %} diff --git a/templates/client/accounts/new_profile.html b/templates/client/accounts/new_profile.html index d2feb9ef..827e1537 100644 --- a/templates/client/accounts/new_profile.html +++ b/templates/client/accounts/new_profile.html @@ -1,480 +1,496 @@ -{% extends 'base_catalog.html' %} -{% load static %} -{% load i18n %} -{% load template_filters %} - -{% block style %} - - - {% if not company_form %} - - {% endif %} -{% endblock %} - - -{% block bread_scrumbs %} - -{% endblock %} - -{% block page_title %} - -{% endblock %} - -{% block content_list %} -
-
- - -
-
- - - - -
- - {{ name_form.get_full_name }} - - -
- {% trans 'редактировать' %} -
-
{% csrf_token %} - -
- -
- -
- {{ name_form.first_name }} -
-
-
- -
- {{ name_form.last_name }} -
-
- -
- -
- -
-
- - {% trans 'закрыть' %} -
-
-
-
- {# position #} - - -
-
-
- редактировать профиль - завершить редактирование - -
Добавить профили в соц.сетях:
- - - -
- - -
- -
-
- {% if about_form.about.value %} -
{% trans 'О себе:' %}
- {% endif %} - - - -
-
- -
-
-{% endblock %} -{% block popup %} -{% if company_form %} - {% include 'popups/create_company.html' with form=company_form %} -{% endif %} -{% endblock %} - -{% block pre_scripts %} - - -{% endblock %} - -{% block scripts %} - - - - - - - -{% endblock %} +{% extends 'base_catalog.html' %} +{% load static %} +{% load i18n %} +{% load template_filters %} +{% load thumbnail %} + +{% block style %} + + + {% if not company_form %} + + {% endif %} +{% endblock %} + + +{% block bread_scrumbs %} + +{% endblock %} + +{% block page_title %} + +{% endblock %} + +{% block content_list %} +
+
+ + +
+
+ + + + +
+ + {{ name_form.get_full_name }} + + +
+ {% trans 'редактировать' %} +
+
{% csrf_token %} + +
+ +
+ +
+ {{ name_form.first_name }} +
+
+
+ +
+ {{ name_form.last_name }} +
+
+ +
+ +
+ +
+
+ + {% trans 'закрыть' %} +
+
+
+
+ {# position #} + + +
+
+
+ редактировать профиль + завершить редактирование + +
Добавить профили в соц.сетях:
+ + + +
+ + +
+ +
+
+ {% if about_form.about.value %} +
{% trans 'О себе:' %}
+ {% endif %} + + + +
+
+ +
+
+{% endblock %} +{% block popup %} +{% if company_form %} + {% include 'popups/create_company.html' with form=company_form %} +{% endif %} +{% endblock %} + +{% block pre_scripts %} + + +{% endblock %} + +{% block scripts %} + + + + + + + +{% endblock %} diff --git a/templates/client/accounts/profile.html b/templates/client/accounts/profile.html index 4b45d36b..994b9255 100644 --- a/templates/client/accounts/profile.html +++ b/templates/client/accounts/profile.html @@ -1,464 +1,464 @@ -{% extends 'base_catalog.html' %} -{% load static %} -{% load i18n %} -{% load template_filters %} - - -{% block bread_scrumbs %} - -{% endblock %} - -{% block page_title %} -
-

{% trans 'Личный кабинет' %}

-
-{% endblock %} - -{% block content_list %} -
-
- - {# avatar #} - - {# END avatar #} -
-
- {# country and city #} -
- {% if home_form.instance.country %} - - {% else %} - - {% endif %} - {{ home_form.instance.country }} - - - {% if home_form.instance.city %} - - {% else %} - - {% endif %} - , {{ home_form.instance.city }} - - -
- {% trans 'редактировать' %} -
-
{% csrf_token %} -
- -
- -
- {{ home_form.country }} - -
-
- -
- -
- -
-
- -
- -
- -
-
- {% trans 'закрыть' %} -
-
-
- {# END country and city #} - - {# name #} -
- {{ name_form.get_full_name }} -
- {% trans 'редактировать' %} -
-
{% csrf_token %} - -
- -
- -
- {{ name_form.first_name }} -
-
-
- -
- {{ name_form.last_name }} -
-
- -
- -
- -
-
- - {% trans 'закрыть' %} -
-
-
- {# END name #} -
- - {# position #} -
-

- {{ work_form.position.value }} - {% if work_form.work.value %} - {% trans 'в' %} {{ work_form.work.value }} - {% endif %} -

- -
- {% trans 'редактировать' %} -
-
{% csrf_token %} - -
- -
- -
- {{ work_form.position }} -
-
- -
- -
- {{ work_form.work }} -
-
- -
- -
- -
-
- - {% trans 'закрыть' %} -
-
-
- {# END position #} - - - {# description #} -
-

{{ about_company_form.about_company.value }}

-
- {% trans 'редактировать' %} -
-
{% csrf_token %} - -
- -
- -
- {{ about_company_form.about_company }} -
-
- -
- -
- -
-
- - {% trans 'закрыть' %} -
-
-
- {# END description #} -
- -
-
- {% trans 'редактировать профиль' %} - {% trans 'завершить редактирование' %} -
- -
- {% trans 'редактировать' %} -
-
{% csrf_token %} - -
- -
- -
- {{ social_form.facebook }} -
-
- -
- -
- {{ social_form.linkedin }} -
-
- -
- -
- {{ social_form.vk }} -
-
- -
- -
- {{ social_form.twitter }} -
-
- -
- -
- -
-
- - {% trans 'закрыть' %} -
-
-
-
- {# contacts #} - -
- -
- {# about #} -
-
{% trans 'О себе:' %}
- -
-

{{ about_form.about.value }}

- -
- {% trans 'редактировать' %} -
-
{% csrf_token %} - -
- -
- -
- {{ about_form.about }} -
-
- -
- -
- -
-
- - {% trans 'закрыть' %} -
-
-
-
- {# END about #} - -
-
-
-{% endblock %} -{% block scripts %} - - +{% extends 'base_catalog.html' %} +{% load static %} +{% load i18n %} +{% load template_filters %} + + +{% block bread_scrumbs %} + +{% endblock %} + +{% block page_title %} +
+

{% trans 'Личный кабинет' %}

+
+{% endblock %} + +{% block content_list %} +
+
+ + {# avatar #} + + {# END avatar #} +
+
+ {# country and city #} +
+ {% if home_form.instance.country %} + + {% else %} + + {% endif %} + {{ home_form.instance.country }} + + + {% if home_form.instance.city %} + + {% else %} + + {% endif %} + , {{ home_form.instance.city }} + + +
+ {% trans 'редактировать' %} +
+
{% csrf_token %} +
+ +
+ +
+ {{ home_form.country }} + +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ {% trans 'закрыть' %} +
+
+
+ {# END country and city #} + + {# name #} +
+ {{ name_form.get_full_name }} +
+ {% trans 'редактировать' %} +
+
{% csrf_token %} + +
+ +
+ +
+ {{ name_form.first_name }} +
+
+
+ +
+ {{ name_form.last_name }} +
+
+ +
+ +
+ +
+
+ + {% trans 'закрыть' %} +
+
+
+ {# END name #} +
+ + {# position #} +
+

+ {{ work_form.position.value }} + {% if work_form.work.value %} + {% trans 'в' %} {{ work_form.work.value }} + {% endif %} +

+ +
+ {% trans 'редактировать' %} +
+
{% csrf_token %} + +
+ +
+ +
+ {{ work_form.position }} +
+
+ +
+ +
+ {{ work_form.work }} +
+
+ +
+ +
+ +
+
+ + {% trans 'закрыть' %} +
+
+
+ {# END position #} + + + {# description #} +
+

{{ about_company_form.about_company.value }}

+
+ {% trans 'редактировать' %} +
+
{% csrf_token %} + +
+ +
+ +
+ {{ about_company_form.about_company }} +
+
+ +
+ +
+ +
+
+ + {% trans 'закрыть' %} +
+
+
+ {# END description #} +
+ +
+
+ {% trans 'редактировать профиль' %} + {% trans 'завершить редактирование' %} +
+ +
+ {% trans 'редактировать' %} +
+
{% csrf_token %} + +
+ +
+ +
+ {{ social_form.facebook }} +
+
+ +
+ +
+ {{ social_form.linkedin }} +
+
+ +
+ +
+ {{ social_form.vk }} +
+
+ +
+ +
+ {{ social_form.twitter }} +
+
+ +
+ +
+ +
+
+ + {% trans 'закрыть' %} +
+
+
+
+ {# contacts #} + +
+ +
+ {# about #} +
+
{% trans 'О себе:' %}
+ +
+

{{ about_form.about.value }}

+ +
+ {% trans 'редактировать' %} +
+
{% csrf_token %} + +
+ +
+ +
+ {{ about_form.about }} +
+
+ +
+ +
+ +
+
+ + {% trans 'закрыть' %} +
+
+
+
+ {# END about #} + +
+
+
+{% endblock %} +{% block scripts %} + + {% endblock %} \ No newline at end of file diff --git a/templates/client/blank.html b/templates/client/blank.html index 58b234d8..b3a839b5 100644 --- a/templates/client/blank.html +++ b/templates/client/blank.html @@ -167,6 +167,7 @@ This template include basic anf main styles and js files, {% endif %} {% endif %} + diff --git a/templates/client/includes/catalog_search.html b/templates/client/includes/catalog_search.html index 2be6dae1..1b70f4cc 100644 --- a/templates/client/includes/catalog_search.html +++ b/templates/client/includes/catalog_search.html @@ -1,56 +1,56 @@ -{% load static %} -{% load i18n %} - -
-
-
{% if type %}{{ type }}{% else %}{% trans 'поиск событий' %}{% endif %}
-
-
-
-
- -
{{ search_form.q }}
-
-
-
-
- -
{{ search_form.w }}
-
-
-
- -
-
-
- {% ifnotequal type 'places search' %} -
{% trans 'Тематика: ' %} - {{ search_form.get_themes_display }} -
- {% endifnotequal %} - -
{% trans 'Место: ' %} - - {{ search_form.get_places_display }} -
- - {% ifnotequal type 'places search' %} - - {% endifnotequal %} -
-
-
-
+{% load static %} +{% load i18n %} + +
+
+
{% if type %}{{ type }}{% else %}{% trans 'поиск событий' %}{% endif %}
+
+
+
+
+ +
{{ search_form.q }}
+
+
+
+
+ +
{{ search_form.w }}
+
+
+
+ +
+
+
+ {% ifnotequal type 'places search' %} +
{% trans 'Тематика: ' %} + {{ search_form.get_themes_display }} +
+ {% endifnotequal %} + +
{% trans 'Место: ' %} + + {{ search_form.get_places_display }} +
+ + {% ifnotequal type 'places search' %} + + {% endifnotequal %} +
+
+
+
diff --git a/templates/client/includes/place/place_list.html b/templates/client/includes/place/place_list.html index 99134572..ba3a3a75 100644 --- a/templates/client/includes/place/place_list.html +++ b/templates/client/includes/place/place_list.html @@ -1,59 +1,59 @@ -{% load static %} -{% load i18n %} -{% load template_filters %} - -
    - {% for object in object_list %} -
  • -
    - -
    - {% with obj=object %} - {% include 'client/includes/show_logo.html' %} - {% endwith %} -
    -
    -
    -
    -
    - {% if object.approved %} - - {% endif %} -
    -
    - - -
    - -
    {{ object.get_type }}
    -
    - -
    - {% if object.total_area %} -
    {{ object.total_area }} м2
    - {% endif %} - -
    -
    - -
    -
    - {% trans 'описание' %} - {% if object.get_events_number %} - {% trans 'события' %} ({{ object.get_events_number }}) - {% endif %} - {% if object.photogallery %} - {% trans 'фото' %} - {% endif %} -
    - -
    - -
    -
  • - {% endfor %} +{% load static %} +{% load i18n %} +{% load template_filters %} + + \ 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 fc4ceb9a..5dca172d 100644 --- a/templates/client/includes/place/place_object.html +++ b/templates/client/includes/place/place_object.html @@ -1,327 +1,327 @@ -{% load static %} -{% load i18n %} -{% load template_filters %} - - -{% block page_body %} -
    -
    - - -
    -
    -
    - {{ place.name|safe }} -
    -
    - {{ place.description|safe|linebreaks }} -
    - {% if place.address %} -
    -
    -
    - {{ place.adress }} -
    - -
    - -
    - {% else %} -
    - {% endif %} -
    -
    -
    - -
    -
    Услуги
    -
    -
      - {% if place.bank %} -
    • {% trans 'Банк / банкоматы / обмен валюты' %}
    • - {% endif %} - {% if place.wifi %} -
    • Wi-Fi
    • - {% endif %} - {% if place.children_room %} -
    • {% trans 'Детская комната' %}
    • - {% endif %} - {% if place.disabled_service %} -
    • {% trans 'Сервис для инвалидов' %}
    • - {% endif %} -
    -
      - {% if place.conference_centre %} -
    • {% trans 'Конгресс-центр' %}
    • - {% endif %} - {% if place.business_centre %} -
    • {% trans 'Бизнес центр' %}
    • - {% endif %} - {% if place.online_registration %} -
    • {% trans 'Онлайн-регистрация' %}
    • - {% endif %} - {% if place.cafe %} -
    • {% trans 'Кафе и рестораны' %}
    • - {% endif %} -
    -
      - {% if place.terminals %} -
    • {% trans 'Информационные терминалы' %}
    • - {% endif %} - {% if place.parking %} -
    • {% trans 'Парковка' %}
    • - {% endif %} - {% if place.press_centre %} -
    • {% trans 'Пресс-центр' %}
    • - {% endif %} - {% if place.mobile_application %} -
    • {% trans 'Мобильное приложение' %}
    • - {% endif %} -
    -
    -
    -
    - {% if place.photogallery %} - {% with photos=place.photogallery.photos.all|slice:"5" %} -
    -
    {% trans 'Фотогалерея' %}
    - -
    - {% endwith %} - {% endif %} -
    - {% if place.total_area %} -
    -
    {% trans 'Общая выставочная площадь' %}
    -
    {{ place.total_area|int_format }} м²
    -
    - {% endif %} - -
    - {% if place.closed_area %} -
    - {{ place.closed_area|int_format }} {% trans 'м²' %} - {% trans 'закрытая выставочная площадь' %} -
    - {% endif %} - {% if place.open_area %} -
    - {{ place.open_area|int_format }} {% trans 'м²' %} - {% trans 'открытая выставочная площадь' %} -
    - {% endif %} -
    - -
    -
    -
      - {% for hall in place.halls.all %} - - {% if not forloop.counter|divisibleby:"2" %} -
    • {{ hall.name }} {% if hall.number %} №{{ hall.number }} {% endif %} — {{ hall.capacity }} м2
    • - {% endif %} - {% endfor %} -
    - -
    -
    -
      - {% for hall in place.halls.all %} - {% if forloop.counter|divisibleby:"2" %} -
    • {{ hall.name }} {% if hall.number %} №{{ hall.number }} {% endif %} — {{ hall.capacity }} м2
    • - {% endif %} - {% endfor %} - -
    -
    -
    - -
    - {{ place.total_year_action }} -
    - -
    - {% if place.foundation_year %} -
    {% trans 'Основано в' %} {{ place.foundation_year }} {% trans 'году' %}
    - {% endif %} -
    - - -
    - {% if place.get_scheme %} -
    -
    -
    {% trans 'Схема павильонов' %}
    - {% for scheme in place.get_scheme %} -
    -
    - {% endfor %} - -
    - {% endif %} -
    -
    {% trans 'Контактная информация' %}
    -
    -
    -
    {{ place.adress }}
    - -
    - -
    -
      - {% if place.phone %} -
    • {{ place.phone|phone }} ({% trans 'телефон' %})
    • - {% endif %} - {% if place.fax %} -
    • {{ place.fax|phone }} ({% trans 'факс' %})
    • - {% endif %} -
    -
    - -
    -
    -
    - {% if place.events %} -
    -
    {% trans 'Список событий' %}
    - -
    - {% endif %} - - {% if place.get_nearest_places %} -
    -
    {% trans 'Ближайшие выставочные центры' %}
    - -
    - {% endif %} +{% load static %} +{% load i18n %} +{% load template_filters %} + + +{% block page_body %} +
    +
    + + +
    +
    +
    + {{ place.name|safe }} +
    +
    + {{ place.description|safe|linebreaks }} +
    + {% if place.address %} +
    +
    +
    + {{ place.adress }} +
    + +
    + +
    + {% else %} +
    + {% endif %} +
    +
    +
    + +
    +
    Услуги
    +
    +
      + {% if place.bank %} +
    • {% trans 'Банк / банкоматы / обмен валюты' %}
    • + {% endif %} + {% if place.wifi %} +
    • Wi-Fi
    • + {% endif %} + {% if place.children_room %} +
    • {% trans 'Детская комната' %}
    • + {% endif %} + {% if place.disabled_service %} +
    • {% trans 'Сервис для инвалидов' %}
    • + {% endif %} +
    +
      + {% if place.conference_centre %} +
    • {% trans 'Конгресс-центр' %}
    • + {% endif %} + {% if place.business_centre %} +
    • {% trans 'Бизнес центр' %}
    • + {% endif %} + {% if place.online_registration %} +
    • {% trans 'Онлайн-регистрация' %}
    • + {% endif %} + {% if place.cafe %} +
    • {% trans 'Кафе и рестораны' %}
    • + {% endif %} +
    +
      + {% if place.terminals %} +
    • {% trans 'Информационные терминалы' %}
    • + {% endif %} + {% if place.parking %} +
    • {% trans 'Парковка' %}
    • + {% endif %} + {% if place.press_centre %} +
    • {% trans 'Пресс-центр' %}
    • + {% endif %} + {% if place.mobile_application %} +
    • {% trans 'Мобильное приложение' %}
    • + {% endif %} +
    +
    +
    +
    + {% if place.photogallery %} + {% with photos=place.photogallery.photos.all|slice:"5" %} +
    +
    {% trans 'Фотогалерея' %}
    + +
    + {% endwith %} + {% endif %} +
    + {% if place.total_area %} +
    +
    {% trans 'Общая выставочная площадь' %}
    +
    {{ place.total_area|int_format }} м²
    +
    + {% endif %} + +
    + {% if place.closed_area %} +
    + {{ place.closed_area|int_format }} {% trans 'м²' %} + {% trans 'закрытая выставочная площадь' %} +
    + {% endif %} + {% if place.open_area %} +
    + {{ place.open_area|int_format }} {% trans 'м²' %} + {% trans 'открытая выставочная площадь' %} +
    + {% endif %} +
    + +
    +
    +
      + {% for hall in place.halls.all %} + + {% if not forloop.counter|divisibleby:"2" %} +
    • {{ hall.name }} {% if hall.number %} №{{ hall.number }} {% endif %} — {{ hall.capacity }} м2
    • + {% endif %} + {% endfor %} +
    + +
    +
    +
      + {% for hall in place.halls.all %} + {% if forloop.counter|divisibleby:"2" %} +
    • {{ hall.name }} {% if hall.number %} №{{ hall.number }} {% endif %} — {{ hall.capacity }} м2
    • + {% endif %} + {% endfor %} + +
    +
    +
    + +
    + {{ place.total_year_action }} +
    + +
    + {% if place.foundation_year %} +
    {% trans 'Основано в' %} {{ place.foundation_year }} {% trans 'году' %}
    + {% endif %} +
    + + +
    + {% if place.get_scheme %} +
    +
    +
    {% trans 'Схема павильонов' %}
    + {% for scheme in place.get_scheme %} +
    +
    + {% endfor %} + +
    + {% endif %} +
    +
    {% trans 'Контактная информация' %}
    +
    +
    +
    {{ place.adress }}
    + +
    + +
    +
      + {% if place.phone %} +
    • {{ place.phone|phone }} ({% trans 'телефон' %})
    • + {% endif %} + {% if place.fax %} +
    • {{ place.fax|phone }} ({% trans 'факс' %})
    • + {% endif %} +
    +
    + +
    +
    +
    + {% if place.events %} +
    +
    {% trans 'Список событий' %}
    + +
    + {% endif %} + + {% if place.get_nearest_places %} +
    +
    {% trans 'Ближайшие выставочные центры' %}
    + +
    + {% endif %} {% endblock %} \ No newline at end of file diff --git a/templates/client/place/place_photo.html b/templates/client/place/place_photo.html index 02f4b935..10090268 100644 --- a/templates/client/place/place_photo.html +++ b/templates/client/place/place_photo.html @@ -1,134 +1,82 @@ -{% extends 'base_catalog.html' %} -{% load static %} -{% load i18n %} -{% load template_filters %} - - -{% block page_body %} -
    -
    -
    - -
    -
    -
    - -
    -
    - {{ object.get_type }} -
    -
    -
    - {% if object.country %} - - {% endif %} -
    -
    -
    -
    - -
    - {{ object.description|safe }} -
    - - -
    - {% block paginator %} - - {% with page_obj=page_obj queries=queries %} - {% include 'includes/paginator.html' %} - {% endwith %} - - {% endblock %} -{% endblock %} - -{% block photogallery %} -