Specialist catalog bugs

remotes/origin/1203
Nazar Kotjuk 10 years ago
parent 234e23010e
commit ab11e59a75
  1. 15
      specialist_catalog/forms.py
  2. 2
      specialist_catalog/models.py
  3. 3
      templates/client/base_catalog.html
  4. 12
      templates/client/includes/booking_block.html
  5. 2
      templates/client/includes/conference/conference_object.html
  6. 319
      templates/client/includes/event_object.html
  7. 2
      templates/client/includes/exposition/expo_paid.html
  8. 2
      templates/client/includes/exposition/exposition_object.html
  9. 14
      templates/client/includes/translators_aside.html
  10. 2
      templates/client/popups/announce_subscription.html
  11. 2
      templates/client/service/participation.html
  12. 2
      templates/client/service/remotely.html
  13. 2
      templates/client/service/tickets.html
  14. 2
      templates/client/service/tour.html
  15. 2
      templates/client/service/translator.html
  16. 25
      templates/client/specialist_catalog/catalog_detailed.html

@ -33,6 +33,21 @@ class SpecialistCatalogForm(TranslatableModelForm):
'big_cities': CKEditorWidget,
}
def __init__(self, *args, **kwargs):
super(SpecialistCatalogForm, self).__init__(*args, **kwargs)
if kwargs.get('instance'):
instance = kwargs['instance']
if instance.type == SpecialistCatalog._country:
qs = Specialist.objects.filter(country=instance.country)
else:
qs = Specialist.objects.filter(city=instance.city)
self.fields['specialists'] = forms.ModelMultipleChoiceField(label=u"Специалисты", required=False,
queryset=qs)
def save(self, commit=True):
place = self.cleaned_data.get('city') or self.cleaned_data.get('country')
place_inflect = place.inflect or place.name

@ -26,6 +26,8 @@ class Specialist(models.Model):
class SpecialistCatalog(TranslatableModel):
_country = 1
_city = 2
price = models.IntegerField(verbose_name=u"Цена", default=200)
currency = models.CharField(max_length=255, verbose_name=u"Валюта", default=u"EUR")
logo = models.ImageField(db_column= "logo_preview", verbose_name=u"Логотип", blank=True, upload_to='specialist_catalog/logo_preview/')

@ -27,9 +27,10 @@
{% include 'client/includes/side_confs.html' %}
<hr />
{% include 'client/includes/banners/aside_2.html' %}
{% include 'client/includes/translators_aside.html' %}
<hr />
<div class="s-news-list">

