From 1769bb2f26aa26ae7476cef8eb97272f44aa28b4 Mon Sep 17 00:00:00 2001 From: FuXiaoHei Date: Mon, 12 May 2014 21:51:22 +0800 Subject: [PATCH] add milestone edit ui --- cmd/web.go | 1 + routers/repo/issue.go | 9 +++++ templates/issue/milestone.tmpl | 4 +- templates/issue/milestone_edit.tmpl | 62 +++++++++++++++++++++++++++++ templates/issue/milestone_new.tmpl | 2 +- 5 files changed, 75 insertions(+), 3 deletions(-) create mode 100644 templates/issue/milestone_edit.tmpl diff --git a/cmd/web.go b/cmd/web.go index 9a42b27a11..d7a760405c 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -187,6 +187,7 @@ func runWeb(*cli.Context) { r.Post("/issues/:index/assignee", repo.UpdateAssignee) r.Get("/issues/milestones", repo.Milestones) r.Get("/issues/milestones/new", repo.NewMilestones) + r.Get("/issues/milestones/edit", repo.UpdateMilestones) r.Post("/comment/:action", repo.Comment) r.Get("/releases/new", repo.ReleasesNew) }, reqSignIn, middleware.RepoAssignment(true)) diff --git a/routers/repo/issue.go b/routers/repo/issue.go index 6218959585..3ef6236aac 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -498,3 +498,12 @@ func NewMilestones(ctx *middleware.Context) { ctx.HTML(200, "issue/milestone_new") } + +func UpdateMilestones(ctx *middleware.Context) { + ctx.Data["Title"] = "Update Milestones" + ctx.Data["IsRepoToolbarIssues"] = true + ctx.Data["IsRepoToolbarIssuesList"] = true + + ctx.HTML(200, "issue/milestone_edit") +} + diff --git a/templates/issue/milestone.tmpl b/templates/issue/milestone.tmpl index a688fb4cc5..0b69a75deb 100644 --- a/templates/issue/milestone.tmpl +++ b/templates/issue/milestone.tmpl @@ -23,7 +23,7 @@ 12 2

- Edit + Edit Open Close Delete @@ -37,7 +37,7 @@ 12 2

- Edit + Edit Open Close Delete diff --git a/templates/issue/milestone_edit.tmpl b/templates/issue/milestone_edit.tmpl new file mode 100644 index 0000000000..2db55ae91b --- /dev/null +++ b/templates/issue/milestone_edit.tmpl @@ -0,0 +1,62 @@ +{{template "base/head" .}} +{{template "base/navbar" .}} +{{template "repo/nav" .}} +{{template "repo/toolbar" .}} +

+
+
+ {{.CsrfTokenHtml}} + {{template "base/alert" .}} +
+ +
+
+
+ +
+
+
+ Content with Markdown +
+ +
+
+
+ +
+
+
loading...
+
+
+
+
+ + +
+
+
+
+

Milestone Due Date

+ +
+ +
+
+
+
+
+ + +{{template "base/footer" .}} diff --git a/templates/issue/milestone_new.tmpl b/templates/issue/milestone_new.tmpl index 544ae6ea0b..2db55ae91b 100644 --- a/templates/issue/milestone_new.tmpl +++ b/templates/issue/milestone_new.tmpl @@ -4,7 +4,7 @@ {{template "repo/toolbar" .}}
-
+ {{.CsrfTokenHtml}} {{template "base/alert" .}}