{{/* gotype: github.com/cj123/assetto-server-manager.championshipViewTemplateVars */}} {{ define "title" }}{{ .Championship.Name }}{{ end }} {{ define "content" }}
{{ $championship := .Championship }} {{ $entrants := .Championship.AllEntrants }} {{ $writeAccess := WriteAccess }} {{ $eventInProgress := .EventInProgress }} {{ $account := .Account }}

{{ $championship.Name }}

{{ if $championship.SignUpAvailable }}
Register to this Championship
You can register for a place in this Championship! {{ if $championship.SignUpForm.RequiresApproval }} Pending admin approval, you will be added to the grid! {{ end }}
{{ $numPendingSignups := $championship.NumPendingSignUps }} {{ if and WriteAccess (gt $numPendingSignups 0) }}
Registration Request{{ if gt $numPendingSignups 1 }}s{{ end }} pending approval!
There {{ if eq $numPendingSignups 1 }}is{{ else }}are{{ end }} {{ $championship.NumPendingSignUps }} Registration Request{{ if gt $numPendingSignups 1 }}s{{ end }} pending approval! Manage Registration Requests
{{ end }} {{ end }} {{ if gt $championship.Progress 0.0 }}
{{ int $championship.Progress }}%
{{ end }}
{{ if gt $championship.Progress 0.0 }}
{{ if $championship.IsMultiClass }}{{ end }} {{ if $championship.HasTeamNames }} {{ end }} {{ if WriteAccess }} {{ end }} {{ range $classIndex, $class := $championship.Classes }} {{ $entrants := ($class.Standings $championship.Events) }} {{ range $i, $entrant := $entrants }} {{ if $championship.IsMultiClass }} {{ if eq $i 0 }} {{ end }} {{ end }} {{ if $championship.HasTeamNames }} {{ end }} {{ if WriteAccess }} {{ end }} {{ end }} {{ end }}
Class# DriverTeamPointsActions
{{ $class.Name }}{{ add $i 1 }} {{ driverName $entrant.Car.Driver.Name }} {{ $driverPenalty := $class.PenaltyForGUID $entrant.Car.Driver.GUID }} {{ if gt $driverPenalty 0 }} Points Penalty: {{ $driverPenalty }} {{ end }} {{ $entrant.TeamSummary }}{{ $entrant.Points }}
{{ if $championship.IsMultiClass }}{{ end }} {{ if WriteAccess }} {{ end }} {{ range $classIndex, $class := $championship.Classes }} {{ $teamStandings := ($class.TeamStandings $championship.Events) }} {{ range $i, $team := $teamStandings }} {{ if $championship.IsMultiClass }} {{ if eq $i 0 }} {{ end }} {{ end }} {{ if WriteAccess }} {{ end }} {{ end }} {{ end }}
Class# Team PointsActions
{{ $class.Name }}{{ add $i 1 }} {{ $team.Team }} {{ $teamPenalty := $class.PenaltyForTeam $team.Team }} {{ if gt $teamPenalty 0 }} Points Penalty: {{ $teamPenalty }} {{ end }} {{ $team.Points }}
{{ end }}
{{ if $championship.IsMultiClass }}{{ end }} {{ if $championship.HasTeamNames }} {{ end }} {{ range $classIndex, $class := $championship.Classes }} {{ $entrants := $class.Entrants.PrettyList }} {{ range $i, $entrant := $entrants }} {{ if ne $entrant.GUID "OPEN_SLOTS" }} {{ if $championship.IsMultiClass }} {{ if eq $i 0 }} {{ end }} {{ end }} {{ if $championship.HasTeamNames }} {{ end }} {{ else }} {{ if $championship.OpenEntrants }} {{ if $championship.IsMultiClass }} {{ end }} {{ end }} {{ end }} {{ end }} {{ end }}
Class# DriverTeamCar Attendance
{{ $class.Name }}{{ add $i 1 }} {{ driverName $entrant.Name }}{{ $entrant.Team }}{{ prettify $entrant.Model true }} / {{ prettify $entrant.Skin false }} {{ $championship.EntrantAttendance $entrant.GUID }} / {{ $championship.NumCompletedEvents }}
{{ $class.Name }} {{ $entrant.Name }}
{{ if $championship.IsMultiClass }}{{ end }} {{ range $classIndex, $class := $championship.Classes }} {{ range $i, $pts := $class.Points.Places }} {{ if $championship.IsMultiClass }} {{ if eq $i 0 }} {{ end }} {{ end }} {{ end }} {{ end }}
ClassPlace Points
{{ $class.Name }}{{ add $i 1 }}{{ ordinal (add $i 1) }} {{ $pts }}
Fastest Race Lap {{ $class.Points.BestLap }}
Best Qualifying Lap {{ $class.Points.PolePosition }}
Collision with Other Car -{{ $class.Points.CollisionWithDriver }}
Collision with Environment -{{ $class.Points.CollisionWithEnv }}
Cut Track -{{ $class.Points.CutTrack }}
Second Race Points Multiplier {{ $class.Points.SecondRaceMultiplier }}
{{ if gt $championship.Progress 0.0 }}
{{ range $classIndex, $class := $championship.Classes }} {{ $entrants := ($class.Standings $championship.Events) }} {{ range $i, $entrant := $entrants }}
Car Skin
{{ if $championship.IsMultiClass }} {{ $class.Name }}
{{ end }} {{ add $i 1 }}{{ ordinal (add $i 1) }} Place

{{ driverName $entrant.Car.Driver.Name }}
{{ $entrant.Car.Driver.Team }}

{{ end }} {{ end }}
{{ end }}
{{ with $championship.Info }}
{{ $championship.Info }}


{{ end }}
{{ if $writeAccess }} Add more Events Add a Race Weekend {{ end }}

Events

This Championship currently has {{ len $championship.Events }} events configured.

{{ range $eventIndex, $event := $championship.Events }} {{ if not $event.IsRaceWeekend }} {{ template "event-card" dict "Championship" $championship "Event" $event "EventIndex" $eventIndex "EventInProgress" $eventInProgress "Account" $account }} {{ else }} {{ template "raceweekend-card" dict "Championship" $championship "Event" $event "EventIndex" $eventIndex "EventInProgress" $eventInProgress "Account" $account "RaceWeekend" (index $.RaceWeekends $event.RaceWeekendID) }} {{ end }} {{ end }}
{{ end }}