添加静态模板
This commit is contained in:
20
routers/web/repo/create_from_template.go
Normal file
20
routers/web/repo/create_from_template.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package repo
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"code.gitea.io/gitea/modules/templates"
|
||||
"code.gitea.io/gitea/services/context"
|
||||
)
|
||||
|
||||
const (
|
||||
tplCreateFromTemplate templates.TplName = "repo/create-from-template/create-from-template"
|
||||
)
|
||||
|
||||
func CreateFromTemplate(ctx *context.Context) {
|
||||
createCommon(ctx)
|
||||
if ctx.Written() {
|
||||
return
|
||||
}
|
||||
ctx.HTML(http.StatusOK, tplCreateFromTemplate)
|
||||
}
|
@@ -709,7 +709,7 @@ func MoveIssues(ctx *context.Context) {
|
||||
|
||||
for _, issue := range movedIssues {
|
||||
if issue.RepoID != project.RepoID {
|
||||
ctx.ServerError("Some issue's repoID is not equal to project's repoID", errors.New("Some issue's repoID is not equal to project's repoID"))
|
||||
ctx.ServerError("Some issue's repoID is not equal to project's repoID", errors.New("some issue's repoID is not equal to project's repoID"))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
@@ -1022,6 +1022,7 @@ func registerWebRoutes(m *web.Router) {
|
||||
m.Group("/repo", func() {
|
||||
m.Get("/create", repo.Create)
|
||||
m.Post("/create", web.Bind(forms.CreateRepoForm{}), repo.CreatePost)
|
||||
m.Get("/create-from-template", repo.CreateFromTemplate)
|
||||
m.Get("/migrate", repo.Migrate)
|
||||
m.Post("/migrate", web.Bind(forms.MigrateRepoForm{}), repo.MigratePost)
|
||||
m.Get("/search", repo.SearchRepo)
|
||||
|
Reference in New Issue
Block a user