diff options
author | slene <vslene@gmail.com> | 2014-03-30 17:03:00 +0800 |
---|---|---|
committer | slene <vslene@gmail.com> | 2014-03-30 17:03:00 +0800 |
commit | 4c70249f75a8fd2a7962c9c6c0d6fec13e7f2192 (patch) | |
tree | 3c5c1cac24081bcdb7bc0e65f9d21b2cb4d7e4e6 | |
parent | 816bb0872003eaded2ad7a725f8448025b1b2ee0 (diff) |
fix some link
-rw-r--r-- | models/user.go | 2 | ||||
-rw-r--r-- | modules/middleware/context.go | 2 | ||||
-rw-r--r-- | templates/user/profile.tmpl | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/models/user.go b/models/user.go index 6ca16ec3..a392fa76 100644 --- a/models/user.go +++ b/models/user.go @@ -67,7 +67,7 @@ type User struct { // HomeLink returns the user home page link. func (user *User) HomeLink() string { - return "/user/" + user.LowerName + return "/user/" + user.Name } // AvatarLink returns the user gravatar link. diff --git a/modules/middleware/context.go b/modules/middleware/context.go index a6aa58ee..5f1d42b1 100644 --- a/modules/middleware/context.go +++ b/modules/middleware/context.go @@ -269,7 +269,7 @@ func InitContext() martini.Handler { if user != nil { ctx.Data["SignedUser"] = user ctx.Data["SignedUserId"] = user.Id - ctx.Data["SignedUserName"] = user.LowerName + ctx.Data["SignedUserName"] = user.Name ctx.Data["IsAdmin"] = ctx.User.IsAdmin } diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl index 97549d48..88ee318f 100644 --- a/templates/user/profile.tmpl +++ b/templates/user/profile.tmpl @@ -51,7 +51,7 @@ <li> <div class="meta pull-right"><!-- <i class="fa fa-star"></i> {{.NumStars}} --> <i class="fa fa-code-fork"></i> {{.NumForks}}</div> <h4> - <a href="/{{$owner.Name}}/{{.LowerName}}">{{.LowerName}}</a> + <a href="/{{$owner.Name}}/{{.Name}}">{{.Name}}</a> </h4> <p class="desc">{{.Description}}</p> <div class="info">Last updated {{.Updated|TimeSince}}</div> @@ -63,4 +63,4 @@ </div> </div> </div> -{{template "base/footer" .}}
\ No newline at end of file +{{template "base/footer" .}} |