Widget: label button in event-list with "More info“ when availability is unknown (Z#23135197) (#3715)

* Widget: show "more info“ for unknown availability

* fix localization

Co-authored-by: Raphael Michel <michel@rami.io>

* fix tests

---------

Co-authored-by: Raphael Michel <michel@rami.io>
This commit is contained in:
Richard Schreiber
2023-11-13 18:15:18 +01:00
committed by GitHub
parent 1d5a8a5948
commit 0d82c3703d
2 changed files with 13 additions and 13 deletions

View File

@@ -611,9 +611,9 @@ class WidgetCartTest(CartTestMixin, TestCase):
'poweredby': '<a href="https://pretix.eu" target="_blank" rel="noopener">ticketing powered by pretix</a>',
'has_more_events': False,
'events': [
{'name': 'Present', 'date_range': 'Jan. 1, 2019 11:00', 'availability': {'color': 'none', 'text': '', 'reason': 'unknown'},
{'name': 'Present', 'date_range': 'Jan. 1, 2019 11:00', 'availability': {'color': 'none', 'text': 'More info', 'reason': 'unknown'},
'event_url': 'http://example.com/ccc/30c3/', 'subevent': se1.pk, 'location': ''},
{'name': 'Future', 'date_range': 'Jan. 4, 2019 11:00', 'availability': {'color': 'none', 'text': '', 'reason': 'unknown'},
{'name': 'Future', 'date_range': 'Jan. 4, 2019 11:00', 'availability': {'color': 'none', 'text': 'More info', 'reason': 'unknown'},
'event_url': 'http://example.com/ccc/30c3/', 'subevent': se2.pk, 'location': ''}
]
}
@@ -645,14 +645,14 @@ class WidgetCartTest(CartTestMixin, TestCase):
{'day': 1, 'date': '2019-01-01', 'events': [
{'name': 'Present', 'time': '11:00', 'continued': False, 'date_range': 'Jan. 1, 2019 11:00',
'location': '',
'availability': {'color': 'none', 'text': '', 'reason': 'unknown'},
'availability': {'color': 'none', 'text': 'More info', 'reason': 'unknown'},
'event_url': 'http://example.com/ccc/30c3/', 'subevent': se1.pk}]},
{'day': 2, 'date': '2019-01-02', 'events': []},
{'day': 3, 'date': '2019-01-03', 'events': []},
{'day': 4, 'date': '2019-01-04', 'events': [
{'name': 'Future', 'time': '11:00', 'continued': False, 'date_range': 'Jan. 4, 2019 11:00',
'location': '',
'availability': {'color': 'none', 'text': '', 'reason': 'unknown'},
'availability': {'color': 'none', 'text': 'More info', 'reason': 'unknown'},
'event_url': 'http://example.com/ccc/30c3/', 'subevent': se2.pk}]},
{'day': 5, 'date': '2019-01-05', 'events': []},
{'day': 6, 'date': '2019-01-06', 'events': []}
@@ -720,14 +720,14 @@ class WidgetCartTest(CartTestMixin, TestCase):
{'day_formatted': 'Tue, Jan 1st', 'date': '2019-01-01', 'events': [
{'name': 'Present', 'time': '11:00', 'continued': False, 'date_range': 'Jan. 1, 2019 11:00',
'location': '',
'availability': {'color': 'none', 'text': '', 'reason': 'unknown'},
'availability': {'color': 'none', 'text': 'More info', 'reason': 'unknown'},
'event_url': 'http://example.com/ccc/30c3/', 'subevent': se1.pk}], 'today': True},
{'day_formatted': 'Wed, Jan 2nd', 'date': '2019-01-02', 'events': [], 'today': False},
{'day_formatted': 'Thu, Jan 3rd', 'date': '2019-01-03', 'events': [], 'today': False},
{'day_formatted': 'Fri, Jan 4th', 'date': '2019-01-04', 'events': [
{'name': 'Future', 'time': '11:00', 'continued': False, 'date_range': 'Jan. 4, 2019 11:00',
'location': '',
'availability': {'color': 'none', 'text': '', 'reason': 'unknown'},
'availability': {'color': 'none', 'text': 'More info', 'reason': 'unknown'},
'event_url': 'http://example.com/ccc/30c3/', 'subevent': se2.pk}], 'today': False},
{'day_formatted': 'Sat, Jan 5th', 'date': '2019-01-05', 'events': [], 'today': False},
{'day_formatted': 'Sun, Jan 6th', 'date': '2019-01-06', 'events': [], 'today': False}
@@ -761,12 +761,12 @@ class WidgetCartTest(CartTestMixin, TestCase):
'event_url': 'http://example.com/ccc/30c3/',
'location': '',
'name': '30C3'},
{'availability': {'color': 'none', 'text': '', 'reason': 'unknown'},
{'availability': {'color': 'none', 'text': 'More info', 'reason': 'unknown'},
'date_range': 'Jan. 1, 2019 10:00',
'location': '',
'event_url': 'http://example.com/ccc/present/',
'name': 'Present'},
{'availability': {'color': 'none', 'text': '', 'reason': 'unknown'},
{'availability': {'color': 'none', 'text': 'More info', 'reason': 'unknown'},
'date_range': 'Jan. 4, 2019 10:00',
'location': '',
'event_url': 'http://example.com/ccc/future/',
@@ -866,7 +866,7 @@ class WidgetCartTest(CartTestMixin, TestCase):
[None,
{'date': '2019-01-01',
'day': 1,
'events': [{'availability': {'color': 'none', 'text': '', 'reason': 'unknown'},
'events': [{'availability': {'color': 'none', 'text': 'More info', 'reason': 'unknown'},
'continued': False,
'date_range': 'Jan. 1, 2019 10:00',
'event_url': 'http://example.com/ccc/present/',
@@ -874,7 +874,7 @@ class WidgetCartTest(CartTestMixin, TestCase):
'location': '',
'subevent': None,
'time': '10:00'},
{'availability': {'color': 'none', 'text': '', 'reason': 'unknown'},
{'availability': {'color': 'none', 'text': 'More info', 'reason': 'unknown'},
'continued': False,
'date_range': 'Jan. 1, 2019 11:00',
'event_url': 'http://example.com/ccc/30c3/',
@@ -886,7 +886,7 @@ class WidgetCartTest(CartTestMixin, TestCase):
{'date': '2019-01-03', 'day': 3, 'events': []},
{'date': '2019-01-04',
'day': 4,
'events': [{'availability': {'color': 'none', 'text': '', 'reason': 'unknown'},
'events': [{'availability': {'color': 'none', 'text': 'More info', 'reason': 'unknown'},
'continued': False,
'date_range': 'Jan. 4, 2019 10:00',
'event_url': 'http://example.com/ccc/future/',
@@ -894,7 +894,7 @@ class WidgetCartTest(CartTestMixin, TestCase):
'location': '',
'subevent': None,
'time': '10:00'},
{'availability': {'color': 'none', 'text': '', 'reason': 'unknown'},
{'availability': {'color': 'none', 'text': 'More info', 'reason': 'unknown'},
'continued': False,
'date_range': 'Jan. 4, 2019 11:00',
'event_url': 'http://example.com/ccc/30c3/',