mirror of
https://github.com/pretix/pretix.git
synced 2026-05-07 15:34:02 +00:00
Consistent display of price ranges
This commit is contained in:
@@ -50,7 +50,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2 col-xs-6 price">
|
<div class="col-md-2 col-xs-6 price">
|
||||||
{% if item.min_price != item.max_price or item.free_price %}
|
{% if item.free_price %}
|
||||||
|
{% blocktrans trimmed with price=item.min_price|money:event.currency %}
|
||||||
|
from {{ price }}
|
||||||
|
{% endblocktrans %}
|
||||||
|
{% elif item.min_price != item.max_price %}
|
||||||
{{ item.min_price|money:event.currency }} – {{ item.max_price|money:event.currency }}
|
{{ item.min_price|money:event.currency }} – {{ item.max_price|money:event.currency }}
|
||||||
{% elif not item.min_price and not item.max_price %}
|
{% elif not item.min_price and not item.max_price %}
|
||||||
{% trans "FREE" context "price" %}
|
{% trans "FREE" context "price" %}
|
||||||
|
|||||||
@@ -421,11 +421,14 @@ Vue.component('item', {
|
|||||||
return this.item.has_variations && !this.$root.show_variations_expanded;
|
return this.item.has_variations && !this.$root.show_variations_expanded;
|
||||||
},
|
},
|
||||||
pricerange: function () {
|
pricerange: function () {
|
||||||
if (this.item.min_price !== this.item.max_price || this.item.free_price) {
|
if (this.item.free_price) {
|
||||||
return django.interpolate(strings.price_from, {
|
return django.interpolate(strings.price_from, {
|
||||||
'currency': this.$root.currency,
|
'currency': this.$root.currency,
|
||||||
'price': floatformat(this.item.min_price, 2)
|
'price': floatformat(this.item.min_price, 2)
|
||||||
}, true);
|
}, true);
|
||||||
|
} else if (this.item.min_price !== this.item.max_price) {
|
||||||
|
return this.$root.currency + " " + floatformat(this.item.min_price, 2) + " – "
|
||||||
|
+ floatformat(this.item.max_price, 2);
|
||||||
} else if (this.item.min_price === "0.00" && this.item.max_price === "0.00") {
|
} else if (this.item.min_price === "0.00" && this.item.max_price === "0.00") {
|
||||||
return strings.free;
|
return strings.free;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user