package seasonsview import "git.haelnorr.com/h/oslstats/internal/db" import "git.haelnorr.com/h/oslstats/internal/permissions" import "git.haelnorr.com/h/oslstats/internal/contexts" import "git.haelnorr.com/h/oslstats/internal/view/baseview" import "git.haelnorr.com/h/oslstats/internal/view/component/links" import "fmt" import "sort" import "strings" // FixtureDetailLayout renders the fixture detail page layout with header and // tab navigation. Tab content is rendered as children. templ FixtureDetailLayout(activeTab string, fixture *db.Fixture, result *db.FixtureResult) { {{ backURL := fmt.Sprintf("/seasons/%s/leagues/%s/fixtures", fixture.Season.ShortName, fixture.League.ShortName) isFinalized := result != nil && result.Finalized }} @baseview.Layout(fmt.Sprintf("%s vs %s", fixture.HomeTeam.Name, fixture.AwayTeam.Name)) {
No result has been uploaded for this fixture yet.
No time scheduled
@localtime(schedule.ScheduledTime, "date")
@localtime(schedule.ScheduledTime, "time")
@localtime(schedule.ScheduledTime, "date")
@localtime(schedule.ScheduledTime, "time")
Awaiting confirmation
{ *schedule.RescheduleReason }
}No time confirmed
{ *result.TamperingReason }
Both teams receive an overtime loss
} else if isOutrightForfeit {{ forfeitTeamName } forfeited the match
} if result.ForfeitReason != nil && *result.ForfeitReason != "" {Reason
{ *result.ForfeitReason }
No Result Uploaded
Upload match log files to record the result of this fixture.
No players on roster.
| Player | PP | SC | G | A | SV | SH | BL | PA | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @links.PlayerLink(p.Player) if p.IsManager { ★ } if p.IsFreeAgent { FREE AGENT } | if p.Stats != nil {{ intPtrStr(p.Stats.PeriodsPlayed) } | { intPtrStr(p.Stats.Score) } | { intPtrStr(p.Stats.Goals) } | { intPtrStr(p.Stats.Assists) } | { intPtrStr(p.Stats.Saves) } | { intPtrStr(p.Stats.Shots) } | { intPtrStr(p.Stats.Blocks) } | { intPtrStr(p.Stats.Passes) } | } else {β | }|||||||
Bench
Playing
}Bench
No free agents nominated for this fixture.
} else {{ fixture.HomeTeam.Name }
if len(homeNominated) == 0 {None
} else {{ fixture.AwayTeam.Name }
if len(awayNominated) == 0 {None
} else {No time scheduled
if canSchedule { Use the form to propose a time for this fixture. } else { A team manager needs to propose a time for this fixture. }
Proposed: @localtime(current.ScheduledTime, "datetime")
Proposed by { current.ProposedBy.Name } β awaiting response from the other team
if canSchedule && userTeamID != current.ProposedByTeamID {Confirmed: @localtime(current.ScheduledTime, "datetime")
Both teams have agreed on this time.
Proposal Rejected
The proposed time was rejected. A new time needs to be proposed.
Fixture Forfeited
if current.RescheduleReason != nil {{ *current.RescheduleReason }
}Rescheduled
if current.RescheduleReason != nil {Reason: { *current.RescheduleReason }
}A new time needs to be proposed.
Postponed
if current.RescheduleReason != nil {Reason: { *current.RescheduleReason }
}A new time needs to be proposed.
Proposal Withdrawn
The proposed time was withdrawn. A new time needs to be proposed.
This action is irreversible. Declaring a forfeit will permanently cancel the fixture schedule.
Only team managers can manage fixture scheduling.
No scheduling activity yet.
} else {