Add same changes from issues page to milestone->issues page (#6328)
This commit is contained in:
parent
583968f274
commit
c55bdca562
4 changed files with 35 additions and 11 deletions
|
@ -260,5 +260,13 @@ func MilestoneIssuesAndPulls(ctx *context.Context) {
|
|||
|
||||
issues(ctx, milestoneID, util.OptionalBoolNone)
|
||||
|
||||
perm, err := models.GetUserRepoPermission(ctx.Repo.Repository, ctx.User)
|
||||
if err != nil {
|
||||
ctx.ServerError("GetUserRepoPermission", err)
|
||||
return
|
||||
}
|
||||
ctx.Data["CanWriteIssues"] = perm.CanWriteIssuesOrPulls(false)
|
||||
ctx.Data["CanWritePulls"] = perm.CanWriteIssuesOrPulls(true)
|
||||
|
||||
ctx.HTML(200, tplMilestoneIssues)
|
||||
}
|
||||
|
|
|
@ -635,7 +635,7 @@ func RegisterRoutes(m *macaron.Macaron) {
|
|||
}, context.RepoMustNotBeArchived(), reqRepoIssuesOrPullsWriter, context.RepoRef())
|
||||
m.Group("/milestone", func() {
|
||||
m.Get("/:id", repo.MilestoneIssuesAndPulls)
|
||||
}, reqRepoIssuesOrPullsWriter, context.RepoRef())
|
||||
}, reqRepoIssuesOrPullsReader, context.RepoRef())
|
||||
m.Combo("/compare/*", context.RepoMustNotBeArchived(), reqRepoCodeReader, reqRepoPullsReader, repo.MustAllowPulls, repo.SetEditorconfigIfExists).
|
||||
Get(repo.SetDiffViewStyle, repo.CompareAndPullRequest).
|
||||
Post(bindIgnErr(auth.CreateIssueForm{}), repo.CompareAndPullRequestPost)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue