diff --git a/integrations/links_test.go b/integrations/links_test.go index bc87ffad83..d0cf978f65 100644 --- a/integrations/links_test.go +++ b/integrations/links_test.go @@ -22,11 +22,11 @@ func TestLinksNoLogin(t *testing.T) { links := []string{ "/explore/repos", - "/explore/repos?q=test&tab=", + "/explore/repos?q=test", "/explore/users", - "/explore/users?q=test&tab=", + "/explore/users?q=test", "/explore/organizations", - "/explore/organizations?q=test&tab=", + "/explore/organizations?q=test", "/", "/user/sign_up", "/user/login", @@ -81,11 +81,11 @@ func TestNoLoginNotExist(t *testing.T) { func testLinksAsUser(userName string, t *testing.T) { links := []string{ "/explore/repos", - "/explore/repos?q=test&tab=", + "/explore/repos?q=test", "/explore/users", - "/explore/users?q=test&tab=", + "/explore/users?q=test", "/explore/organizations", - "/explore/organizations?q=test&tab=", + "/explore/organizations?q=test", "/", "/user/forgot_password", "/api/swagger", diff --git a/modules/context/pagination.go b/modules/context/pagination.go index c0079c2950..617b472f0d 100644 --- a/modules/context/pagination.go +++ b/modules/context/pagination.go @@ -52,7 +52,6 @@ func (p *Pagination) GetParams() template.URL { func (p *Pagination) SetDefaultParams(ctx *Context) { p.AddParam(ctx, "sort", "SortType") p.AddParam(ctx, "q", "Keyword") - p.AddParam(ctx, "tab", "TabName") // do not add any more uncommon params here! p.AddParam(ctx, "t", "queryType") } diff --git a/routers/web/user/profile.go b/routers/web/user/profile.go index 44501fc245..dd5804cd42 100644 --- a/routers/web/user/profile.go +++ b/routers/web/user/profile.go @@ -276,6 +276,7 @@ func Profile(ctx *context.Context) { pager := context.NewPagination(total, setting.UI.User.RepoPagingNum, page, 5) pager.SetDefaultParams(ctx) + pager.AddParam(ctx, "tab", "TabName") if tab != "followers" && tab != "following" && tab != "activity" && tab != "projects" { pager.AddParam(ctx, "language", "Language") } diff --git a/templates/admin/repo/search.tmpl b/templates/admin/repo/search.tmpl index e51d50936b..7b9c44afd7 100644 --- a/templates/admin/repo/search.tmpl +++ b/templates/admin/repo/search.tmpl @@ -12,10 +12,10 @@ {{.i18n.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}} {{.i18n.Tr "repo.issues.filter_sort.recentupdate"}} {{.i18n.Tr "repo.issues.filter_sort.leastupdate"}} - {{.i18n.Tr "repo.issues.filter_sort.moststars"}} - {{.i18n.Tr "repo.issues.filter_sort.feweststars"}} - {{.i18n.Tr "repo.issues.filter_sort.mostforks"}} - {{.i18n.Tr "repo.issues.filter_sort.fewestforks"}} + {{.i18n.Tr "repo.issues.filter_sort.moststars"}} + {{.i18n.Tr "repo.issues.filter_sort.feweststars"}} + {{.i18n.Tr "repo.issues.filter_sort.mostforks"}} + {{.i18n.Tr "repo.issues.filter_sort.fewestforks"}} {{.i18n.Tr "repo.issues.label.filter_sort.by_size"}} {{.i18n.Tr "repo.issues.label.filter_sort.reverse_by_size"}} diff --git a/templates/explore/code.tmpl b/templates/explore/code.tmpl index 2801cdfaf0..6bd8be7aff 100644 --- a/templates/explore/code.tmpl +++ b/templates/explore/code.tmpl @@ -3,7 +3,6 @@ {{template "explore/navbar" .}}
-
-
-