Browse Source

fix #1204

pull/1418/head
Unknwon 9 years ago
parent
commit
eea9302d8f
  1. 5
      routers/user/home.go
  2. 2
      templates/org/home.tmpl
  3. 2
      templates/user/profile.tmpl

5
routers/user/home.go

@ -194,11 +194,6 @@ func Profile(ctx *middleware.Context) {
ctx.Redirect(setting.AppSubUrl + "/org/" + u.Name) ctx.Redirect(setting.AppSubUrl + "/org/" + u.Name)
return return
} }
// For security reason, hide e-mail address for anonymous visitors.
if !ctx.IsSigned {
u.Email = ""
}
ctx.Data["Owner"] = u ctx.Data["Owner"] = u
tab := ctx.Query("tab") tab := ctx.Query("tab")

2
templates/org/home.tmpl

@ -12,7 +12,7 @@
<ul class="text-grey"> <ul class="text-grey">
{{if .Org.Location}}<li><span class="octicon octicon-location"></span> <span>{{.Org.Location}}</span></li>{{end}} {{if .Org.Location}}<li><span class="octicon octicon-location"></span> <span>{{.Org.Location}}</span></li>{{end}}
{{if .Org.Website}}<li><span class="octicon octicon-link"></span> <a target="_blank" href="{{.Org.Website}}">{{.Org.Website}}</a></li>{{end}} {{if .Org.Website}}<li><span class="octicon octicon-link"></span> <a target="_blank" href="{{.Org.Website}}">{{.Org.Website}}</a></li>{{end}}
{{if .Org.Email}}<li><span class="octicon octicon-mail"></span> <a href="mailto:{{.Org.Email}}">{{.Org.Email}}</a></li>{{end}} {{if and .Org.Email .IsSigned}}<li><span class="octicon octicon-mail"></span> <a href="mailto:{{.Org.Email}}">{{.Org.Email}}</a></li>{{end}}
</ul> </ul>
</div> </div>
</div> </div>

2
templates/user/profile.tmpl

@ -22,7 +22,7 @@
{{if .Owner.Location}} {{if .Owner.Location}}
<li class="list-group-item"><i class="octicon octicon-location"></i>&nbsp;&nbsp;{{.Owner.Location}}</li> <li class="list-group-item"><i class="octicon octicon-location"></i>&nbsp;&nbsp;{{.Owner.Location}}</li>
{{end}} {{end}}
{{if .Owner.Email}} {{if and .Owner.Email .IsSigned}}
<li class="list-group-item"><i class="octicon octicon-mail"></i>&nbsp;&nbsp;<a href="mailto:{{.Owner.Email}}" rel="nofollow">{{.Owner.Email}}</a></li> <li class="list-group-item"><i class="octicon octicon-mail"></i>&nbsp;&nbsp;<a href="mailto:{{.Owner.Email}}" rel="nofollow">{{.Owner.Email}}</a></li>
{{end}} {{end}}
{{if .Owner.Website}} {{if .Owner.Website}}

Loading…
Cancel
Save