|
|
|
@ -6,6 +6,8 @@ package explore
|
|
|
|
|
|
|
|
|
|
import ( |
|
|
|
|
"bytes" |
|
|
|
|
"code.gitea.io/gitea/modules/markup" |
|
|
|
|
"code.gitea.io/gitea/modules/markup/markdown" |
|
|
|
|
"net/http" |
|
|
|
|
|
|
|
|
|
"code.gitea.io/gitea/models/db" |
|
|
|
@ -78,6 +80,20 @@ func RenderUserSearch(ctx *context.Context, opts *user_model.SearchUserOptions,
|
|
|
|
|
ctx.Data["Keyword"] = opts.Keyword |
|
|
|
|
ctx.Data["Total"] = count |
|
|
|
|
ctx.Data["Users"] = users |
|
|
|
|
var renderedCompetences = make(map[int64]string) |
|
|
|
|
for _, user := range users { |
|
|
|
|
renderedCompetences[user.ID], err = markdown.RenderString(&markup.RenderContext{ |
|
|
|
|
URLPrefix: ctx.Repo.RepoLink, |
|
|
|
|
Metas: map[string]string{"mode": "document"}, |
|
|
|
|
GitRepo: ctx.Repo.GitRepo, |
|
|
|
|
Ctx: ctx, |
|
|
|
|
}, user.Competences) |
|
|
|
|
if err != nil { |
|
|
|
|
ctx.ServerError("RenderCompetences", err) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
ctx.Data["RenderedCompetences"] = renderedCompetences |
|
|
|
|
ctx.Data["UsersTwoFaStatus"] = user_model.UserList(users).GetTwoFaStatus() |
|
|
|
|
ctx.Data["ShowUserEmail"] = setting.UI.ShowUserEmail |
|
|
|
|
ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled |
|
|
|
|