From b2632dec099cb2727933149d2d59cc5e46baa15f Mon Sep 17 00:00:00 2001 From: Unknwon Date: Fri, 10 Oct 2014 21:40:51 -0400 Subject: Page: Compare 2 commits --- templates/repo/diff.tmpl | 76 ++++++++++++++++++++++++++---------------------- 1 file changed, 41 insertions(+), 35 deletions(-) (limited to 'templates/repo/diff.tmpl') diff --git a/templates/repo/diff.tmpl b/templates/repo/diff.tmpl index 8e5efd14..30a983ac 100644 --- a/templates/repo/diff.tmpl +++ b/templates/repo/diff.tmpl @@ -1,49 +1,54 @@ -{{template "base/head" .}} -{{template "base/navbar" .}} -{{template "repo/nav" .}} -
-
- {{if .IsDiffCompare }} -
-
- Browse Source -

{{ShortSha .BeforeCommitId}} ... {{ShortSha .AfterCommitId}}

+{{template "ng/base/head" .}} +{{template "ng/base/header" .}} +
+ {{template "repo/header" .}} +
+ {{if .IsDiffCompare }} +
+
- {{template "repo/commits_table" .}} + {{template "repo/commits_table" .}}
- {{else}} -
-
- Browse Source + {{else}} +
+
-
    - {{range .Parents}} -
  • parent {{ShortSha .}}
  • - {{end}} -
  • commit {{ShortSha .CommitId}}
  • -
+
    +
  • {{.i18n.Tr "repo.diff.parent"}}
  • + {{range .Parents}} +
  • {{ShortSha .}}
  • + {{end}} +
  • {{.i18n.Tr "repo.diff.commit"}} {{ShortSha .CommitId}}
  • +

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

-
+
- {{end}} + {{end}} {{if .DiffNotAvailable}} -

Diff Data Not Available.

+

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

{{else}}
- Show Diff Stats + {{.i18n.Tr "repo.diff.show_diff_stats"}}

- {{.Diff.NumFiles}} changed files with {{.Diff.TotalAddition}} additions and {{.Diff.TotalDeletion}} deletions. + {{.i18n.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2html}}

    {{range .Diff.Files}} @@ -57,7 +62,7 @@ {{.Deletion}} {{else}} - BIN + {{$.i18n.Tr "repo.diff.bin"}} {{end}}
@@ -69,8 +74,8 @@
{{range .Diff.Files}} -
-
+
+
{{if not .IsBin}} + {{.Addition}} @@ -80,10 +85,10 @@ - {{.Deletion}} {{else}} - BIN + {{$.i18n.Tr "repo.diff.bin"}} {{end}}
- View File + {{$.i18n.Tr "repo.diff.view_file"}} {{.Name}}
{{$isImage := (call $.IsImageFile .Name)}} @@ -115,8 +120,9 @@ {{end}}
+
{{end}} {{end}}
-{{template "base/footer" .}} +{{template "ng/base/footer" .}} -- cgit v1.2.3