From d80f43ca816465ca112684e02d18f3184af7ff26 Mon Sep 17 00:00:00 2001 From: Lunny Xiao <xiaolunwen@gmail.com> Date: Fri, 14 Mar 2014 23:57:14 +0800 Subject: [PATCH] bug fixed --- models/repo.go | 4 ++-- templates/repo/single.tmpl | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/models/repo.go b/models/repo.go index c5fa899f4d..26aba4a851 100644 --- a/models/repo.go +++ b/models/repo.go @@ -305,11 +305,11 @@ func GetReposFiles(userName, reposName, branchName, rpath string) ([]*RepoFile, if rpath != "" { rpath = rpath + "/" } - fmt.Println("...", rpath, "...") + //fmt.Println("...", rpath, "...") tree.Walk(func(dirname string, entry *git.TreeEntry) int { if dirname == rpath { - fmt.Println("====", dirname, "==", entry.Name) + //fmt.Println("====", dirname, "==", entry.Name) repofiles = append(repofiles, &RepoFile{ entry.Id, entry.Filemode, diff --git a/templates/repo/single.tmpl b/templates/repo/single.tmpl index 292f8cbddd..f71e87f0fb 100644 --- a/templates/repo/single.tmpl +++ b/templates/repo/single.tmpl @@ -14,15 +14,15 @@ <li><a href="//{{.RepositoryLink}}/branch/develop">develop</a></li> </ul> </div> - <ol class="breadcrumb"> - <li class="root dir">{{.Repository.Name}}</li> - {{$paths := .Paths}} + {{$paths := .Paths}} {{ $username := .Username}} {{ $reponame := .Reponame}} {{ $branchname := .Branchname}} {{ $treenames := .Treenames}} {{ $n := len $treenames}} {{ $l := Subtract $n 1}} + <ol class="breadcrumb"> + <li class="root dir"><a href="/{{$username}}/{{$reponame}}/tree/{{$branchname}}">{{.Repository.Name}}</a></li> {{range $i, $v := $treenames}} <li class="dir"> {{if eq $i $l}}{{$v}}