diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2021-06-15 03:12:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-14 21:12:33 -0400 |
commit | ebf253b841d56c5cb1e57cb1e5e50c06d315bdee (patch) | |
tree | 703f8c4d0302e578d402d6aa42635852303026df /routers/web/repo/pull.go | |
parent | 0adcea9ba6946e9479314e188afe53dcb39da6b0 (diff) | |
download | gitea-ebf253b841d56c5cb1e57cb1e5e50c06d315bdee.tar.gz gitea-ebf253b841d56c5cb1e57cb1e5e50c06d315bdee.zip |
Add attachments for PR reviews (#16075)
* First step for multiple dropzones per page.
* Allow attachments on review comments.
* Lint.
* Fixed accidental initialize of the review textarea.
* Initialize SimpleMDE textarea.
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'routers/web/repo/pull.go')
-rw-r--r-- | routers/web/repo/pull.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go index 28f94c8417..e5554e9664 100644 --- a/routers/web/repo/pull.go +++ b/routers/web/repo/pull.go @@ -694,6 +694,10 @@ func ViewPullFiles(ctx *context.Context) { getBranchData(ctx, issue) ctx.Data["IsIssuePoster"] = ctx.IsSigned && issue.IsPoster(ctx.User.ID) ctx.Data["HasIssuesOrPullsWritePermission"] = ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull) + + ctx.Data["IsAttachmentEnabled"] = setting.Attachment.Enabled + upload.AddUploadContext(ctx, "comment") + ctx.HTML(http.StatusOK, tplPullFiles) } |