@ -8,16 +8,16 @@
<div class="h-booking">
<header class="clearfix">
<div class="sect-title">
<a target="_blank" href="http://www.booking.com/searchresults.html?aid={{ book_aid }}&city={{ city.id }}">{% trans 'Отели рядом с выставкой от' %} <b>Booking</b>.com</a>
<a target="_blank" href="http://www.booking.com/searchresults.html?aid={{ book_aid }}&city={{ city.id }}{% if event %}&checkin_monthday={{ event.data_begin|date:'j' }}&checkin_year_month={{ event.data_begin|date:'Y' }}-{{ event.data_begin|date:'n' }}&checkout_monthday={{ event.data_end|date:'j' }}&checkout_year_month={{ event.data_end|date:'Y' }}-{{ event.data_end|date:'n' }}{% endif %}">{% trans 'Отели рядом с выставкой от' %} <b>Booking</b>.com</a>
</div>
<a class="more blue2" target="_blank" href="http://www.booking.com/searchresults.html?aid={{ book_aid }}&city={{ city.id }}">{% trans 'Все отели поблизости' %}</a>
<a class="more blue2" target="_blank" href="http://www.booking.com/searchresults.html?aid={{ book_aid }}&city={{ city.id }}{% if event %}&checkin_monthday={{ event.data_begin|date:'j' }}&checkin_year_month={{ event.data_begin|date:'Y' }}-{{ event.data_begin|date:'n' }}&checkout_monthday={{ event.data_end|date:'j' }}&checkout_year_month={{ event.data_end|date:'Y' }}-{{ event.data_end|date:'n' }}{% endif %}">{% trans 'Все отели поблизости' %}</a>
</header>
<ul>
{% if place %}
{% for hotel in place.get_nearest_hotels %}
<li>
<div class="hb-item">
<a href="{{ hotel.url }}?aid={{ book_aid }}" target="_blank">
<a href="{{ hotel.url }}?aid={{ book_aid }}{% if event %}&checkin_monthday={{ event.data_begin|date:'j' }}&checkin_year_month={{ event.data_begin|date:'Y' }}-{{ event.data_begin|date:'n' }}&checkout_monthday={{ event.data_end|date:'j' }}&checkout_year_month={{ event.data_end|date:'Y' }}-{{ event.data_end|date:'n' }}{% endif %}" target="_blank">
<span class="hb-pict">
{% thumbnail hotel.photo "150x150" crop="center" as im %}
<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}">
@ -28,7 +28,7 @@
{% if hotel.min_price %}
<div class="hb-price">{{ hotel.min_price|floatformat:0 }} {{ hotel.currency }}/{% trans 'ночь' %}</div>
{% endif %}
<a class="button blue2 lc icon-bell" href="{{ hotel.url }}?aid={{ book_aid }}" target="_blank">{% trans 'Забронировать' %}</a>
<a class="button blue2 lc icon-bell" href="{{ hotel.url }}?aid={{ book_aid }}{% if event %}&checkin_monthday={{ event.data_begin|date:'j' }}&checkin_year_month={{ event.data_begin|date:'Y' }}-{{ event.data_begin|date:'n' }}&checkout_monthday={{ event.data_end|date:'j' }}&checkout_year_month={{ event.data_end|date:'Y' }}-{{ event.data_end|date:'n' }}{% endif %}" target="_blank">{% trans 'Забронировать' %}</a>
</div>
</li>
{% endfor %}
@ -36,7 +36,7 @@
{% for hotel in city.get_hotels %}
<li>
<div class="hb-item">
<a href="{{ hotel.url }}?aid={{ book_aid }}" target="_blank">
<a href="{{ hotel.url }}?aid={{ book_aid }}{% if event %}&checkin_monthday={{ event.data_begin|date:'j' }}&checkin_year_month={{ event.data_begin|date:'Y' }}-{{ event.data_begin|date:'n' }}&checkout_monthday={{ event.data_end|date:'j' }}&checkout_year_month={{ event.data_end|date:'Y' }}-{{ event.data_end|date:'n' }}{% endif %}" target="_blank">
<span class="hb-pict">
{% thumbnail hotel.photo "150x150" crop="center" as im %}
<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}">
@ -48,7 +48,7 @@
{% if hotel.min_price %}
<div class="hb-price">{{ hotel.min_price|floatformat:0 }} {{ hotel.currency }}/{% trans 'ночь' %}</div>
{% endif %}
<a class="button blue2 lc icon-bell" href="{{ hotel.url }}?aid={{ book_aid }}" target="_blank">{% trans 'Забронировать' %}</a>
<a class="button blue2 lc icon-bell" href="{{ hotel.url }}?aid={{ book_aid }}{% if event %}&checkin_monthday={{ event.data_begin|date:'j' }}&checkin_year_month={{ event.data_begin|date:'Y' }}-{{ event.data_begin|date:'n' }}&checkout_monthday={{ event.data_end|date:'j' }}&checkout_year_month={{ event.data_end|date:'Y' }}-{{ event.data_end|date:'n' }}{% endif %}" target="_blank">{% trans 'Забронировать' %}</a>
</div>
</li>
{% endfor %}

@ -288,7 +288,7 @@
</div>
{% endif %}
</div>
{% include 'client/includes/booking_block.html' with city=event.city place=event.place %}
{% include 'client/includes/booking_block.html' with city=event.city place=event.place event=event %}
<hr />
{% if event.get_nearest_events|slice:":6" %}
<div class="e-cat">

