{{if .DiffNotAvailable}}
{{if .PageIsPullFiles}} {{template "repo/diff/whitespace_dropdown" .}} {{else}} {{ if .IsSplitStyle }}{{.i18n.Tr "repo.diff.show_unified_view"}}{{else}}{{.i18n.Tr "repo.diff.show_split_view"}}{{end}} {{end}} {{template "repo/diff/options_dropdown" .}} {{if and .PageIsPullFiles $.SignedUserID (not .IsArchived)}} {{template "repo/diff/new_review" .}} {{end}}

{{.i18n.Tr "repo.diff.data_not_available"}}

{{else}}
{{svg "octicon-diff" 16 "mr-2"}}{{.i18n.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2html}}
{{if .PageIsPullFiles}} {{template "repo/diff/whitespace_dropdown" .}} {{else}} {{ if .IsSplitStyle }}{{.i18n.Tr "repo.diff.show_unified_view"}}{{else}}{{.i18n.Tr "repo.diff.show_split_view"}}{{end}} {{end}} {{template "repo/diff/options_dropdown" .}} {{if and .PageIsPullFiles $.SignedUserID (not .IsArchived)}} {{template "repo/diff/new_review" .}} {{end}}
    {{range .Diff.Files}}
  1. {{if not .IsBin}} {{template "repo/diff/stats" dict "file" . "root" $}} {{else}} {{$.i18n.Tr "repo.diff.bin"}} {{end}}
      {{.Name}}
  2. {{end}}
{{range $i, $file := .Diff.Files}} {{if $file.IsIncomplete}}

{{svg "octicon-chevron-down" 18}}
{{if not $file.IsRenamed}} {{template "repo/diff/stats" dict "file" . "root" $}} {{end}}
{{$file.Name}}
{{$.i18n.Tr "repo.diff.file_suppressed"}}
{{if $file.IsProtected}} {{$.i18n.Tr "repo.diff.protected"}} {{end}} {{if and (not $file.IsSubmodule) (not $.PageIsWiki)}} {{if $file.IsDeleted}} {{$.i18n.Tr "repo.diff.view_file"}} {{else}} {{$.i18n.Tr "repo.diff.view_file"}} {{end}} {{end}}

{{else}}

{{$isImage := false}} {{if $file.IsDeleted}} {{$isImage = (call $.IsImageFileInBase $file.Name)}} {{else}} {{$isImage = (call $.IsImageFileInHead $file.Name)}} {{end}} {{svg "octicon-chevron-down" 18}}
{{if $file.IsBin}} {{$.i18n.Tr "repo.diff.bin"}} {{else if not $file.IsRenamed}} {{template "repo/diff/stats" dict "file" . "root" $}} {{end}}
{{if $file.IsRenamed}}{{$file.OldName}} → {{end}}{{$file.Name}}{{if .IsLFSFile}} ({{$.i18n.Tr "repo.stored_lfs"}}){{end}}
{{if $file.IsProtected}} {{$.i18n.Tr "repo.diff.protected"}} {{end}} {{if and (not $file.IsSubmodule) (not $.PageIsWiki)}} {{if $file.IsDeleted}} {{$.i18n.Tr "repo.diff.view_file"}} {{else}} {{$.i18n.Tr "repo.diff.view_file"}} {{end}} {{end}}

{{if ne $file.Type 4}}
{{if $isImage}} {{template "repo/diff/image_diff" dict "file" . "root" $}} {{else}} {{if $.IsSplitStyle}} {{template "repo/diff/section_split" dict "file" . "root" $}} {{else}} {{template "repo/diff/section_unified" dict "file" . "root" $}} {{end}} {{end}}
{{end}}
{{end}} {{end}} {{if .Diff.IsIncomplete}}

{{$.i18n.Tr "repo.diff.too_many_files"}}

{{end}} {{if not $.Repository.IsArchived}}
{{$.i18n.Tr "loading"}}
{{.i18n.Tr "repo.issues.cancel"}}
{{.i18n.Tr "repo.issues.save"}}
{{end}} {{template "repo/issue/view_content/reference_issue_dialog" .}} {{if .IsSplitStyle}} {{end}}
{{end}}