You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

find.go 546B

1234567891011121314151617181920212223
  1. // Copyright 2022 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package repo
  4. import (
  5. "net/http"
  6. "code.gitea.io/gitea/modules/base"
  7. "code.gitea.io/gitea/modules/context"
  8. )
  9. const (
  10. tplFindFiles base.TplName = "repo/find/files"
  11. )
  12. // FindFiles render the page to find repository files
  13. func FindFiles(ctx *context.Context) {
  14. path := ctx.Params("*")
  15. ctx.Data["TreeLink"] = ctx.Repo.RepoLink + "/src/" + path
  16. ctx.Data["DataLink"] = ctx.Repo.RepoLink + "/tree-list/" + path
  17. ctx.HTML(http.StatusOK, tplFindFiles)
  18. }