@ -1,319 +0,0 @@
{% load static %}
{% load i18n %}
{% load thumbnail %}
{% load template_filters %}
{% block page_body %}
<div class="m-article">
<div class="item-wrap event clearfix">
<aside>
{% if exposition.expohit %}
<div class="hit"></div>
{% endif %}
<div class="i-pict">
{% with obj=exposition %}
{% include 'client/includes/show_logo.html' %}
{% endwith %}
</div>
<!--
<div class="i-rating" title="Рейтинг: 551">551</div>
-->
<div class="i-stats">
{% if exposition.visitors %}
<span class="visitors" title="Посетители">{{ exposition.visitors }}</span>
{% endif %}
{% if exposition.members %}
<span class="participants" title="Участники">{{ exposition.members }}</span>
{% endif %}
</div>
<div class="i-discount">
{% if exposition.discount %}
<a class="discount-button" href="#">{% trans 'Скидка' %} -{{ exposition.discount }}%</a>
<div class="dsc-text">{{ exposition.discount_description|safe|linebreaks }}</div>
{% endif %}
</div>
</aside>
<div class="i-info">
<header>
<div class="i-title">
{% if exposition.main_title %}
{{ exposition.main_title|safe }} {{ exposition.name|safe }}
{% else %}
{{ exposition.name|safe }}
{% endif %}
</div>
</header>
<div class="i-date">
{% with obj=exposition %}
{% include 'client/includes/show_date_block.html' %}
{% endwith %}
</div>
{% if exposition.place %}
<div class="i-address">
<header>
<div class="address">
{{ exposition.place.adress }}
</div>
<div class="show-map"><a class="toggle-map" href="#">{% trans 'Раскрыть карту' %}</a></div>
</header>
<div class="i-map">
<div class="close-map"><a class="toggle-map" href="#">{% trans 'Скрыть карту' %}</a>
</div>
<div class="map-canvas" id="map-canvas" data-coords="{{ exposition.place.address.lat|stringformat:'f' }},{{ exposition.place.address.lng|stringformat:'f' }}" ></div>
</div>
</div>
{% endif %}
<hr />
<div class="i-buttons clearfix">
<div class="ib-main">
{% with event=exposition user=user %}
{% include 'client/includes/visit_button.html' %}
{% endwith %}
{% with event=exposition user=user %}
{% include 'client/includes/calendar_button.html' %}
{% endwith %}
<a class="button green icon-note" href="#">{% trans 'заметка' %}</a>
</div>
<!--
<div class="ib-add"><a class="button blue2 icon-find" href="#">{% trans 'Найти отель' %}</a></div>
-->
</div>
<hr />
<div class="i-divs clearfix">
<div class="i-subj">
<ul>
{% for theme in exposition.theme.all %}
<li><a href="/{{ filter|generate_url:'model' }}/theme-{{ theme.url }}">{{ theme }} ({{ theme.expositions_number }})</a></li>
{% endfor %}
</ul>
</div>
<div class="i-tags">
{% for tag in exposition.tag.all %}
<a href="/{{ filter|generate_url:'model' }}/tag-{{ tag.url }}">{{ tag }}</a>,
{% endfor %}
</div>
</div>
</div>
</div>
<div class="i-sub-articles">
<ul>
{% for service in exposition.get_services %}
<li><a href="/{{ filter|generate_url }}/service/{{ service.url }}">{{ service.name }}</a></li>
{% endfor %}
</ul>
</div>
{% include 'includes/event_steps.html' with event=exposition filter=filter %}
{% if exposition.get_photos %}
{% with photos=exposition.get_photos|slice:"5" %}
<hr />
<div class="i-photo-slides">
<div class="sect-title"><a href="#">{% trans 'Фотографии с прошлой выставки' %}</a></div>
<div id="ps-photo-gallery" class="ps-photo-gallery swiper-container">
<ul class="swiper-wrapper">
{% for photo in photos %}
<li class="swiper-slide">
<img src="{{ photo.get_display_url }}" alt="" />
</li>
{% endfor %}
</ul>
<div class="re-controls">
<a class="prev" href="#">&lt;</a>
<a class="next" href="#">&gt;</a>
</div>
</div>
</div>
{% endwith %}
{% endif %}
{% if exposition.description %}
<div class="i-event-description">
<div class="ied-title">{% trans 'О выставке' %} {{ exposition.name|safe }}</div>
<div class="ied-text">{{ exposition.description|safe|linebreaks }}</div>
</div>
<hr />
{% endif %}
<div class="i-event-additional clearfix">
<div class="sect-title">{% trans 'Дополнительная информация' %}</div>
<ul class="e-docs">
{% if exposition.business_program.all %}
<li><a href="/{{ filter|generate_url}}/program/">{% trans 'Деловая программа' %}</a></li>
{% endif %}
<li><a href="/{{ filter|generate_url}}/price/">{% trans 'Условия участия' %}</a></li>
<li><a href="/{{ filter|generate_url}}/statistic/">{% trans 'Статистика' %}</a></li>
</ul>
<dl class="add-info">
<dt>{% trans 'Организатор' %}:</dt>
<dd>
{% for organiser in exposition.organiser.all %}
{{ organiser.name }}<br />
<a target="_blank" href="{{ organiser.web_page }}">{{ organiser.web_page }}</a><br />
{{ organiser.email }}
{% endfor %}
</dd>
{% if exposition.web_page %}
<dt>{% trans 'Веб-сайт' %}:</dt>
<dd>
<a target="_blank" href="{{ exposition.web_page }}">{{ exposition.web_page }}</a>
</dd>
{% endif %}
{% if exposition.get_audience %}
<dt>{% trans 'Аудитория' %}:</dt>
<dd>
{{ exposition.get_audience }}
</dd>
{% endif %}
{% if exposition.get_periodic %}
<dt>{% trans 'Периодичность' %}:</dt>
<dd>{{ exposition.get_periodic }}</dd>
{% endif %}
{% if exposition.products %}
<dt>{% trans 'Экспонируемые продукты' %}:</dt>
<dd>{{ exposition.products|safe|linebreaks }}</dd>
{% endif %}
</dl>
</div>
<hr />
<div class="i-members clearfix">
<div class="im-participants">
<header>
<div class="im-title">{% trans 'Участники' %}</div>
<a class="more" href="/{{ filter|generate_url }}/members">{% trans 'Все участники' %}</a>
</header>
<ul>
{% for company in exposition.company.all|slice:":6" %}
<li>
<a href="{{ company.get_permanent_url }}">
<span class="imp-pict">
{% with obj=company %}
{% include 'includes/show_logo.html' %}
{% endwith %}
</span>
{{ company.name }}
</a>
</li>
{% endfor %}
</ul>
</div>
<div class="im-visitors">
<header>
<div class="im-title">{% trans 'Посетители' %}</div>
</header>
<ul>
{% for user in exposition.users.all|slice:":17" %}
<li><a href="{{ user.get_permanent_url }}">{{ user.get_full_name }}</a></li>
{% endfor %}
</ul>
<a class="more" href="/{{ filter|generate_url }}/visitors">{% trans 'Все посетители' %}</a>
</div>
</div>
{% if exposition.place %}
<hr/>
<div class="e-num-info">
{% if exposition.place %}
<div class="eni-area-wrap">
<div class="eni-title">{% trans 'Общая выставочная площадь' %}</div>
<div class="eni-area">
{% if exposition.place.total_area %}
{{ exposition.place.total_area }} {% trans 'м²' %}
{% endif %}
</div>
</div>
{% endif %}
<div class="eni-stats">
{% if exposition.visitors %}
<div class="enis-item"><b>{{ exposition.visitors }}</b> {% trans 'учасников' %}</div>
{% endif %}
{% if exposition.members %}
<div class="enis-item"><b>{{ exposition.members }}</b> {% trans 'посетителей' %}</div>
{% endif %}
{% if exposition.foundation_year %}
<div class="eni-founded">{% trans 'Основано в' %} <b>{{ exposition.foundation_year }}</b> {% trans 'году' %}</div>
{% endif %}
</div>
</div>
{% endif %}
</div>
{% include 'client/includes/booking_block.html' with city=exposition.city place=exposition.place %}
<hr />
{% if exposition.get_nearest_events|slice:":6" %}
<div class="e-cat">
<div class="sect-title">{% trans 'Ближайшие выставки по тематике' %} <a href="{{ expo_catalog }}theme-{{ exposition.theme.all.0.url }}">«{{ exposition.theme.all.0 }}»</a></div>
<ul class="cat-list cl-exhibitions">
{% for exp in exposition.get_nearest_events %}
<li class="cl-item">
<div class="cl-item-wrap clearfix">
<a href="{{ exp.get_permanent_url }}">
<div class="cli-pict">
{% with obj=exp %}
{% include 'client/includes/show_logo.html' %}
{% endwith %}
</div>
</a>
<div class="cli-info">
<div class="cli-top clearfix">
{% if exp.approved %}
<div class="cli-approved">
<img src="{% static 'client/img/approved-logo.png' %}" alt="" title="Approved Event" />
</div>
{% endif %}
<header>
<div class="cli-title"><a href="{{ exp.get_permanent_url }}">{{ exp.name|safe }}</a></div>
</header>
<div class="cli-descr">
{{ exp.main_title|safe|linebreaks }}
</div>
<div class="cli-bot clearfix">
<div class="cli-date">
{% with obj=exp %}
{% include 'client/includes/show_date_block.html' %}
{% endwith %}
</div>
<div class="cli-place">
<a href="{{ exp.country.get_permanent_url }}">{{ exp.country }}</a>, <a href="{{ exp.city.get_permanent_url }}">{{ exp.city }}</a>
{% if exp.place %}
, <a href="{{ exp.place.get_permanent_url }}">{{ exp.place }}</a>
{% endif %}
</div>
</div>
</div>
</div>
</div>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
<!--
<div class="abn"><a href="#"><img src="{% static 'client/img/_del-temp/banner-2.gif' %}" alt="" /></a></div>
-->
{% endblock %}
{% block content_text %}
{% endblock %}

