workaround for #51
This commit is contained in:
parent
0a8ef525e9
commit
28fda64326
3 changed files with 3 additions and 4 deletions
|
@ -145,8 +145,7 @@ func setupHandlers() {
|
|||
m.Get("/:host/:owner/:name/commit/:commit/build/:label/out.txt", handler.RepoHandler(handler.BuildOut))
|
||||
m.Get("/:host/:owner/:name/commit/:commit/build/:label", handler.RepoHandler(handler.CommitShow))
|
||||
m.Get("/:host/:owner/:name/commit/:commit", handler.RepoHandler(handler.CommitShow))
|
||||
m.Get("/:host/:owner/:name/tree/:branch", handler.RepoHandler(handler.RepoDashboard))
|
||||
m.Get("/:host/:owner/:name/tree/:branch/", handler.RepoHandler(handler.RepoDashboard))
|
||||
m.Get("/:host/:owner/:name/tree", handler.RepoHandler(handler.RepoDashboard))
|
||||
m.Get("/:host/:owner/:name/status.png", handler.ErrorHandler(handler.Badge))
|
||||
m.Get("/:host/:owner/:name/settings", handler.RepoAdminHandler(handler.RepoSettingsForm))
|
||||
m.Get("/:host/:owner/:name/params", handler.RepoAdminHandler(handler.RepoParamsForm))
|
||||
|
|
|
@ -15,7 +15,7 @@ import (
|
|||
|
||||
// Display a Repository dashboard.
|
||||
func RepoDashboard(w http.ResponseWriter, r *http.Request, u *User, repo *Repo) error {
|
||||
branch := r.FormValue(":branch")
|
||||
branch := r.FormValue("branch")
|
||||
|
||||
// get a list of all branches
|
||||
branches, err := database.ListBranches(repo.ID)
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
<ul class="nav nav-pills nav-stacked nav-branches">
|
||||
{{ range .Branches }}
|
||||
<li{{ if eq $branch .Branch }} class="active"{{end}}>
|
||||
<a href="/{{ $repo.Slug }}/tree/{{.Branch}}">
|
||||
<a href="/{{ $repo.Slug }}/tree?branch={{.Branch}}">
|
||||
<span class="btn btn-mini btn-{{.Status}} "></span>
|
||||
<span>{{.Branch}}</span>
|
||||
</a>
|
||||
|
|
Loading…
Reference in a new issue