浏览代码

#1246 Dashboard error: nil commits

Unknwon 9 年之前
父节点
当前提交
3a32cbee44
共有 3 个文件被更改,包括 4 次插入2 次删除
  1. 1 1
      gogs.go
  2. 1 1
      templates/.VERSION
  3. 2 0
      templates/user/dashboard/feeds.tmpl

+ 1 - 1
gogs.go

@@ -17,7 +17,7 @@ import (
 	"github.com/gogits/gogs/modules/setting"
 )
 
-const APP_VER = "0.6.5.0824 Beta"
+const APP_VER = "0.6.5.0825 Beta"
 
 func init() {
 	runtime.GOMAXPROCS(runtime.NumCPU())

+ 1 - 1
templates/.VERSION

@@ -1 +1 @@
-0.6.5.0824 Beta
+0.6.5.0825 Beta

+ 2 - 0
templates/user/dashboard/feeds.tmpl

@@ -27,9 +27,11 @@
             <ul class="list-no-style">
                 {{ $push := ActionContent2Commits .}}
                 {{ $repoLink := .GetRepoLink}}
+                {{if $push.Commits}}
                 {{range $push.Commits}}
                 <li><img class="avatar-16" src="{{AvatarLink .AuthorEmail}}?s=16"> <a href="{{$repoLink}}/commit/{{.Sha1}}">{{ShortSha .Sha1}}</a> <span class="text-truncate grid-4-5">{{.Message}}</span></li>
                 {{end}}
+                {{end}}
                 {{if $push.CompareUrl}}<li><a href="{{AppSubUrl}}/{{$push.CompareUrl}}">{{$.i18n.Tr "action.compare_2_commits"}} »</a></li>{{end}}
             </ul>
         </div>