From e938863ae6887f7c3c24145ed3b64dc1d27ee675 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 30 Mar 2014 16:34:23 -0400 Subject: [PATCH] Mirror fix on UI --- routers/install.go | 2 +- routers/repo/issue.go | 2 +- templates/issue/view.tmpl | 2 +- templates/repo/nav.tmpl | 14 ++++---------- 4 files changed, 7 insertions(+), 13 deletions(-) diff --git a/routers/install.go b/routers/install.go index e30c3cfd23..28c2d87f71 100644 --- a/routers/install.go +++ b/routers/install.go @@ -156,7 +156,7 @@ func Install(ctx *middleware.Context, form auth.InstallForm) { base.Cfg.SetValue("server", "DOMAIN", form.Domain) base.Cfg.SetValue("server", "ROOT_URL", form.AppUrl) - if len(form.Host) > 0 { + if len(strings.TrimSpace(form.SmtpHost)) > 0 { base.Cfg.SetValue("mailer", "ENABLED", "true") base.Cfg.SetValue("mailer", "HOST", form.SmtpHost) base.Cfg.SetValue("mailer", "USER", form.SmtpEmail) diff --git a/routers/repo/issue.go b/routers/repo/issue.go index f2d8959a04..6cad2c25d2 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -164,7 +164,7 @@ func ViewIssue(ctx *middleware.Context, params martini.Params) { ctx.Data["Title"] = issue.Name ctx.Data["Issue"] = issue ctx.Data["Comments"] = comments - ctx.Data["IsIssueOwner"] = ctx.Repo.IsOwner || issue.PosterId == ctx.User.Id + ctx.Data["IsIssueOwner"] = ctx.Repo.IsOwner || (ctx.IsSigned && issue.PosterId == ctx.User.Id) ctx.Data["IsRepoToolbarIssues"] = true ctx.Data["IsRepoToolbarIssuesList"] = false ctx.HTML(200, "issue/view") diff --git a/templates/issue/view.tmpl b/templates/issue/view.tmpl index df8b660769..e619451cc1 100644 --- a/templates/issue/view.tmpl +++ b/templates/issue/view.tmpl @@ -14,7 +14,7 @@

{{if .IsIssueOwner}}Edit - {{end}} + {{end}} {{if .Issue.IsClosed}}Closed{{else}}Open{{end}} {{.Issue.Poster.Name}} opened this issue {{TimeSince .Issue.Created}} ยท {{.Issue.NumComments}} comments diff --git a/templates/repo/nav.tmpl b/templates/repo/nav.tmpl index 02096c34c1..6156d5791e 100644 --- a/templates/repo/nav.tmpl +++ b/templates/repo/nav.tmpl @@ -7,12 +7,6 @@

{{if not .IsBareRepo}} -

Need help cloning? Visit Help!

-
+
@@ -61,9 +55,9 @@
--> {{end}} -
+