Shared scoreboard: extend UI for marathons
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / scan_js (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled

This commit is contained in:
sto
2026-07-31 13:29:23 +02:00
parent 8a003a9731
commit 77b4e06151
5 changed files with 5 additions and 5 deletions

View File

@@ -10,7 +10,7 @@ module ContestantsConcern
contestant.time_seconds
] }
elsif contest.ranking_mode == "theorical"
contest.contestants.sort_by { |contestant| contestant.completions.map { |completion| completion.projected_time }.sum }
contest.contestants.includes([ :completions, :offline ]).sort_by { |contestant| contestant.completions.map { |completion| completion.projected_time }.sum }
end
end
end

View File

@@ -211,7 +211,7 @@ class ContestsController < ApplicationController
if params.key?(:autorefresh)
@autorefresh = true
end
@puzzles = @contest.puzzles.where(hidden: false).or(@contest.puzzles.where(hidden: nil)).order(:id)
@puzzles = @contest.puzzles.where(hidden: false).or(@contest.puzzles.where(hidden: nil)).includes([ :image_attachment ]).order(:id)
@action_path = "/public/#{@contest.friendly_id}"
@space = " "
render :scoreboard

View File

@@ -1,4 +1,4 @@
.d-flex.flex-column style="height: calc(100vh - 180px)"
.d-flex.flex-column style="height: calc(100vh - 210px); width: 100%;"
= render "selectors"

View File

@@ -1,5 +1,5 @@
.row style="width: 100%;"
.mt-3.col-6.d-flex.flex-column style="height: calc(100vh - 260px)"
.col-6.d-flex.flex-column style="height: calc(100vh - 260px); margin-top: #{active_page("/public/event/") == "active" ? "0" : "1rem"};"
.d-flex.flex-column style="overflow-y: auto"
table.table.table-striped.table-hover
thead

View File

@@ -3,7 +3,7 @@ html
= render "layouts/header"
body
.container.mt-5
.container style="margin-top: 3rem !important;"
- if @current_user
.float-end style="margin-top: -5px;"
nav.navbar.bg-body-primary