@@ -16,6 +16,8 @@ import (
16
16
"code.gitea.io/gitea/modules/git"
17
17
"code.gitea.io/gitea/modules/gitrepo"
18
18
"code.gitea.io/gitea/modules/log"
19
+ "code.gitea.io/gitea/modules/markup"
20
+ "code.gitea.io/gitea/modules/markup/markdown"
19
21
"code.gitea.io/gitea/modules/optional"
20
22
"code.gitea.io/gitea/modules/setting"
21
23
"code.gitea.io/gitea/services/context"
@@ -34,6 +36,7 @@ func prepareContextForCommonProfile(ctx *context.Context) {
34
36
func PrepareContextForProfileBigAvatar (ctx * context.Context ) {
35
37
prepareContextForCommonProfile (ctx )
36
38
39
+ ctx .Data ["IsFollowing" ] = ctx .Doer != nil && user_model .IsFollowing (ctx , ctx .Doer .ID , ctx .ContextUser .ID )
37
40
ctx .Data ["ShowUserEmail" ] = setting .UI .ShowUserEmail && ctx .ContextUser .Email != "" && ctx .IsSigned && ! ctx .ContextUser .KeepEmailPrivate
38
41
if setting .Service .UserLocationMapURL != "" {
39
42
ctx .Data ["ContextUserLocationMapURL" ] = setting .Service .UserLocationMapURL + url .QueryEscape (ctx .ContextUser .Location )
@@ -45,6 +48,17 @@ func PrepareContextForProfileBigAvatar(ctx *context.Context) {
45
48
return
46
49
}
47
50
ctx .Data ["OpenIDs" ] = openIDs
51
+ if len (ctx .ContextUser .Description ) != 0 {
52
+ content , err := markdown .RenderString (& markup.RenderContext {
53
+ Metas : map [string ]string {"mode" : "document" },
54
+ Ctx : ctx ,
55
+ }, ctx .ContextUser .Description )
56
+ if err != nil {
57
+ ctx .ServerError ("RenderString" , err )
58
+ return
59
+ }
60
+ ctx .Data ["RenderedDescription" ] = content
61
+ }
48
62
49
63
showPrivate := ctx .IsSigned && (ctx .Doer .IsAdmin || ctx .Doer .ID == ctx .ContextUser .ID )
50
64
orgs , err := db .Find [organization.Organization ](ctx , organization.FindOrgOptions {
0 commit comments