@ -318,7 +318,7 @@
{% endif %}
</div>
{% include 'client/includes/booking_block.html' with city=exposition.city place=exposition.place %}
{% include 'client/includes/booking_block.html' with city=exposition.city place=exposition.place event=exposition %}
<hr />
{% if exposition.get_nearest_events|slice:":6" %}
<div class="e-cat">

@ -315,7 +315,7 @@
</div>
{% endif %}
</div>
{% include 'client/includes/booking_block.html' with city=exposition.city place=exposition.place %}
{% include 'client/includes/booking_block.html' with city=exposition.city place=exposition.place event=exposition %}
<hr />
{% if exposition.get_nearest_events|slice:":6" %}
<div class="e-cat">

@ -0,0 +1,14 @@
{% load i18n %}
<div class="mps-sect">
<header>{% trans 'Переводчики' %}</header>
<nav>
<ul>
<li><a href="/translators/country/">{% trans 'По странам' %}</a></li>
<li><a href="/translators/city/">{% trans 'По городам' %}</a></li>
<li><a href="/translators/city/moscow/">{% trans 'Переводчики в Москве' %}</a></li>
<li><a href="/translators/country/germany/">{% trans 'Переводчики в Германии' %}</a></li>
<li><a href="/translators/country/italy/">{% trans 'Переводчики в Италии' %}</a></li>
<li><a href="/translators/country/china/">{% trans 'Переводчики в Китае' %}</a></li>
</ul>
</nav>
</div>

