From c386bb4bd314843a532012877e148ae70ee44672 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 23 Mar 2014 06:34:41 -0400 Subject: [PATCH] Bug fix --- modules/base/tool.go | 11 +++-------- templates/repo/nav.tmpl | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/modules/base/tool.go b/modules/base/tool.go index edf7a953c..b48566f54 100644 --- a/modules/base/tool.go +++ b/modules/base/tool.go @@ -515,16 +515,11 @@ func ActionDesc(act Actioner, avatarLink string) string { return err.Error() } buf := bytes.NewBuffer([]byte("\n")) - max := 3 - count := len(push.Commits) - if count < max { - max = count - } - for _, commit := range push.Commits[:max] { + for _, commit := range push.Commits { buf.WriteString(fmt.Sprintf(TPL_COMMIT_REPO_LI, avatarLink, actUserName, repoName, commit[0], commit[0][:7], commit[1]) + "\n") } - if count > max { - buf.WriteString(fmt.Sprintf(`
%d other commits >>
`, actUserName, repoName, count-max)) + if push.Len > 3 { + buf.WriteString(fmt.Sprintf(`
%d other commits >>
`, actUserName, repoName, push.Len)) } return fmt.Sprintf(TPL_COMMIT_REPO, actUserName, actUserName, actUserName, repoName, branch, branch, actUserName, repoName, actUserName, repoName, buf.String()) diff --git a/templates/repo/nav.tmpl b/templates/repo/nav.tmpl index b2d3500f9..a3358fd89 100644 --- a/templates/repo/nav.tmpl +++ b/templates/repo/nav.tmpl @@ -32,7 +32,7 @@

Need help cloning? Visit Help!

-
+
{{if .IsRepositoryWatching}} {{else}}