правки от 29.08.2016 смержил с димой, добавил правки

remotes/origin/stage5
Alexander Burdeiny 10 years ago
parent 8f6537ed10
commit 6ba182c878
  1. 7
      service/models.py
  2. 10
      templates/client/service/tickets.html

@ -46,6 +46,13 @@ class Service(TranslatableModel):
def get_price(self):
pr = self.price
def get_currency_html(self):
cur = self.currency
currency_codes = {'EUR':'', 'USD':'$', 'RUB':'ք'}
code = currency_codes.get(cur)
if code:
return code
return cur
post_save.connect(post_save_handler, sender=Service)

@ -151,7 +151,7 @@
<div class="rqob-wrap">
<div class="rqob-price">
{% if service.price %}
{% blocktrans with price=service.price currency=service.currency %}Регистрация {{ price }} {{ currency }}{% endblocktrans %}
{% blocktrans with price=service.price currency=service.get_currency_html %}Регистрация {{ price }} {{ currency }}{% endblocktrans %}
{% else %}
{% trans 'Регистрация 2000 руб.' %}
{% endif %}
@ -161,7 +161,7 @@
{% if price|isdigit %}
{{ price }}{{ object.get_currency_html }}
{% else %}
<span class="small">{{ price }}</span>
<span class="small">{{ price }} <small>({% trans 'билет организатора' %})</small></span>
{% endif %}
{% else %}
<small>{% trans 'билет организатора' %}</small>
@ -175,7 +175,7 @@
{% endif %}
{% if service.price %}
<input id="id_currency" name="currency" type="hidden" value="{{ service.currency }}"/>
<input id="id_currency" name="currency" type="hidden" value="{{ service.currency }}"/>
{% endif %}
<button type="submit">{% trans 'Сделать запрос' %}</button>
</div>
@ -196,7 +196,7 @@
<div class="rqob-wrap">
<div class="rqob-price">
{% if service.price %}
{% blocktrans with price=service.price currency=service.currency %}Регистрация {{ price }} {{ currency }}{% endblocktrans %}
{% blocktrans with price=service.price currency=service.get_currency_html %}Регистрация {{ price }} {{ currency }}{% endblocktrans %}
{% else %}
{% trans 'Регистрация 2000 руб.' %}
{% endif %}
@ -206,7 +206,7 @@
{% if price|isdigit %}
{{ price }}{{ object.get_currency_html }}
{% else %}
<span class="small">{{ price }}</span>
<span class="small">{{ price }} <small>({% trans 'билет организатора' %})</small></span>
{% endif %}
{% else %}
<small>{% trans 'билет организатора' %}</small>

Loading…
Cancel
Save