{{template "ng/base/head" .}} {{template "ng/base/header" .}}
{{template "repo/header" .}}
{{if .IsDiffCompare }} {{else}}
{{.i18n.Tr "repo.diff.browse_source"}}

{{RenderCommitMessage .Commit.Message $.RepoLink}}

  • {{.i18n.Tr "repo.diff.parent"}}
  • {{range .Parents}}
  • {{ShortSha .}}
  • {{end}}
  • {{.i18n.Tr "repo.diff.commit"}} {{ShortSha .CommitId}}

{{if .Author}} {{.Commit.Author.Name}} {{else}} {{.Commit.Author.Name}} {{end}} {{TimeSince .Commit.Author.When $.Lang}}

{{end}} {{if .DiffNotAvailable}}

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

{{else}}
{{.i18n.Tr "repo.diff.show_diff_stats"}}

{{.i18n.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2html}}

    {{range .Diff.Files}}
  1. {{if not .IsBin}} {{.Addition}} {{.Deletion}} {{else}} {{$.i18n.Tr "repo.diff.bin"}} {{end}}
      {{.Name}}
  2. {{end}}
{{range .Diff.Files}}
{{if not .IsBin}} + {{.Addition}} - {{.Deletion}} {{else}} {{$.i18n.Tr "repo.diff.bin"}} {{end}}
{{$.i18n.Tr "repo.diff.view_file"}} {{.Name}}
{{$isImage := (call $.IsImageFile .Name)}}
{{if $isImage}}
{{else}} {{range .Sections}} {{range .Lines}} {{end}} {{end}}
{{if .LeftIdx}}{{.LeftIdx}}{{end}} {{if .RightIdx}}{{.RightIdx}}{{end}}
{{.Content}}
{{end}}

{{end}} {{end}}
{{template "ng/base/footer" .}}