diff options
author | Unknwon <u@gogs.io> | 2015-08-11 17:54:00 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-08-11 17:54:00 +0800 |
commit | 89c2bd4a0dd85261f72565ba8395644da8129fea (patch) | |
tree | cbd75644b3a7d83df8353fd93538564b8afa16fd /routers/repo | |
parent | 17f3e840ec7e7dbff5d3d6e6da4e8347844f6817 (diff) | |
download | gitea-89c2bd4a0dd85261f72565ba8395644da8129fea.tar.gz gitea-89c2bd4a0dd85261f72565ba8395644da8129fea.zip |
finish create issue attachment UI
Diffstat (limited to 'routers/repo')
-rw-r--r-- | routers/repo/issue.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go index afc48ab425..e8d2d7e1c2 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -178,6 +178,7 @@ func Issues(ctx *middleware.Context) { func NewIssue(ctx *middleware.Context) { ctx.Data["Title"] = ctx.Tr("repo.issues.new") ctx.Data["PageIsIssueList"] = true + ctx.Data["RequireDropzone"] = true ctx.Data["IsAttachmentEnabled"] = setting.AttachmentEnabled ctx.Data["AttachmentAllowedTypes"] = setting.AttachmentAllowedTypes @@ -214,8 +215,10 @@ func NewIssue(ctx *middleware.Context) { } func NewIssuePost(ctx *middleware.Context, form auth.CreateIssueForm) { + fmt.Println(ctx.QueryStrings("uuids")) ctx.Data["Title"] = ctx.Tr("repo.issues.new") ctx.Data["PageIsIssueList"] = true + ctx.Data["RequireDropzone"] = true ctx.Data["IsAttachmentEnabled"] = setting.AttachmentEnabled ctx.Data["AttachmentAllowedTypes"] = setting.AttachmentAllowedTypes @@ -344,6 +347,12 @@ func NewIssuePost(ctx *middleware.Context, form auth.CreateIssueForm) { ctx.Redirect(ctx.Repo.RepoLink + "/issues/" + com.ToStr(issue.Index)) } +func UploadAttachment(ctx *middleware.Context) { + ctx.JSON(200, map[string]string{ + "uuid": "fuck", + }) +} + func checkLabels(labels, allLabels []*models.Label) { for _, l := range labels { for _, l2 := range allLabels { @@ -926,6 +935,7 @@ func Comment(ctx *middleware.Context) { func Labels(ctx *middleware.Context) { ctx.Data["Title"] = ctx.Tr("repo.labels") ctx.Data["PageIsLabels"] = true + ctx.Data["RequireMinicolors"] = true ctx.HTML(200, LABELS) } @@ -1031,6 +1041,7 @@ func Milestones(ctx *middleware.Context) { func NewMilestone(ctx *middleware.Context) { ctx.Data["Title"] = ctx.Tr("repo.milestones.new") ctx.Data["PageIsMilestones"] = true + ctx.Data["RequireDatetimepicker"] = true ctx.Data["DateLang"] = setting.DateLang(ctx.Locale.Language()) ctx.HTML(200, MILESTONE_NEW) } @@ -1038,6 +1049,7 @@ func NewMilestone(ctx *middleware.Context) { func NewMilestonePost(ctx *middleware.Context, form auth.CreateMilestoneForm) { ctx.Data["Title"] = ctx.Tr("repo.milestones.new") ctx.Data["PageIsMilestones"] = true + ctx.Data["RequireDatetimepicker"] = true ctx.Data["DateLang"] = setting.DateLang(ctx.Locale.Language()) if ctx.HasError() { @@ -1073,6 +1085,7 @@ func EditMilestone(ctx *middleware.Context) { ctx.Data["Title"] = ctx.Tr("repo.milestones.edit") ctx.Data["PageIsMilestones"] = true ctx.Data["PageIsEditMilestone"] = true + ctx.Data["RequireDatetimepicker"] = true ctx.Data["DateLang"] = setting.DateLang(ctx.Locale.Language()) m, err := models.GetMilestoneByID(ctx.ParamsInt64(":id")) @@ -1096,6 +1109,7 @@ func EditMilestonePost(ctx *middleware.Context, form auth.CreateMilestoneForm) { ctx.Data["Title"] = ctx.Tr("repo.milestones.edit") ctx.Data["PageIsMilestones"] = true ctx.Data["PageIsEditMilestone"] = true + ctx.Data["RequireDatetimepicker"] = true ctx.Data["DateLang"] = setting.DateLang(ctx.Locale.Language()) if ctx.HasError() { |