diff options
author | delvh <dev.lh@web.de> | 2023-05-31 08:50:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-31 08:50:18 +0200 |
commit | bf27fc35960afe4e949c4b7425139a9f5df12aad (patch) | |
tree | 570fe0432c8c8aba9dfd2d5769aaec82bee042a9 /routers/web/web.go | |
parent | 3a6a6342eaa60751861d08cdc24dfd141d9ea7f5 (diff) | |
download | gitea-bf27fc35960afe4e949c4b7425139a9f5df12aad.tar.gz gitea-bf27fc35960afe4e949c4b7425139a9f5df12aad.zip |
Merge `new project` templates into one (#24985)
Additionally simplify the `new project` template slightly.
Review hint: Disable whitespace changes.
<details><summary>Before</summary>
## New repo project
![grafik](https://github.com/go-gitea/gitea/assets/51889757/4de977e8-3688-45cd-8832-49b001e6f249)
## Edit repo project
![grafik](https://github.com/go-gitea/gitea/assets/51889757/daaf353f-6c99-48bd-b37a-a3bc64459079)
## New user/org project
![grafik](https://github.com/go-gitea/gitea/assets/51889757/6a5a3be5-f51a-4599-b75c-7adb9710d2fa)
## Edit user/org project
![grafik](https://github.com/go-gitea/gitea/assets/51889757/a4768f49-cf46-4773-8a0f-54dfdcc1c1b8)
</details>
<details><summary>After</summary>
## New repo project
![grafik](https://github.com/go-gitea/gitea/assets/51889757/3d0ac8a0-850a-4743-963c-71c66ef38d07)
## Edit repo project
![grafik](https://github.com/go-gitea/gitea/assets/51889757/6b86a1cd-e360-4a9b-aaf7-af032d0d991a)
## New user/org project
![grafik](https://github.com/go-gitea/gitea/assets/51889757/a7b0964c-e4c7-4924-842a-52a58499bc36)
## Edit user/org project
![grafik](https://github.com/go-gitea/gitea/assets/51889757/0fbc5605-afee-49bd-a44a-8646f8c55681)
</details>
---------
Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'routers/web/web.go')
-rw-r--r-- | routers/web/web.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/routers/web/web.go b/routers/web/web.go index ef47b6679f..da6064257b 100644 --- a/routers/web/web.go +++ b/routers/web/web.go @@ -824,13 +824,13 @@ func registerRoutes(m *web.Route) { m.Get("/{id}", org.ViewProject) }, reqUnitAccess(unit.TypeProjects, perm.AccessModeRead)) m.Group("", func() { //nolint:dupl - m.Get("/new", org.NewProject) + m.Get("/new", org.RenderNewProject) m.Post("/new", web.Bind(forms.CreateProjectForm{}), org.NewProjectPost) m.Group("/{id}", func() { m.Post("", web.Bind(forms.EditProjectBoardForm{}), org.AddBoardToProjectPost) m.Post("/delete", org.DeleteProject) - m.Get("/edit", org.EditProject) + m.Get("/edit", org.RenderEditProject) m.Post("/edit", web.Bind(forms.CreateProjectForm{}), org.EditProjectPost) m.Post("/{action:open|close}", org.ChangeProjectStatus) @@ -1159,13 +1159,13 @@ func registerRoutes(m *web.Route) { m.Get("", repo.Projects) m.Get("/{id}", repo.ViewProject) m.Group("", func() { //nolint:dupl - m.Get("/new", repo.NewProject) + m.Get("/new", repo.RenderNewProject) m.Post("/new", web.Bind(forms.CreateProjectForm{}), repo.NewProjectPost) m.Group("/{id}", func() { m.Post("", web.Bind(forms.EditProjectBoardForm{}), repo.AddBoardToProjectPost) m.Post("/delete", repo.DeleteProject) - m.Get("/edit", repo.EditProject) + m.Get("/edit", repo.RenderEditProject) m.Post("/edit", web.Bind(forms.CreateProjectForm{}), repo.EditProjectPost) m.Post("/{action:open|close}", repo.ChangeProjectStatus) |