diff --git a/cmd/web.go b/cmd/web.go index 3d9d4a7c84..f2a506bc19 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -406,6 +406,7 @@ func runWeb(*cli.Context) { m.Get("/issues2/", repo.Issues2) m.Get("/pulls2/", repo.PullRequest2) m.Get("/labels2/", repo.Labels2) + m.Get("/milestone2/",repo.Milestones2) m.Group("", func() { m.Get("/src/*", repo.Home) diff --git a/public/ng/css/gogs.css b/public/ng/css/gogs.css index 1bb1e84ad1..1eb73817a5 100644 --- a/public/ng/css/gogs.css +++ b/public/ng/css/gogs.css @@ -2019,10 +2019,12 @@ textarea#issue-add-content { #issue-list-nav li.right { margin-left: 4px; } -#issue-new > a { +#issue-new > a, +#milestone-new > a { padding: 0 !important; } -#issue-new > a button { +#issue-new > a button, +#milestone-new > a button { height: 29px; } #issue-list-menu { @@ -2127,6 +2129,45 @@ textarea#issue-add-content { margin-bottom: 12px; border-bottom: 1px dashed #AAA; } +#milestone-list { + padding-top: 6px; +} +#milestone-list .title-text { + font-size: 16px; +} +#milestone-list .desc { + color: #999; +} +#milestone-list .item { + padding-bottom: 18px; + margin-bottom: 18px; + border-bottom: 1px dashed #AAA; + position: relative; +} +#milestone-list .action { + position: absolute; + top: 0; + right: 0; +} +#milestone-list .status-bar > .bar { + margin: -2px 8px 0 8px; + width: 360px; + background-color: #DDD; + height: 14px; + vertical-align: middle; +} +#milestone-list .status-bar .opening { + background-color: #65ad4e; + width: 40%; + height: 14px; + vertical-align: top; +} +#milestone-list .action-bar { + margin-top: 8px; +} +#milestone-list .action-bar a { + margin-left: 12px; +} .org-header-alert .alert { margin-top: 10px; } diff --git a/public/ng/less/gogs/issue.less b/public/ng/less/gogs/issue.less index 79f9d793f0..86e47d77ef 100644 --- a/public/ng/less/gogs/issue.less +++ b/public/ng/less/gogs/issue.less @@ -243,7 +243,8 @@ textarea#issue-add-content { } } // new issue button -#issue-new { +#issue-new, +#milestone-new{ > a { padding: 0 !important; button { @@ -363,4 +364,46 @@ textarea#issue-add-content { margin-bottom: 12px; border-bottom: 1px dashed #AAA; } +} +// milestone items +#milestone-list{ + padding-top: 6px; + .title-text{ + font-size: 16px; + } + .desc { + color: #999; + } + .item { + padding-bottom: 18px; + margin-bottom: 18px; + border-bottom: 1px dashed #AAA; + position: relative; + } + .action{ + position: absolute; + top: 0; + right: 0; + } + .status-bar { + > .bar { + margin: -2px 8px 0 8px; + width: 360px; + background-color: #DDD; + height: 14px; + vertical-align:middle; + } + .opening{ + background-color: #65ad4e; + width: 40%; + height: 14px; + vertical-align: top; + } + } + .action-bar{ + margin-top: 8px; + a{ + margin-left: 12px; + } + } } \ No newline at end of file diff --git a/routers/repo/issue.go b/routers/repo/issue.go index b08b06050b..750f4e40c6 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -1133,3 +1133,7 @@ func PullRequest2(ctx *middleware.Context){ func Labels2(ctx *middleware.Context){ ctx.HTML(200,"repo/issue2/labels") } + +func Milestones2(ctx *middleware.Context){ + ctx.HTML(200,"repo/milestone2/list") +} diff --git a/templates/repo/milestone2/list.tmpl b/templates/repo/milestone2/list.tmpl new file mode 100644 index 0000000000..3c7b951d26 --- /dev/null +++ b/templates/repo/milestone2/list.tmpl @@ -0,0 +1,55 @@ +{{template "ng/base/head" .}} +{{template "ng/base/header" .}} +
+ {{template "repo/header" .}} +
+ +
+ + +
+
+
+{{template "ng/base/footer" .}} \ No newline at end of file