Split org Propfile README to a new tab overview
(#31373)
like user profile, add a new overviw tab to show profile READEME when it is exist. replace #31349 (another solution option) example view:   --------- Signed-off-by: a1012112796 <1012112796@qq.com>
This commit is contained in:
parent
521d91944e
commit
39d2fdefaf
6 changed files with 67 additions and 37 deletions
|
@ -162,3 +162,15 @@ func LoadHeaderCount(ctx *context.Context) error {
|
|||
|
||||
return nil
|
||||
}
|
||||
|
||||
func RenderOrgHeader(ctx *context.Context) error {
|
||||
if err := LoadHeaderCount(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
_, _, profileReadmeBlob, profileClose := FindUserProfileReadme(ctx, ctx.Doer)
|
||||
defer profileClose()
|
||||
ctx.Data["HasProfileReadme"] = profileReadmeBlob != nil
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue