forked from forgejo/forgejo
Add badge capabilities to users (#20607)
Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: John Olheiser <john.olheiser@gmail.com>
This commit is contained in:
parent
208b4ee417
commit
d8e6c99125
8 changed files with 105 additions and 0 deletions
|
@ -105,6 +105,13 @@ func Profile(ctx *context.Context) {
|
|||
ctx.Data["Orgs"] = orgs
|
||||
ctx.Data["HasOrgsVisible"] = organization.HasOrgsVisible(orgs, ctx.Doer)
|
||||
|
||||
badges, _, err := user_model.GetUserBadges(ctx, ctx.ContextUser)
|
||||
if err != nil {
|
||||
ctx.ServerError("GetUserBadges", err)
|
||||
return
|
||||
}
|
||||
ctx.Data["Badges"] = badges
|
||||
|
||||
tab := ctx.FormString("tab")
|
||||
ctx.Data["TabName"] = tab
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue