Reusable media (#3131)

Co-authored-by: Martin Gross <gross@rami.io>
This commit is contained in:
Raphael Michel
2023-04-03 10:45:22 +02:00
committed by GitHub
parent 377117548d
commit d0b449ea89
67 changed files with 2876 additions and 133 deletions

View File

@@ -455,6 +455,11 @@ DEFAULT_VARIABLES = OrderedDict((
"TIME_FORMAT"
) if op.valid_until else ""
}),
("medium_identifier", {
"label": _("Reusable Medium ID"),
"editor_sample": _("ABC1234DEF4567"),
"evaluate": lambda op, order, ev: op.linked_media.all()[0].identifier if op.linked_media.all() else "",
}),
("seat", {
"label": _("Seat: Full name"),
"editor_sample": _("Ground floor, Row 3, Seat 4"),
@@ -761,6 +766,9 @@ class Renderer:
else:
content = self._get_text_content(op, order, o)
if len(content) == 0:
return
level = 'H'
if len(content) > 32:
level = 'M'