@ -6,7 +6,7 @@
<div id="pw-subscribe-popup" class="popup-window subscribe-modal">
<header class="clearfix">
<div class="step1">
<div class="pw-title ">{% trans 'Анонсы' %} <span class="type-of-event">{% trans 'конференций' %}</span> {% trans 'на ваш email' %}</div>
<div class="pw-title ">{% trans 'Анонсы' %} <span class="type-of-event">{% trans 'событий' %}</span> {% trans 'на ваш email' %}</div>
{% if themes %}
<p class="sub-header">{% trans 'по тематике' %} {% for th in themes %}<a href="#">&laquo;{{ th|get_theme_name }}&raquo;</a>{% if not forloop.last %}, {% endif %}{% endfor %}</p>

@ -286,7 +286,7 @@
</div>
{% if object %}
<div class="m-article">
{% include 'client/includes/booking_block.html' with city=object.city place=object.place %}
{% include 'client/includes/booking_block.html' with city=object.city place=object.place event=object %}
</div>
{% endif %}
</div>

@ -278,7 +278,7 @@
</div>
{% if object %}
<div class="m-article">
{% include 'client/includes/booking_block.html' with city=object.city place=object.place %}
{% include 'client/includes/booking_block.html' with city=object.city place=object.place event=object %}
</div>
{% endif %}

