{{define "content" -}}

~{{.Repo.OwnerName}}/{{.Repo.Name}} · milestones

{{template "beadsHead" (dict "Repo" .Repo "Ref" .Ref "Head" .Head)}} {{template "viewtabs" (dict "Repo" .Repo "Views" .Views "Current" "milestones" "Ref" .Ref)}} {{/* Every number below this line is a rollup — "1/4 done", "N of M carry no milestone label" — and arithmetic over the rows that were read renders exactly like arithmetic over the tracker. A milestone can lose members outright here, not merely undercount them: membership comes from labels, and a clip in either table takes an issue off its milestone silently. The wording and the markup are the detail pane's, because it is the same fact about the same read; a second phrasing for it would be a second style. It sits above the rollup rather than under it, and outside the milestones/no-milestones branch, because "No milestones." over a clipped read is the reading most easily mistaken for a fact about the tracker. */}} {{if .Data.Truncated}}
This read was clipped, so what is below may be short.{{if .Data.IssuesClipped}} The tracker holds {{.Data.ShownOf}} issues and only the first of them were read.{{end}}
{{end}} {{if .Data.Milestones}} {{range .Data.Milestones}}

{{.Name}}

{{.Done}}/{{.Total}} done · {{.Open}} open{{if .InProgress}} · {{.InProgress}} in progress{{end}}
{{range .Heads}}{{template "ms-row" (dict "Repo" $.Repo "Card" . "Class" "head")}}{{end}} {{range .Epics}} {{.Card.ID}} {{.Card.Title}} {{if .Total}}{{.Done}}/{{.Total}}{{end}} {{if .Card.PriorityLabel}}{{.Card.PriorityLabel}}{{end}} epic {{if .Card.Assignee}}@{{.Card.Assignee}}{{end}} {{.Card.Category}} {{range .Children}}{{template "ms-row" (dict "Repo" $.Repo "Card" . "Class" "child")}}{{end}} {{end}} {{range .Loose}}{{template "ms-row" (dict "Repo" $.Repo "Card" . "Class" "")}}{{end}}
{{end}} {{if .Data.Unlabeled}}

{{.Data.Unlabeled}} of {{.Data.Total}} issues carry no milestone label.

{{end}} {{else}}

No milestones. Tag issues with a milestone:<name> label to group them here.

{{end}}
{{- end}} {{define "ms-row" -}} {{.Card.ID}} {{.Card.Title}} {{if .Card.PriorityLabel}}{{.Card.PriorityLabel}}{{end}} {{if .Card.Type}}{{.Card.Type}}{{end}} {{if .Card.Assignee}}@{{.Card.Assignee}}{{end}} {{.Card.Category}} {{- end}}