{{/* gotype: github.com/cj123/assetto-server-manager.raceWeekendViewTemplateVars */}} {{ define "title" }}{{ $.RaceWeekend.Name }} Race Weekend{{ end }} {{ define "content" }}

{{ $.RaceWeekend.Name }}

{{ if $.RaceWeekend.HasLinkedChampionship }} A Race Weekend in the {{ $.RaceWeekend.Championship.Name }} Championship {{ else }} A Race Weekend in the following car{{ if gt (len $.RaceWeekend.GetEntryList.CarIDs) 1 }}s{{ end }}: {{ carList ($.RaceWeekend.GetEntryList.CarIDs) }} {{ end }}

{{ if gt $.RaceWeekend.Progress 0.0 }}
{{ int $.RaceWeekend.Progress }}%
{{ end }} {{ template "raceweekend-premium" dict "IsPremium" $.IsPremium }} {{ if not $.RaceWeekend.HasLinkedChampionship }}

Entrants

{{ if $.RaceWeekend.HasTeamNames }} {{ end }} {{ $num := 1 }} {{ range $i, $entrant := $.RaceWeekend.GetEntryList }} {{ if $.RaceWeekend.HasTeamNames }} {{ end }} {{ $num = add $num 1 }} {{ end }}
# DriverTeamCar
{{ $num }} {{ driverName $entrant.Name }}{{ $entrant.Team }}{{ prettify $entrant.Model true }} / {{ prettify $entrant.Skin false }}
{{ end }}
{{ if $.RaceWeekend.HasLinkedChampionship }} View Championship {{ end }} {{ if WriteAccess }} Add more Sessions {{ end }}

Sessions

This Race Weekend has {{ len $.RaceWeekend.Sessions }} sessions. To see how the Results of a Session decide the Entry List of the next Session, click on the arrow between the two Sessions.


{{ $sortedSessions := $.RaceWeekend.SortedSessions }}
Entry List
{{ len $.RaceWeekend.GetEntryList }} Entrants
{{ range $sessionIndex, $session := $sortedSessions }} {{ $raceConfig := $session.RaceConfig }} {{ $trackInfo := trackInfo $raceConfig.Track $raceConfig.TrackLayout }}
{{ $acSession := $session.SessionInfo }} {{ $acSession.Name }}
{{ if ne $acSession.Time 0 }} {{ $acSession.Time }} minutes {{ else }} {{ with $acSession.Laps }} {{ . }} laps {{ end }} {{ end }} - {{ if not ($.RaceWeekend.SessionCanBeRun $session) }} Not available {{ else if $session.Completed }} Complete {{ else if $session.InProgress }} In Progress {{ else }} Ready to Start {{ end }}
{{ with $trackInfo }} {{ .Name }}{{ with .Country }}, {{ . }}{{ end }} {{ else }} {{ prettify $raceConfig.Track false }} {{ with $raceConfig.TrackLayout }}({{ prettify . true }}){{ end }} {{ end }}
{{ if isBefore $session.ScheduledTime }} Scheduled for {{ localFormat $session.ScheduledTime }}
{{ end }}
{{ $raceConfig.Track }} {{ $raceConfig.TrackLayout }}
{{ if $session.Completed }} View Results {{ end }} {{ if WriteAccess }} {{ if not (or $session.InProgress $session.Completed) }} {{ if eq $.IsPremium "true" }} {{ if $.RaceWeekend.SessionCanBeRun $session }} {{ else }} Start Practice Session {{ end }} {{ else }} {{ if $.RaceWeekend.SessionCanBeRun $session }} Start Session {{ end }} {{ end }} {{ if not ($session.HasParent $.RaceWeekend.ID.String) }} Manage Entry List {{ end }} {{ else if $session.InProgress }} Restart Session Cancel Session {{ end }} {{ else }} View Entry List {{ end }}
{{ end }}
{{ if gt (len $sortedSessions) 0 }}

Results

{{ range $sessionIndex, $session := $sortedSessions }}
{{ if $session.Completed }}

View detailed results breakdown for this Session

{{ template "session-overall" dict "sessionResults" $session.Results "account" $.Account }} {{ else if $session.InProgress }}

Session in Progress: Looks like there aren't any results yet. Check back later.

{{ else }}

Awaiting Start: Looks like this session hasn't started yet. Check back later.

{{ end }}
{{ end }}
{{ if $.RaceWeekend.HasLinkedChampionship }}

Points

This Race Weekend is linked to the {{ $.RaceWeekend.Championship.Name }} Championship. You can review the points for each Session below.

{{ range $sessionIndex, $session := $sortedSessions }}
{{ if $.RaceWeekend.Championship.IsMultiClass }}{{ end }} {{ $classIndex := 0 }} {{ range $classID, $points := $session.Points }} {{ $class := $.RaceWeekend.Championship.ClassByID $classID.String }} {{ range $i, $pts := $points.Places }} {{ if $.RaceWeekend.Championship.IsMultiClass }} {{ if eq $i 0 }} {{ end }} {{ end }} {{ end }} {{ $classIndex = add $classIndex 1 }} {{ end }}
ClassPlace Points
{{ $class.Name }}{{ add $i 1 }}{{ ordinal (add $i 1) }} {{ $pts }}
Fastest Race Lap {{ $points.BestLap }}
{{ end }}
{{ end }}
{{ end }} {{ end }}