Merge pull request #2383 from exmex/develop

Added organization display on profile
This commit is contained in:
Unknwon 2016-01-14 21:07:17 +08:00
commit f75b5f4287
2 changed files with 14 additions and 2 deletions

View file

@ -74,6 +74,13 @@ func Profile(ctx *middleware.Context) {
ctx.Data["Title"] = u.DisplayName()
ctx.Data["PageIsUserProfile"] = true
ctx.Data["Owner"] = u
orgs, err := models.GetOwnedOrgsByUserIDDesc(u.Id, "updated")
if err != nil {
ctx.Handle(500, "GetOwnedOrgsByUserIDDesc", err)
return
}
ctx.Data["Orgs"] = orgs
tab := ctx.Query("tab")
ctx.Data["TabName"] = tab