{{ define "raceweekend-card" }} {{ $championship := $.Championship }} {{ $event := $.Event }} {{ $eventIndex := $.EventIndex }} {{ $eventInProgress := $.EventInProgress }} {{ $account := $.Account }} {{ $raceWeekend := $.RaceWeekend }} {{ $eventSetup := $event.RaceSetup }}
{{ $raceWeekend.Name }} Race Weekend at {{ $raceWeekend.TrackOverview }}
{{ if $raceWeekend.Completed }} Complete {{ else if (gt $raceWeekend.Progress 0.0) }} {{ printf "%2.f" $raceWeekend.Progress }}% Complete {{ else }} Not started {{ end }}
    {{ range $sessionIndex, $session := $raceWeekend.Sessions }}
  • {{ $session.Name }} at {{ $trackInfo := trackInfo $session.RaceConfig.Track $session.RaceConfig.TrackLayout }} {{ with $trackInfo }} {{ .Name }} {{ else }} {{ prettify $eventSetup.Track false }} {{ with $eventSetup.TrackLayout }}({{ prettify . true }}){{ end }} {{ end }} {{ if ne $session.Name $session.SessionType.String }}({{ $session.SessionType }}){{ end }} - {{ if gt $session.SessionInfo.Laps 0 }} {{ $session.SessionInfo.Laps }} Laps {{ else }} {{ $session.SessionInfo.Time }} minutes {{ end }}
  • {{ end }}
{{/* race controls buttons */}}
This is a Race Weekend. You must go to the Race Weekend page to manage Championship Race Weekends.
{{ if $raceWeekend.Completed }} {{ end }} View{{ if WriteAccess }}/Edit{{ end }} Race Weekend {{ if DeleteAccess }} Delete Race Weekend {{ end }}
{{ if gt (len $raceWeekend.Sessions) 0 }} {{ $setup := (index $raceWeekend.Sessions 0).RaceConfig }}
{{ $setup.Track }} {{ $setup.TrackLayout }}
{{ end }}
{{ if gt $raceWeekend.Progress 0.0 }}
{{ $sessionCount = 1 }} {{ range $sessionIndex, $session := $raceWeekend.Sessions }}
{{ 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 }}
{{ $sessionCount = add $sessionCount 1 }} {{ end }} {{ if $raceWeekend.Completed }}
{{ $championshipHasTeamNames := $championship.HasTeamNames }}
{{ if $championship.IsMultiClass }} {{ end }} {{ if $championshipHasTeamNames }} {{ end }} {{ range $classIndex, $class := $championship.Classes }} {{ $eventStandings := $class.StandingsForEvent $event }} {{ range $pos, $standing := $eventStandings }} {{ if $championship.IsMultiClass }} {{ if eq $pos 0 }} {{ end }} {{ end }} {{ if $championshipHasTeamNames }} {{ end }} {{ end }} {{ end }}
Class# NameTeamCar Points
{{ $class.Name }}{{ add $pos 1 }} {{ driverName $standing.Car.Driver.Name }}{{ $standing.Car.Driver.Team }}{{ prettify $standing.Car.Model true }} {{ $standing.Points }}
{{ end }}
{{ end }}
{{ end }}