Print templates

Set the paper size, arrange tickets on the sheet, and place the QR code.

@can('create', App\Models\PrintTemplate::class) @endcan
@if($templates->isEmpty())
@can('create', App\Models\PrintTemplate::class) @endcan
@else
@foreach($templates as $template) @php [$pw, $ph] = $template->paperDimensions(); // Scale the thumbnail so the widest sheet fits a 150px box. $scale = 150 / max($pw, $ph); @endphp
{{-- miniature of the sheet --}}
@foreach($template->slotList() as $slot)
@foreach($template->elementList() as $el) @if(($el['type'] ?? '') === 'qr')
@endif @endforeach
@endforeach

{{ $template->name }}

{{ $template->client?->name ?? 'Available to all clients' }}

@if($template->is_default) Default @endif
Paper
{{ $template->paper_size }} {{ ucfirst($template->orientation) }}
Ticket
{{ rtrim(rtrim(number_format($template->ticket_width_mm, 1), '0'), '.') }}×{{ rtrim(rtrim(number_format($template->ticket_height_mm, 1), '0'), '.') }}mm
Per sheet
{{ $template->ticketsPerSheet() }}
Used by
{{ $template->events_count }} event{{ $template->events_count === 1 ? '' : 's' }}
@can('update', $template) Design @endcan @can('create', App\Models\PrintTemplate::class) @endcan
@can('update', $template) @unless($template->is_default) @endunless @endcan @can('delete', $template) @endcan
@endforeach
@endif
@error('form_name')

{{ $message }}

@enderror
{{-- What actually gets printed. Drives which elements the new template starts with, so QR-only users have nothing to delete. --}}
@foreach($printModes as $mode) @endforeach
@error('form_print_mode')

{{ $message }}

@enderror
@error('form_paper_size')

{{ $message }}

@enderror
@if($form_paper_size === 'custom')
@error('form_width')

{{ $message }}

@enderror
@error('form_height')

{{ $message }}

@enderror
@endif
@error('form_ticket_width')

{{ $message }}

@enderror
@error('form_ticket_height')

{{ $message }}

@enderror

@if($form_print_mode === 'overlay') Set the ticket size to match one physical ticket on your pre-printed sheet. You will land in the designer with a single QR code to drag and resize into position. @else After saving you land in the designer, where you arrange the tickets on the sheet and position the QR code. @endif