{{define "content"}}
{{template "repo_header" .}}
{{icon "git-pull-request" "size-4"}} {{t .Lang "pulls.compare_branches"}}
{{if gt (len .HeadRepos) 1}} {{end}} ←
{{if and (eq .BaseBranch .HeadBranch) (eq .HeadRepo.ID .Repo.ID)}}
{{icon "alert-circle" "size-4"}} {{t .Lang "pulls.branches_identical"}}
{{else}}
{{if .CanMerge}} {{icon "check" "size-4"}} {{t .Lang "pulls.able_to_merge"}} {{else}} {{icon "alert-circle" "size-4"}} {{t .Lang "pulls.cannot_merge_warning"}} {{end}}
{{end}}
{{if or (ne .BaseBranch .HeadBranch) (ne .HeadRepo.ID .Repo.ID)}}
{{t .Lang "pulls.new"}} {{if ne .HeadRepo.ID .Repo.ID}} {{.HeadRepo.OwnerUsername}}/{{.HeadRepo.Name}} → {{.Repo.OwnerUsername}}/{{.Repo.Name}} {{end}}
{{if ne .HeadRepo.ID .Repo.ID}}{{end}}
{{if .CompareCommits}}
{{t .Lang "pulls.commits"}} ({{len .CompareCommits}})
{{range .CompareCommits}}
{{icon "git-commit" "size-3.5"}} {{.Subject}}
{{.AuthorName}} {{.ShortHash}}
{{end}}
{{end}} {{if .Compare}} {{if .Compare.Files}}
{{.Compare.FilesChanged}} {{pluralT .Lang .Compare.FilesChanged "repo.files_changed"}}
+{{.Compare.TotalAdditions}} -{{.Compare.TotalDeletions}}
{{range .Compare.Files}}
{{icon "file-code" "size-4"}} {{if eq .Status "renamed"}} {{.OldPath}} → {{.NewPath}} {{else}} {{.NewPath}} {{end}}
+{{.Additions}} -{{.Deletions}}
{{if .IsBinary}}
{{t $.Lang "repo.binary_notice"}}
{{else}}
{{range .Lines}} {{if eq .Type "hunk"}} {{else if eq .Type "add"}} {{else if eq .Type "del"}} {{else}} {{end}} {{end}}
... ... {{.Content}}
{{.NewNum}} +{{.Content}}
{{.OldNum}} -{{.Content}}
{{.OldNum}} {{.NewNum}} {{.Content}}
{{end}}
{{end}}
{{end}} {{end}} {{end}}
{{end}}