diff --git a/routers/routes/routes.go b/routers/routes/routes.go index 2def76ff4..4fb24201b 100755 --- a/routers/routes/routes.go +++ b/routers/routes/routes.go @@ -12,6 +12,8 @@ import ( "text/template" "time" + "code.gitea.io/gitea/routers/tech" + "code.gitea.io/gitea/routers/badge" "code.gitea.io/gitea/routers/reward/point" "code.gitea.io/gitea/routers/task" @@ -896,6 +898,14 @@ func RegisterRoutes(m *macaron.Macaron) { m.Get("/check_name", repo.CheckName) }, reqSignIn) + m.Group("/tech", func() { + m.Get("/new", tech.Create) + m.Get("/tech_view", tech.TechView) + m.Get("/repo_view", tech.RepoView) + m.Get("/admin_view", tech.AdminView) + + }, reqSignIn) + // ***** Release Attachment Download without Signin m.Get("/:username/:reponame/releases/download/:vTag/:fileName", ignSignIn, context.RepoAssignment(), repo.MustBeNotEmpty, repo.RedirectDownload) diff --git a/routers/tech/tech.go b/routers/tech/tech.go new file mode 100644 index 000000000..1003cd50c --- /dev/null +++ b/routers/tech/tech.go @@ -0,0 +1,27 @@ +package tech + +import ( + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" +) + +const ( + tplCreate base.TplName = "tech/create" + tplTech base.TplName = "tech/tech_view" + tplRepo base.TplName = "tech/repo_view" + tplAdmin base.TplName = "tech/admin_view" +) + +func Create(ctx *context.Context) { + ctx.HTML(200, tplCreate) +} + +func TechView(ctx *context.Context) { + ctx.HTML(200, tplTech) +} +func RepoView(ctx *context.Context) { + ctx.HTML(200, tplRepo) +} +func AdminView(ctx *context.Context) { + ctx.HTML(200, tplAdmin) +}