diff --git a/public/css/gogs.css b/public/css/gogs.css index 6bf698e8b1f..6d498e0e652 100755 --- a/public/css/gogs.css +++ b/public/css/gogs.css @@ -1014,11 +1014,11 @@ html, body { margin-bottom: 0; } -#issue-create-form .nav-tabs { +#issue-create-form .nav-tabs, #issue .issue-reply .nav-tabs { margin-bottom: 10px; } -#issue-create-form .md-help { +#issue .md-help { margin-top: 6px; } @@ -1095,6 +1095,75 @@ html, body { vertical-align: top; } +#issue .issue-whole .title { + margin-top: 0; + font-size: 28px; +} + +#issue .issue-whole .number { + font-size: 26px; + color: #AAA; +} + +#issue .issue-head .author .avatar { + width: 48px; + height: 48px; + margin-right: 16px; +} + +#issue .issue-head .info { + width: 99%; + margin-top: 10px; + padding-left: 64px; + margin-bottom: 16px; + padding-bottom: 20px; + border-bottom: 1px solid #CCC; +} + +#issue .issue-head .status { + font-size: 16px; + font-weight: bold; + padding: 6px 18px; + border-radius: 3px; +} + +#issue .issue-head a.author { + margin-left: .6em; + color: #444; +} + +#issue .issue-main { + padding-left: 0; +} + +#issue .issue-content { + border-bottom-width: 1px; +} + +#issue .issue-child .user .avatar { + width: 42px; + height: 42px; + margin-right: 12px; +} + +#issue .issue-child .issue-content { + margin-left: 56px; +} + +#issue .issue-child .panel-heading { + padding-top: 10px; + padding-bottom: 10px; + font-weight: normal; +} + +#issue .issue-child .panel-heading .user { + font-weight: bold; +} + +#issue .issue-line { + border-color: #CCC; +} + /* wrapper and footer */ #wrapper { diff --git a/routers/repo/issue.go b/routers/repo/issue.go index a4dbad0f41d..72d07d4acf6 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -20,6 +20,7 @@ import ( func Issues(ctx *middleware.Context, params martini.Params) { ctx.Data["Title"] = "Issues" ctx.Data["IsRepoToolbarIssues"] = true + ctx.Data["IsRepoToolbarIssuesList"] = true milestoneId, _ := base.StrTo(params["milestone"]).Int() page, _ := base.StrTo(params["page"]).Int() diff --git a/templates/issue/list.tmpl b/templates/issue/list.tmpl index 0df68838670..60f22a0d31f 100644 --- a/templates/issue/list.tmpl +++ b/templates/issue/list.tmpl @@ -20,7 +20,7 @@
diff --git a/templates/issue/view.tmpl b/templates/issue/view.tmpl new file mode 100644 index 00000000000..381c79990c6 --- /dev/null +++ b/templates/issue/view.tmpl @@ -0,0 +1,89 @@ +{{template "base/head" .}} +{{template "base/navbar" .}} +{{template "repo/nav" .}} +{{template "repo/toolbar" .}} +
+ Open + linbaozhong opened this issue + 2 months ago · 1 comment +
+context中的Download方法:
+func (output *BeegoOutput) Download(file string)
+建议在file参数后面增加一个可选参数filename.
+如果filename不存在或为空,output.Header("Content-Disposition", "attachment; filename="+filepath.Base(file))
+如果filename不为空,output.Header("Content-Disposition", "attachment; filename="+filename)
+因为有时候,多数情况下,要下载的真实的文件名与显示和保存的本地的文件名是不一样的,希望显示的文件名更友好些
+@slene 看来也只能这样了。最主要是数组与切片的用法,我感觉不科学。因为要知道个数,然后个数与问号个数要对应。不能像PHP YII框架那样,直接传入一个数组,自己在里面把参数组装成1,2,3,4这种格式。希望,Beego框架能加上。那就太完美了。谢谢。
+@slene 看来也只能这样了。最主要是数组与切片的用法,我感觉不科学。因为要知道个数,然后个数与问号个数要对应。不能像PHP YII框架那样,直接传入一个数组,自己在里面把参数组装成1,2,3,4这种格式。希望,Beego框架能加上。那就太完美了。谢谢。
+