Shared scoreboard: extend UI for marathons
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user