@ -290,7 +290,7 @@
</div>
{% if object %}
<div class="m-article">
{% include 'client/includes/booking_block.html' with city=object.city place=object.place %}
{% include 'client/includes/booking_block.html' with city=object.city place=object.place event=object %}
</div>
{% endif %}

@ -374,7 +374,7 @@
</div>
{% if object %}
<div class="m-article">
{% include 'client/includes/booking_block.html' with city=object.city place=object.place %}
{% include 'client/includes/booking_block.html' with city=object.city place=object.place event=object %}
</div>
{% endif %}
</div>

@ -374,7 +374,7 @@
</div>
{% if object %}
<div class="m-article">
{% include 'client/includes/booking_block.html' with city=object.city place=object.place %}
{% include 'client/includes/booking_block.html' with city=object.city place=object.place event=object %}
</div>
{% endif %}

@ -36,10 +36,9 @@
<div class="i-title">{{ object.title }}</div>
</header>
<div class="i-descr">
<div class="i-descr" style="min-height: 80px;">
{{ object.main_descr|safe }}
</div>
<hr/>
<div class="i-address map-opened country_map">
@ -63,7 +62,7 @@
</div>
{% if object.big_cities %}
<div class="country_towns">
<h4>Крупные города:</h4>
<h4>{% trans 'Города, в которых мы предоставляем переводчиков:' %}</h4>
{{ object.big_cities|safe }}
</div>
{% endif %}
@ -72,7 +71,7 @@
<div class="i-services country_content">
<div class="i-descr">
<h4>Коротко о наших преимуществах:</h4>
<h4>{% trans 'Коротко о наших преимуществах:' %}</h4>
<div style="margin-top:20px;">
{{ object.benefits|safe }}
</div>
@ -228,9 +227,9 @@
<div class="rqb-button">
<div class="rq-order-button">
<div class="rqob-wrap">
<div class="rqob-price">от {{ object.price }} {{ object.currency }} / день</div>
<div class="rqob-price">от {{ object.price }} {{ object.currency }} / {% trans 'день' %}</div>
<div class="rqob-button">
<a class="ob-text" href="#">заказать услугу</a>
<a class="ob-text" href="#">{% trans 'заказать услугу' %}</a>
</div>
</div>
</div>
@ -238,9 +237,6 @@
</div>
</div>
<hr>
{% if request.GET.debug == '1' %}
<script src="{% static 'client/js/_modules/page.translator.js' %}"></script>
@ -257,14 +253,12 @@
{% with object.specialists.all as specialists %}
{% if specialists %}
<div class="i-staff">
<div class="sect-title">Наши специалисты</div>
<div class="sect-title">{% trans 'Наши специалисты' %}</div>
<div class="i-staff-list">
<ul>
{% for spec in specialists %}
<li>
<a href="#">
<div class="sl-item clearfix">
<div class="sl-pict">
{% thumbnail spec.photo "100x100" crop="center" as im %}
@ -278,15 +272,10 @@
</div>
</div>
</div>
</a>
</li>
{% endfor %}
</ul>
</div>
</div>
{% endif %}
{% endwith %}
@ -297,7 +286,7 @@
<div class="rq-to-hide">
<div class="s-comments">
<div class="sect-title">Отзывы клиентов:</div>
<div class="sect-title">{% trans 'Отзывы клиентов:' %}</div>
<div class="cat-list sc-comments">
{% for feedback in feedbacks %}
<div class="cl-item">

Loading…
Cancel
Save