package teamsview import "git.haelnorr.com/h/oslstats/internal/db" import "git.haelnorr.com/h/oslstats/internal/view/component/links" import "fmt" import "sort" templ TeamDetailPlayerStats(playerStats []*db.TeamAllTimePlayerStats) { if len(playerStats) == 0 {
No player stats yet.
Player statistics will appear here once games are played.
| # | Player | SZN | PP | { statShort } | ||
|---|---|---|---|---|---|---|
| { fmt.Sprint(i + 1) } | @links.PlayerLinkFromStats(ps.PlayerID, ps.PlayerName) | { fmt.Sprint(ps.SeasonsPlayed) } | { fmt.Sprint(ps.PeriodsPlayed) } | if statType == "goals" {{ fmt.Sprint(ps.Goals) } | } else if statType == "assists" {{ fmt.Sprint(ps.Assists) } | } else {{ fmt.Sprint(ps.Saves) } | }