mirror of
https://github.com/go-gitea/gitea.git
synced 2024-09-05 23:34:19 -04:00
Merge pull request #2383 from exmex/develop
Added organization display on profile
This commit is contained in:
commit
f75b5f4287
@ -75,6 +75,13 @@ func Profile(ctx *middleware.Context) {
|
||||
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
|
||||
switch tab {
|
||||
|
@ -40,7 +40,7 @@
|
||||
{{end}}
|
||||
<li><i class="icon octicon octicon-clock"></i> {{.i18n.Tr "user.join_on"}} {{DateFmtShort .Owner.Created}}</li>
|
||||
<li>
|
||||
<i class="user icon"></i>
|
||||
<i class="icon octicon octicon-person"></i>
|
||||
<a href="{{.Owner.HomeLink}}/followers">
|
||||
{{.Owner.NumFollowers}} {{.i18n.Tr "user.followers"}}
|
||||
</a>
|
||||
@ -51,12 +51,17 @@
|
||||
</li>
|
||||
{{/*
|
||||
<li>
|
||||
<i class="octicon octicon-star"></i>
|
||||
<i class="icon octicon octicon-star"></i>
|
||||
<a href="{{.Owner.HomeLink}}/stars">
|
||||
{{.Owner.NumStars}} {{.i18n.Tr "user.starred"}}
|
||||
</a>
|
||||
</li>
|
||||
*/}}
|
||||
<li>
|
||||
{{range .Orgs}}
|
||||
<a href="{{.HomeLink}}"><img class="ui mini image" src="{{.AvatarLink}}"></a>
|
||||
{{end}}
|
||||
</li>
|
||||
{{if and .IsSigned (ne .SignedUserName .Owner.Name)}}
|
||||
<li class="follow">
|
||||
{{if .SignedUser.IsFollowing .Owner.Id}}
|
||||
|
Loading…
Reference in New Issue
Block a user