{{define "branches"}} {{template "layout-start" .}}

{{t "title.branches"}}

{{if .CanWrite}}{{end}}
{{range .Branches}} {{else}} {{end}}
{{t "branch.name"}} {{t "branch.last"}} {{t "branch.compare"}} {{t "mr.pipeline"}} {{t "mr.title"}} {{t "branch.actions"}}
{{.Name}} {{if .Default}}{{t "branch.default"}}{{end}} {{if .Protected}}{{t "vis.protected"}}{{end}} {{if .SHA}}{{.Short}} {{.Subject}} {{.When}}{{end}} {{if and (eq .Ahead 0) (eq .Behind 0)}}{{t "branch.even"}}{{else}} {{if .Ahead}}{{t "branch.ahead" .Ahead}}{{end}} {{if .Behind}}{{t "branch.behind" .Behind}}{{end}} {{end}} {{if .PipeStatus}}{{.PipeLabel}}{{end}}
{{if not .Default}} {{t "branch.compare"}} {{if not .OpenMRs}}{{t "branch.mrShort"}}{{end}} {{end}} {{if and $.CanWrite (not .Default) (not .Protected)}}
⋯
{{end}}
{{t "repo.noBranches"}}
{{if .CanWrite}}

{{t "branch.create"}}

{{range .Branches}}{{end}} {{range .Tags}}{{end}}

{{t "branch.delete"}}

{{t "branch.rename"}}

{{end}} {{template "layout-end" .}} {{end}}