Show attachments in issues/comments and add preview for images
This commit is contained in:
parent
fa1db64ff0
commit
43e5de7f83
5 changed files with 145 additions and 24 deletions
15
cmd/web.go
15
cmd/web.go
|
@ -238,14 +238,6 @@ func runWeb(*cli.Context) {
|
|||
r.Post("/:index/label", repo.UpdateIssueLabel)
|
||||
r.Post("/:index/milestone", repo.UpdateIssueMilestone)
|
||||
r.Post("/:index/assignee", repo.UpdateAssignee)
|
||||
|
||||
m.Group("/:index/attachment", func(r martini.Router) {
|
||||
r.Get("/:id", repo.IssueGetAttachment)
|
||||
r.Post("/", repo.IssuePostAttachment)
|
||||
r.Post("/:comment", repo.IssuePostAttachment)
|
||||
r.Delete("/:comment/:id", repo.IssueDeleteAttachment)
|
||||
})
|
||||
|
||||
r.Post("/labels/new", bindIgnErr(auth.CreateLabelForm{}), repo.NewLabel)
|
||||
r.Post("/labels/edit", bindIgnErr(auth.CreateLabelForm{}), repo.UpdateLabel)
|
||||
r.Post("/labels/delete", repo.DeleteLabel)
|
||||
|
@ -262,6 +254,13 @@ func runWeb(*cli.Context) {
|
|||
r.Get("/releases/edit/:tagname", repo.EditRelease)
|
||||
}, reqSignIn, middleware.RepoAssignment(true))
|
||||
|
||||
m.Group("/:username/:reponame/issues/:index/attachment", func(r martini.Router) {
|
||||
r.Get("/:id", repo.IssueGetAttachment)
|
||||
r.Post("/", repo.IssuePostAttachment)
|
||||
r.Post("/:comment", repo.IssuePostAttachment)
|
||||
r.Delete("/:comment/:id", repo.IssueDeleteAttachment)
|
||||
}, reqSignIn, middleware.RepoAssignment(true), middleware.Toggle(&middleware.ToggleOptions{DisableCsrf: true}))
|
||||
|
||||
m.Group("/:username/:reponame", func(r martini.Router) {
|
||||
r.Post("/releases/new", bindIgnErr(auth.NewReleaseForm{}), repo.NewReleasePost)
|
||||
r.Post("/releases/edit/:tagname", bindIgnErr(auth.EditReleaseForm{}), repo.EditReleasePost)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue