Fix #549 -- Multiple PDF ticket layouts (#938)

- [x] Data model
- [x] CRUD
- [x] Editor
- [x] Migration from old settings
- [x] Clone files when copying events
  - [x] badges?
- [x] Actual ticket output
- [x] Default layout on event creation
- [x] Link well from ticketing settings
- [x] Tests
- [x] Shipping plugin
  - [x] Migration
  - [x] Settings
  - [x] Create default
- [x] API
This commit is contained in:
Raphael Michel
2018-06-06 15:27:55 +02:00
committed by GitHub
parent 72661623f3
commit e3450baeb3
29 changed files with 1302 additions and 36 deletions

View File

@@ -225,8 +225,11 @@ class Renderer:
qr_y = float(o['bottom']) * mm
renderPDF.draw(d, canvas, qr_x, qr_y)
def _get_ev(self, op, order):
return op.subevent or order.event
def _get_text_content(self, op: OrderPosition, order: Order, o: dict):
ev = op.subevent or order.event
ev = self._get_ev(op, order)
if not o['content']:
return '(error)'
if o['content'] == 'other':