This commit is contained in:
parent
c7319f2c3c
commit
ba91b0d520
|
@ -49,7 +49,9 @@
|
|||
{% if event.main_list_full %}
|
||||
<span class="full tag">{% trans "Full" %}</span>
|
||||
{% endif %}
|
||||
{% if event.check_locked %}
|
||||
{% if event.invoiced %}
|
||||
<span class="invoiced tag">{% trans "Invoiced" %}</span>
|
||||
{% elif event.check_locked %}
|
||||
<span class="check-locked tag">{% trans "Check locked" %}</span>
|
||||
{% endif %}
|
||||
{% if event.checked %}
|
||||
|
|
|
@ -27,7 +27,11 @@
|
|||
<div class="event-title-meta">
|
||||
{% if event.cancellation_status %}<span class="tag">{{ event.cancellation_status }}</span>{% endif %}
|
||||
{% if event.main_list_full %}<span class="tag">{% trans "Full" %}</span>{% endif %}
|
||||
{% if event.check_locked %}<span class="check-locked tag">{% trans "Check locked" %}</span>{% endif %}
|
||||
{% if event.invoiced %}
|
||||
<span class="invoiced tag">{% trans "Invoiced" %}</span>
|
||||
{% elif event.check_locked %}
|
||||
<span class="check-locked tag">{% trans "Check locked" %}</span>
|
||||
{% endif %}
|
||||
{% if event.checked %}<span class="checked tag">{% trans "Checked" %}</span>{% endif %}
|
||||
{% if event.is_day_past and not event.cancelled %}
|
||||
{% if event.present_count %}<span class="meta meta-success">{% blocktrans with count=event.present_count %}Presents {{ count }}{% endblocktrans %}</span>{% endif %}
|
||||
|
|
|
@ -1717,6 +1717,7 @@ def test_event_checked(app, admin_user):
|
|||
resp = app.get(url)
|
||||
assert '<span class="checked tag">Checked</span>' not in resp
|
||||
assert 'check-locked' not in resp
|
||||
assert 'invoiced' not in resp
|
||||
assert '<span class="meta meta-success">Presents 3</span>' in resp
|
||||
assert '<span class="meta meta-error">Absents 4</span>' in resp
|
||||
assert '<span class="meta meta-disabled">Not checked 1</span>' in resp
|
||||
|
@ -1738,6 +1739,7 @@ def test_event_checked(app, admin_user):
|
|||
resp = app.get(url)
|
||||
assert '<span class="checked tag">Checked</span>' in resp
|
||||
assert 'check-locked' not in resp
|
||||
assert 'invoiced' not in resp
|
||||
assert '<span class="meta meta-success">Presents 4</span>' in resp
|
||||
assert '<span class="meta meta-error">Absents 4</span>' in resp
|
||||
assert 'meta meta-disabled' not in resp
|
||||
|
@ -1780,12 +1782,21 @@ def test_event_checked(app, admin_user):
|
|||
for url in urls:
|
||||
resp = app.get(url)
|
||||
assert '<span class="check-locked tag">Check locked</span>' in resp
|
||||
assert 'invoiced' not in resp
|
||||
app.post(
|
||||
'/manage/agendas/%s/events/%s/checked' % (agenda.pk, event.pk),
|
||||
params={'csrfmiddlewaretoken': token},
|
||||
status=404,
|
||||
)
|
||||
|
||||
# event check is locked and envent is invoiced
|
||||
event.invoiced = True
|
||||
event.save()
|
||||
for url in urls:
|
||||
resp = app.get(url)
|
||||
assert 'check-locked' not in resp
|
||||
assert '<span class="invoiced tag">Invoiced</span>' in resp
|
||||
|
||||
|
||||
@mock.patch('chrono.manager.forms.get_agenda_check_types')
|
||||
def test_event_check_filters(check_types, app, admin_user):
|
||||
|
|
Loading…
Reference in New Issue