mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
add parent folder link in file list
This commit is contained in:
@@ -87,6 +87,11 @@ func Single(ctx *middleware.Context, params martini.Params) {
|
||||
for i, _ := range treenames {
|
||||
Paths = append(Paths, strings.Join(treenames[0:i+1], "/"))
|
||||
}
|
||||
|
||||
ctx.Data["HasParentPath"] = true
|
||||
if len(Paths)-2 >= 0 {
|
||||
ctx.Data["ParentPath"] = "/" + Paths[len(Paths)-2]
|
||||
}
|
||||
}
|
||||
|
||||
// Get latest commit according username and repo name
|
||||
|
Reference in New Issue
Block a user