Files
puzzle-scoreboard/app/views/users/index.html.slim
sto d59090cded
Some checks failed
CI / scan_ruby (push) Failing after 21s
CI / scan_js (push) Successful in 14s
CI / lint (push) Successful in 14s
CI / test (push) Failing after 32s
Improve admin UI
2025-11-22 09:06:10 +01:00

37 lines
968 B
Plaintext

.row
.d-flex.flex-row.justify-content-start.align-items-center
a.btn.btn-primary href=new_user_path
| New user
= button_to "Update contestants", "/update_contestants", method: :post, class: "ms-3 btn btn-success"
= button_to "Regenerate QR codes", "/regenerate_qrcodes", method: :post, class: "ms-3 btn btn-success"
- @users.each do |user|
- if user.admin
h3.mt-5 = "#{user.username} (admin)"
- else
h3.mt-5 = user.username
table.table.table-striped.table-hover
thead
tr
th scope="col"
| ID
th scope="col"
| Friendly ID
th scope="col"
| # Puzzles
th scope="col"
| # Participants
tbody
- user.contests.each do |contest|
tr scope="row"
td
= contest.id
td
= contest.friendly_id
td
= contest.puzzles.length
td
= contest.contestants.length