Files
puzzle-scoreboard/app/views/contestants/generate_qrcodes.html.slim
sto 768af7c3e9
Some checks failed
CI / scan_ruby (push) Failing after 16s
CI / scan_js (push) Successful in 13s
CI / lint (push) Successful in 14s
CI / test (push) Failing after 39s
Remove PDF generation and make HTML one printable
2025-11-24 12:04:08 +01:00

27 lines
1.1 KiB
Plaintext

- if @contest.code.present?
.mb-4 style="height: calc(100vh - 280px)"
.row
.col
.alert.alert-info
= t("contestants.generate_qrcodes.note")
a.mt-3.mb-3.btn.btn-primary href="#{contest_generate_qrcodes_pdf_path(@contest)}" target="_blank" style="margin-top: -3px"
= t("helpers.buttons.open_raw")
.col.d-flex.flex-column style="height: calc(100% - 200px)"
.d-flex.flex-column style="overflow-y: auto;"
- for row in 0..((@contestants.length - 1) / 5)
.mt-4.d-flex.flex-row
- for col in 0..3
- if row * 4 + col < @contestants.length
.d-flex.flex-column.ms-5 style="align-items: center"
- if @contestants[row * 4 + col].qrcode.present?
.mt-1 style="width: 128px; height: 120px;"
= @contestants[row * 4 + col].qrcode.html_safe
.name.text-center.mt-3 style="font-size: 0.7rem; max-width: 128px; height: 30px;"
= @contestants[row * 4 + col].name
- else
.row
.col
.alert.alert-warning
= t("contestants.generate_qrcodes.no_code_note")