sto 3a8517e637
Some checks failed
CI / scan_ruby (push) Failing after 11m23s
CI / scan_js (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
Show messages on contest management view
2025-05-11 21:22:19 +02:00

97 lines
2.6 KiB
Plaintext

.row.mb-4
.col
css:
.badges { margin-top: -18px; position: absolute; }
.badges
- @badges.each do |badge|
span.badge.text-bg-info.me-2
= badge
.row.mb-4
.col
.float-end
a.btn.btn-primary href=edit_contest_path(@contest)
| Edit contest
p
= t("contests.show.public_scoreboard")
= link_to root_url + "public/#{@contest.slug}", root_url + "public/#{@contest.slug}"
.row.mb-4
.col-6
.row
.col
h4 = t("puzzles.plural").capitalize
table.table.table-striped.table-hover
thead
tr
th scope="col"
| Image
th scope="col"
| Title
th scope="col"
| Brand
tbody
- @puzzles.each do |puzzle|
tr.align-middle scope="row"
td
= image_tag(puzzle.image, class: "img-fluid", style: "max-width: 140px;") if puzzle.image.attached?
td
= puzzle.name
td
= puzzle.brand
td
a.btn.btn-sm.btn-secondary href=edit_contest_puzzle_path(@contest, puzzle)
| Edit
.row
.col
a.btn.btn-primary href=new_contest_puzzle_path(@contest)
= t("contests.show.add_puzzle")
- if @messages
.row.mt-5
.col
h4 = t("messages.plural").capitalize
table.table.table-striped.table-hover
thead
tr
th scope="col"
| Time
th scope="col"
| Text
tbody
- @messages.each do |message|
tr.align-middle scope="row"
td
= message.time_seconds
td
= message.text
td
a.btn.btn-sm.btn-danger href=""
| Delete
.col-6
.row
.col
h4 = t("contestants.plural").capitalize
table.table.table-striped.table-hover
thead
tr
th scope="col"
| Name
th scope="col"
| Completed puzzles
tbody
- @contestants.each do |contestant|
tr scope="row"
td
= contestant.name
td
= contestant.completions.length
td
a.btn.btn-sm.btn-secondary href=edit_contest_contestant_path(@contest, contestant)
| Open
a.btn.btn-sm.btn-secondary.ms-2 href=new_contest_completion_path(@contest, contestant_id: contestant.id)
| Add completion
.row.mt-4
.col
a.btn.btn-primary href=new_contest_contestant_path(@contest)
= t("contests.show.add_participant")