From 0e271799f2ec744332761cd87fe0d96f4d9653e0 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Thu, 6 Apr 2017 17:13:53 -0400 Subject: Refactoring: rename and simplify pkg/tool functions --- templates/repo/branch_dropdown.tmpl | 2 +- templates/repo/commits_table.tmpl | 6 +++--- templates/repo/diff/page.tmpl | 4 ++-- templates/repo/release/list.tmpl | 2 +- templates/repo/view_list.tmpl | 8 ++++---- 5 files changed, 11 insertions(+), 11 deletions(-) (limited to 'templates/repo') diff --git a/templates/repo/branch_dropdown.tmpl b/templates/repo/branch_dropdown.tmpl index 1a8c7aa8..26409707 100644 --- a/templates/repo/branch_dropdown.tmpl +++ b/templates/repo/branch_dropdown.tmpl @@ -4,7 +4,7 @@ {{if .IsViewBranch}}{{.i18n.Tr "repo.branch"}}{{else}}{{.i18n.Tr "repo.tree"}}{{end}}: - {{if .IsViewBranch}}{{.BranchName}}{{else}}{{ShortSha .BranchName}}{{end}} + {{if .IsViewBranch}}{{.BranchName}}{{else}}{{ShortSHA1 .BranchName}}{{end}} diff --git a/templates/repo/commits_table.tmpl b/templates/repo/commits_table.tmpl index a95cb824..e68dd76f 100644 --- a/templates/repo/commits_table.tmpl +++ b/templates/repo/commits_table.tmpl @@ -14,7 +14,7 @@ {{else if .IsDiffCompare}} - {{ShortSha .BeforeCommitID}} ... {{ShortSha .AfterCommitID}} + {{ShortSHA1 .BeforeCommitID}} ... {{ShortSHA1 .AfterCommitID}} {{end}} @@ -43,9 +43,9 @@ {{/* Username or Reponame doesn't present we assume the source repository no longer exists */}} {{if not (and $.Username $.Reponame)}} - {{ShortSha .ID.String}} + {{ShortSHA1 .ID.String}} {{else}} - {{ShortSha .ID.String}} + {{ShortSHA1 .ID.String}} {{end}} {{RenderCommitMessage false .Summary $.RepoLink $.Repository.ComposeMetas}} diff --git a/templates/repo/diff/page.tmpl b/templates/repo/diff/page.tmpl index 0a35a804..4d2f6bc1 100644 --- a/templates/repo/diff/page.tmpl +++ b/templates/repo/diff/page.tmpl @@ -28,12 +28,12 @@
{{range .Parents}} - {{ShortSha .}} + {{ShortSHA1 .}} {{end}}
{{end}}
{{.i18n.Tr "repo.diff.commit"}}
-
{{ShortSha .CommitID}}
+
{{ShortSHA1 .CommitID}}
diff --git a/templates/repo/release/list.tmpl b/templates/repo/release/list.tmpl index ccb611fb..c4414534 100644 --- a/templates/repo/release/list.tmpl +++ b/templates/repo/release/list.tmpl @@ -28,7 +28,7 @@ {{end}} - {{ShortSha .Sha1}} + {{ShortSHA1 .Sha1}}
diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl index f532dd74..1b7ae9e0 100644 --- a/templates/repo/view_list.tmpl +++ b/templates/repo/view_list.tmpl @@ -9,7 +9,7 @@ {{.LatestCommit.Author.Name}} {{end}} - {{ShortSha .LatestCommit.ID.String}} + {{ShortSHA1 .LatestCommit.ID.String}} {{RenderCommitMessage false .LatestCommit.Summary .RepoLink $.Repository.ComposeMetas}} @@ -32,9 +32,9 @@ {{$refURL := $commit.RefURL AppUrl $.BranchLink}} {{if $refURL}} - {{$entry.Name}} @ {{ShortSha $commit.RefID}} + {{$entry.Name}} @ {{ShortSHA1 $commit.RefID}} {{else}} - {{$entry.Name}} @ {{ShortSha $commit.RefID}} + {{$entry.Name}} @ {{ShortSHA1 $commit.RefID}} {{end}} {{else}} @@ -44,7 +44,7 @@ {{end}} - {{ShortSha $commit.ID.String}} + {{ShortSHA1 $commit.ID.String}} {{RenderCommitMessage false $commit.Summary $.RepoLink $.Repository.ComposeMetas}} {{TimeSince $commit.Committer.When $.Lang}} -- cgit v1.2.3