69 lines
1.9 KiB
Plaintext
69 lines
1.9 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
|
|
|> Public scoreboard:
|
|
= link_to root_url + "public/#{@contest.slug}", root_url + "public/#{@contest.slug}"
|
|
|
|
.row.mb-4
|
|
.col-6
|
|
.row
|
|
.col
|
|
h4
|
|
| Puzzles
|
|
.row.row-cols-1.row-cols-md-3.g-4.mb-4
|
|
- @puzzles.each do |puzzle|
|
|
.col
|
|
css:
|
|
.card:hover { background-color: lightblue; }
|
|
.card.h-100
|
|
.card-header
|
|
= puzzle.name
|
|
= image_tag puzzle.image if puzzle.image.attached?
|
|
.card-body
|
|
p.card-text
|
|
= puzzle.brand
|
|
a.stretched-link href=edit_contest_puzzle_path(@contest, puzzle)
|
|
.row
|
|
.col
|
|
a.btn.btn-primary href=new_contest_puzzle_path(@contest)
|
|
| Add puzzle
|
|
.col-6
|
|
.row
|
|
.col
|
|
h4 = t("contests.show.contestants")
|
|
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")
|