mirror of
https://github.com/pretix/pretix.git
synced 2025-12-12 04:42:28 +00:00
Compare commits
3 Commits
csv-duplic
...
show-curre
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8d5dc4cd54 | ||
|
|
eb10134e1f | ||
|
|
2210e49c8c |
@@ -3,6 +3,8 @@
|
|||||||
{% load eventurl %}
|
{% load eventurl %}
|
||||||
{% load money %}
|
{% load money %}
|
||||||
{% load thumb %}
|
{% load thumb %}
|
||||||
|
{% load icon %}
|
||||||
|
{% load getitem %}
|
||||||
{% load eventsignal %}
|
{% load eventsignal %}
|
||||||
{% load rich_text %}
|
{% load rich_text %}
|
||||||
{% for tup in items_by_category %}{% with category=tup.0 items=tup.1 form_prefix=tup.2 %}
|
{% for tup in items_by_category %}{% with category=tup.0 items=tup.1 form_prefix=tup.2 %}
|
||||||
@@ -43,7 +45,9 @@
|
|||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="product-description {% if item.picture %}with-picture{% endif %}">
|
<div class="product-description {% if item.picture %}with-picture{% endif %}">
|
||||||
<h{{ headline_level|default:3|add:1 }} class="h4" id="{{ form_prefix }}item-{{ item.pk }}-legend">{{ item.name }}</h{{ headline_level|default:3|add:1 }}>
|
<h{{ headline_level|default:3|add:1 }} class="h4" id="{{ form_prefix }}item-{{ item.pk }}-legend">
|
||||||
|
{{ item.name }}
|
||||||
|
</h{{ headline_level|default:3|add:1 }}>
|
||||||
{% if item.description %}
|
{% if item.description %}
|
||||||
<div id="{{ form_prefix }}item-{{ item.pk }}-description" class="product-description">
|
<div id="{{ form_prefix }}item-{{ item.pk }}-description" class="product-description">
|
||||||
{{ item.description|localize|rich_text }}
|
{{ item.description|localize|rich_text }}
|
||||||
@@ -119,7 +123,19 @@
|
|||||||
data-price="{% if event.settings.display_net_prices %}{{ var.display_price.net|unlocalize }}{% else %}{{ var.display_price.gross|unlocalize }}{% endif %}"
|
data-price="{% if event.settings.display_net_prices %}{{ var.display_price.net|unlocalize }}{% else %}{{ var.display_price.gross|unlocalize }}{% endif %}"
|
||||||
{% endif %}>
|
{% endif %}>
|
||||||
<div class="col-md-8 col-sm-6 col-xs-12">
|
<div class="col-md-8 col-sm-6 col-xs-12">
|
||||||
<h{{ headline_level|default:3|add:2 }} class="h5" id="{{ form_prefix }}item-{{ item.pk }}-{{ var.pk }}-legend">{{ var }}</h{{ headline_level|default:3|add:2 }}>
|
<h{{ headline_level|default:3|add:2 }} class="h5" id="{{ form_prefix }}item-{{ item.pk }}-{{ var.pk }}-legend">
|
||||||
|
{{ var }}
|
||||||
|
{% if cart.itemvarsums|getitem:var %}
|
||||||
|
<span class="textbubble-success">
|
||||||
|
{% icon "shopping-cart" %}
|
||||||
|
{% blocktrans trimmed count amount=cart.itemvarsums|getitem:var %}
|
||||||
|
{{ amount }}× in your cart
|
||||||
|
{% plural %}
|
||||||
|
{{ amount }}× in your cart
|
||||||
|
{% endblocktrans %}
|
||||||
|
</span>
|
||||||
|
{% endif %}
|
||||||
|
</h{{ headline_level|default:3|add:2 }}>
|
||||||
{% if var.description %}
|
{% if var.description %}
|
||||||
<div id="{{ form_prefix }}item-{{ item.pk }}-{{ var.pk }}-description" class="variation-description">
|
<div id="{{ form_prefix }}item-{{ item.pk }}-{{ var.pk }}-description" class="variation-description">
|
||||||
{{ var.description|localize|rich_text }}
|
{{ var.description|localize|rich_text }}
|
||||||
@@ -264,7 +280,19 @@
|
|||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="product-description {% if item.picture %}with-picture{% endif %}">
|
<div class="product-description {% if item.picture %}with-picture{% endif %}">
|
||||||
<h{{ headline_level|default:3|add:1 }} class="h4" id="{{ form_prefix }}item-{{ item.pk }}-legend">{{ item.name }}</h{{ headline_level|default:3|add:1 }}>
|
<h{{ headline_level|default:3|add:1 }} class="h4" id="{{ form_prefix }}item-{{ item.pk }}-legend">
|
||||||
|
{{ item.name }}
|
||||||
|
{% if cart.itemvarsums|getitem:item %}
|
||||||
|
<span class="textbubble-success">
|
||||||
|
{% icon "shopping-cart" %}
|
||||||
|
{% blocktrans trimmed count amount=cart.itemvarsums|getitem:item %}
|
||||||
|
{{ amount }}× in your cart
|
||||||
|
{% plural %}
|
||||||
|
{{ amount }}× in your cart
|
||||||
|
{% endblocktrans %}
|
||||||
|
</span>
|
||||||
|
{% endif %}
|
||||||
|
</h{{ headline_level|default:3|add:1 }}>
|
||||||
{% if item.description %}
|
{% if item.description %}
|
||||||
<div id="{{ form_prefix }}item-{{ item.pk }}-description" class="product-description">
|
<div id="{{ form_prefix }}item-{{ item.pk }}-description" class="product-description">
|
||||||
{{ item.description|localize|rich_text }}
|
{{ item.description|localize|rich_text }}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
# License for the specific language governing permissions and limitations under the License.
|
# License for the specific language governing permissions and limitations under the License.
|
||||||
import copy
|
import copy
|
||||||
import warnings
|
import warnings
|
||||||
from collections import defaultdict
|
from collections import Counter, defaultdict
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
@@ -242,6 +242,10 @@ class CartMixin:
|
|||||||
minutes_left = None
|
minutes_left = None
|
||||||
seconds_left = None
|
seconds_left = None
|
||||||
|
|
||||||
|
itemvarsums = Counter()
|
||||||
|
for p in cartpos:
|
||||||
|
itemvarsums[p.variation or p.item] += 1
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'positions': positions,
|
'positions': positions,
|
||||||
'invoice_address': self.invoice_address,
|
'invoice_address': self.invoice_address,
|
||||||
@@ -258,6 +262,7 @@ class CartMixin:
|
|||||||
'max_expiry_extend': max_expiry_extend,
|
'max_expiry_extend': max_expiry_extend,
|
||||||
'is_ordered': bool(order),
|
'is_ordered': bool(order),
|
||||||
'itemcount': sum(c.count for c in positions if not c.addon_to),
|
'itemcount': sum(c.count for c in positions if not c.addon_to),
|
||||||
|
'itemvarsums': itemvarsums,
|
||||||
'current_selected_payments': [
|
'current_selected_payments': [
|
||||||
p for p in self.current_selected_payments(positions, fees, self.invoice_address)
|
p for p in self.current_selected_payments(positions, fees, self.invoice_address)
|
||||||
if p.get('multi_use_supported')
|
if p.get('multi_use_supported')
|
||||||
|
|||||||
@@ -574,6 +574,7 @@ h2 .label {
|
|||||||
|
|
||||||
|
|
||||||
.textbubble-success, .textbubble-success-warning, .textbubble-info, .textbubble-warning, .textbubble-danger {
|
.textbubble-success, .textbubble-success-warning, .textbubble-info, .textbubble-warning, .textbubble-danger {
|
||||||
|
display: inline-block;
|
||||||
padding: 0 .4em;
|
padding: 0 .4em;
|
||||||
border-radius: $border-radius-base;
|
border-radius: $border-radius-base;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|||||||
Reference in New Issue
Block a user