0001-manager-only-display-events-as-full-when-main-list-i.patch
chrono/agendas/models.py | ||
---|---|---|
776 | 776 |
# label can be empty |
777 | 777 |
return slugify(self.label or ('%s-event' % self.agenda.label)) |
778 | 778 | |
779 |
def main_list_full(self): |
|
780 |
return bool(self.booked_places >= self.places) |
|
781 | ||
779 | 782 |
def check_full(self): |
780 | 783 |
self.full = bool( |
781 | 784 |
(self.booked_places >= self.places and self.waiting_list_places == 0) |
chrono/manager/templates/chrono/manager_events_agenda_month_view.html | ||
---|---|---|
9 | 9 |
<ul class="objects-list single-links"> |
10 | 10 |
{% for event in object_list %} |
11 | 11 |
<li class="{% if event.booked_places_count > event.places %}overbooking{% endif %} |
12 |
{% if event.full %}full{% endif %} |
|
12 |
{% if event.main_list_full %}full{% endif %}
|
|
13 | 13 |
{% if not event.in_bookable_period %}not-{% endif %}bookable" |
14 | 14 |
{% if event.places %} |
15 | 15 |
data-total="{{event.places}}" data-booked="{{event.booked_places_count}}" |
... | ... | |
17 | 17 |
data-total="{{event.waiting_list_places}}" data-booked="{{event.waiting_list_count}}" |
18 | 18 |
{% endif %} |
19 | 19 |
><a href="{% url 'chrono-manager-event-view' pk=agenda.id event_pk=event.id %}"> |
20 |
{% if event.full %}<span class="full tag">{% trans "Full" %}</span>{% endif %} |
|
20 |
{% if event.main_list_full %}<span class="full tag">{% trans "Full" %}</span>{% endif %}
|
|
21 | 21 |
{% if event.label %}{{event.label}} / {% endif %} |
22 | 22 |
{{ event.start_datetime }} |
23 | 23 |
( |
24 |
- |