From a00194e665af4731cf353a7d1da9bba1d7a3530f Mon Sep 17 00:00:00 2001 From: Unknwon Date: Fri, 28 Aug 2015 19:15:25 +0800 Subject: [PATCH] work on #1548 --- routers/repo/issue.go | 1 + templates/repo/issue/comment_tab.tmpl | 4 ++-- templates/repo/issue/view_content.tmpl | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/routers/repo/issue.go b/routers/repo/issue.go index 6a0cc2de3a..5e76cd04c1 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -521,6 +521,7 @@ func ViewIssue(ctx *middleware.Context) { ctx.Data["Issue"] = issue ctx.Data["IsIssueOwner"] = ctx.Repo.IsAdmin() || (ctx.IsSigned && issue.IsPoster(ctx.User.Id)) + ctx.Data["SignInLink"] = setting.AppSubUrl + "/user/login" ctx.HTML(200, ISSUE_VIEW) } diff --git a/templates/repo/issue/comment_tab.tmpl b/templates/repo/issue/comment_tab.tmpl index d6f71e649f..80854440af 100644 --- a/templates/repo/issue/comment_tab.tmpl +++ b/templates/repo/issue/comment_tab.tmpl @@ -1,7 +1,7 @@
@@ -12,5 +12,5 @@
{{if .IsAttachmentEnabled}}
-
+
{{end}} \ No newline at end of file diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index fa0d6868a7..9f36a24ce9 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -69,7 +69,7 @@
{{range .Issue.Attachments}} - + {{end}}
@@ -179,8 +179,8 @@
{{else}}
- {{.i18n.Tr "repo.issues.sign_up_for_free"}} - {{.i18n.Tr "repo.issues.sign_in_require_desc" "/user/login" | Safe}} + {{.i18n.Tr "repo.issues.sign_up_for_free"}} + {{.i18n.Tr "repo.issues.sign_in_require_desc" .SignInLink | Safe}}
{{end}}