From 9edae9ad696b05c14bf23f102c0f9a0da95d7925 Mon Sep 17 00:00:00 2001 From: Alexander Burdeiny Date: Tue, 30 Aug 2016 15:41:26 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20=D0=BF?= =?UTF-8?q?=D0=BE=20=D1=80=D0=B5=D0=B9=D1=82=D0=B8=D0=BD=D0=B3=D1=83;=20?= =?UTF-8?q?=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D1=80=D1=83=D0=B1=D0=BB=D0=B5=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- events/common.py | 1 + events/forms.py | 6 +++--- exposition/models.py | 2 +- service/models.py | 2 +- .../client/includes/events/filter_result.html | 14 ++++++++++++-- 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/events/common.py b/events/common.py index b4cb2f66..3bfe9de0 100644 --- a/events/common.py +++ b/events/common.py @@ -42,6 +42,7 @@ price_mapping = OrderedDict([ ]) price_mapping_eur = OrderedDict([ + ('N0', {'min': None, 'max': None, 'value': 0, 'label': _(u'Не указана')}), ('N5', {'min': 1, 'max': 100, 'value': 1, 'label': _(u'до 100 евро')}), ('N510', {'min': 100, 'max': 200, 'value': 2, 'label': _(u'100-200 евро')}), ('N1020', {'min': 200, 'max': 400, 'value': 3, 'label': _(u'200-400 евро')}), diff --git a/events/forms.py b/events/forms.py index c6ae7eb9..1770e297 100644 --- a/events/forms.py +++ b/events/forms.py @@ -176,9 +176,9 @@ RATING = ( rating_mapping = [ {'value': 'r1', 'db_value': 1, 'label': _(u'Топовые (HIT)'), 'field': 'expohit'}, - {'value': 'r2', 'db_value': int(Exposition.quality_label.ufi), 'label': _(u'Члены РСВЯ'), 'field': 'quality_label'}, - {'value': 'r3', 'db_value': int(Exposition.quality_label.rsva), 'label': _(u'Члены UFI'), 'field': 'quality_label'}, - {'value': 'r4', 'db_value': int(Exposition.quality_label.exporating), 'label': _(u'ExpoRating'), 'field': 'quality_label'}, + {'value': 'r2', 'db_value': Exposition.quality_label.rsva.mask, 'label': _(u'Члены РСВЯ'), 'field': 'quality_label'}, + {'value': 'r3', 'db_value': Exposition.quality_label.ufi.mask, 'label': _(u'Члены UFI'), 'field': 'quality_label'}, + {'value': 'r4', 'db_value': Exposition.quality_label.exporating.mask, 'label': _(u'ExpoRating'), 'field': 'quality_label'}, ] diff --git a/exposition/models.py b/exposition/models.py index 20dad7f5..02c05f4c 100644 --- a/exposition/models.py +++ b/exposition/models.py @@ -292,7 +292,7 @@ class Exposition(TranslatableModel, EventMixin, ExpoMixin): def get_currency_html(self): cur = self.currency - currency_codes = {'EUR':'€', 'USD':'$', 'RUB':'ք'} + currency_codes = {'EUR':'€', 'USD':'$', 'RUB':'руб.'} code = currency_codes.get(cur) if code: return code diff --git a/service/models.py b/service/models.py index 596b1213..6ff55192 100644 --- a/service/models.py +++ b/service/models.py @@ -48,7 +48,7 @@ class Service(TranslatableModel): def get_currency_html(self): cur = self.currency - currency_codes = {'EUR':'€', 'USD':'$', 'RUB':'ք'} + currency_codes = {'EUR':'€', 'USD':'$', 'RUB':'руб.'} code = currency_codes.get(cur) if code: return code diff --git a/templates/client/includes/events/filter_result.html b/templates/client/includes/events/filter_result.html index 37ab41c8..9b6cf23d 100644 --- a/templates/client/includes/events/filter_result.html +++ b/templates/client/includes/events/filter_result.html @@ -26,9 +26,19 @@
- {% if result.object.quality_label.ufi.is_set %} + {% if result.object.quality_label.rsva.is_set %}
- + +
+ {% endif %} + {% if result.object.quality_label.exporating.is_set %} +
+ +
+ {% endif %} + {% if result.object.quality_label.ufi.is_set %} +
+
{% endif %}