- {{$timeSince := DateUtils.TimeSince .CommitTime}}
- {{$branchLink := HTMLFormat `
` .BranchLink .BranchDisplayName}}
+{{/* Template Attributes:
+* RecentBranchesPromptData
+*/}}
+{{$data := .RecentBranchesPromptData}}
+{{if $data}}
+ {{range $recentBranch := $data.RecentlyPushedNewBranches}}
+
+
+ {{$timeSince := DateUtils.TimeSince $recentBranch.CommitTime}}
+ {{$branchLink := HTMLFormat `
%s` $recentBranch.BranchLink .BranchDisplayName}}
{{ctx.Locale.Tr "repo.pulls.recently_pushed_new_branches" $branchLink $timeSince}}
-
+
{{ctx.Locale.Tr "repo.pulls.compare_changes"}}
+ {{end}}
{{end}}
diff --git a/templates/repo/commit_page.tmpl b/templates/repo/commit_page.tmpl
index 46f641824b..68ccf9d275 100644
--- a/templates/repo/commit_page.tmpl
+++ b/templates/repo/commit_page.tmpl
@@ -147,7 +147,7 @@
{{if or (ne .Commit.Committer.Name .Commit.Author.Name) (ne .Commit.Committer.Email .Commit.Author.Email)}}
{{ctx.Locale.Tr "repo.diff.committed_by"}}
- {{if ne .Verification.CommittingUser.ID 0}}
+ {{if and .Verification.CommittingUser .Verification.CommittingUser.ID}}
{{ctx.AvatarUtils.Avatar .Verification.CommittingUser 20}}
{{.Commit.Committer.Name}}
{{else}}
diff --git a/templates/repo/commits_list.tmpl b/templates/repo/commits_list.tmpl
index 9dae6594b9..959f2a9398 100644
--- a/templates/repo/commits_list.tmpl
+++ b/templates/repo/commits_list.tmpl
@@ -16,7 +16,7 @@
{{$userName := .Author.Name}}
- {{if and .User (gt .User.ID 0)}} /* User with id == 0 is a fake user from git author */
+ {{if .User}}
{{if and .User.FullName DefaultShowFullName}}
{{$userName = .User.FullName}}
{{end}}
diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl
index f86b90502d..2a6c0d2fe5 100644
--- a/templates/repo/home.tmpl
+++ b/templates/repo/home.tmpl
@@ -15,7 +15,7 @@
{{end}}
- {{template "repo/code/recently_pushed_new_branches" .}}
+ {{template "repo/code/recently_pushed_new_branches" dict "RecentBranchesPromptData" .RecentBranchesPromptData}}
|