mirror of
https://github.com/pretix/pretix.git
synced 2026-11-24 03:31:55 +00:00
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
95890587b9 | ||
|
|
ebfb8b8936 | ||
|
|
7a8fb6d6e1 |
No files matched your search
@@ -9,7 +9,11 @@
|
||||
<h3><span class="fa fa-fw" aria-hidden="true"></span> <time datetime="{{ day.date|date_fast:"Y-m-d" }}">{{ day.day_formatted }}</time></h3>
|
||||
</summary>
|
||||
<ul class="events">
|
||||
{% for event in day.events %}
|
||||
{% for grp in day.events %}
|
||||
<li class="events-group">
|
||||
<strong>{{grp.0}}</strong>
|
||||
<ul class="list-unstyled">
|
||||
{% for event in grp.1 %}
|
||||
<li><a class="event {% if event.continued %}continued{% endif %} {% spaceless %}
|
||||
{% if event.event.presale_is_running and show_avail %}
|
||||
{% if event.event.best_availability_state == 100 %}
|
||||
@@ -32,7 +36,7 @@
|
||||
{% endif %}
|
||||
{% endspaceless %}"
|
||||
href="{{ event.url }}">
|
||||
{% if show_names|default_if_none:True %}
|
||||
{% if False %}
|
||||
<span class="event-name">
|
||||
{{ event.event.name }}
|
||||
{% if event.continued %} <i class="event-name-continued">{% trans "(continued)" %}</i>{% endif %}
|
||||
@@ -56,12 +60,6 @@
|
||||
{% if event.event.best_availability_state == 100 %}
|
||||
{% if event.event.best_availability_is_low %}
|
||||
<span class="fa fa-exclamation-circle" aria-hidden="true"></span> {% trans "Few tickets left" %}
|
||||
{% else %}
|
||||
{% if event.event.has_paid_item %}
|
||||
<span class="fa fa-ticket" aria-hidden="true"></span> {% trans "Buy now" context "available_event_in_list" %}
|
||||
{% else %}
|
||||
<span class="fa fa-ticket" aria-hidden="true"></span> {% trans "Book now" %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% elif event.event.waiting_list_active and event.event.best_availability_state >= 0 %}
|
||||
<span class="fa fa-ticket" aria-hidden="true"></span> {% trans "Waiting list" %}
|
||||
@@ -91,6 +89,8 @@
|
||||
{% endif %}
|
||||
</a></li>
|
||||
{% endfor %}
|
||||
</ul></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</details>
|
||||
{% endfor %}
|
||||
|
||||
@@ -38,6 +38,7 @@ import operator
|
||||
from collections import defaultdict
|
||||
from datetime import date, datetime, time, timedelta
|
||||
from functools import reduce
|
||||
from itertools import groupby
|
||||
from urllib.parse import quote, urlencode
|
||||
from zoneinfo import ZoneInfo
|
||||
|
||||
@@ -721,7 +722,7 @@ def add_subevents_for_days(qs, before, after, ebd, timezones, sales_channel, eve
|
||||
|
||||
|
||||
def sort_ev(e):
|
||||
return e['time'] or time(0, 0, 0), str(e['event'].name)
|
||||
return str(e['event'].name), e['time'] or time(0, 0, 0)
|
||||
|
||||
|
||||
def days_for_template(ebd, week, future_only=False):
|
||||
@@ -733,7 +734,7 @@ def days_for_template(ebd, week, future_only=False):
|
||||
'day_formatted': date_format(day, day_format),
|
||||
'date': day,
|
||||
'today': day == now().astimezone(get_current_timezone()).date(),
|
||||
'events': sorted(ebd.get(day), key=sort_ev) if day in ebd else []
|
||||
'events': [(a, list(b)) for a, b in groupby(sorted(ebd.get(day), key=sort_ev) if day in ebd else [], key=lambda e: str(e["event"].name))],
|
||||
}
|
||||
for day in week.days()
|
||||
if not future_only or day >= now().astimezone(get_current_timezone()).date()
|
||||
|
||||
@@ -46,6 +46,42 @@
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin-bottom: 0;
|
||||
li.events-group {
|
||||
font-size: 12px;
|
||||
margin: 2px 0;
|
||||
strong {
|
||||
border-top-left-radius: $border-radius-base;
|
||||
border-top-right-radius: $border-radius-base;
|
||||
display: block;
|
||||
background-color: #e5e5e5;
|
||||
border: 1px solid #e5e5e5;
|
||||
padding: 3px 5px 3px 5px;
|
||||
margin-bottom: 2px;
|
||||
/*border-left: 5px solid #999;*/
|
||||
}
|
||||
a.event:before {
|
||||
width: 5px;
|
||||
}
|
||||
a.event {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
padding: 3px 5px 3px 10px;
|
||||
}
|
||||
a.event:hover {
|
||||
background: var(--status-border-color);
|
||||
color: white;
|
||||
}
|
||||
li:last-child a.event {
|
||||
border-bottom-left-radius: $border-radius-base;
|
||||
border-bottom-right-radius: $border-radius-base;
|
||||
}
|
||||
li:last-child a.event:before {
|
||||
border-bottom-left-radius: $border-radius-base;
|
||||
}
|
||||
}
|
||||
li.events-group:not(:first-child) {
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
a.event {
|
||||
--status-bg-color: var(--pretix-brand-primary-tint-90);
|
||||
|
||||
Reference in new issue
Block a user