diff options
author | a1012112796 <1012112796@qq.com> | 2024-08-27 10:54:12 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-27 10:54:12 +0800 |
commit | 39d2fdefaf0dd42aa5e3ee8d3ea0a84b40c005f5 (patch) | |
tree | f2053041bd48c03688f330468b93c74b873f83bf /routers/web/shared | |
parent | 521d91944ed10add89f435efd2e3df17d8af2d51 (diff) | |
download | gitea-39d2fdefaf0dd42aa5e3ee8d3ea0a84b40c005f5.tar.gz gitea-39d2fdefaf0dd42aa5e3ee8d3ea0a84b40c005f5.zip |
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:
![屏幕截图 2024-06-14
094116](https://github.com/go-gitea/gitea/assets/25342410/3303a1f2-ae02-48e0-9519-7fa11e65657f)
![屏幕截图 2024-06-14
094101](https://github.com/go-gitea/gitea/assets/25342410/7a4a5a48-dc2b-4ad4-b2a2-9ea4ab5d5808)
---------
Signed-off-by: a1012112796 <1012112796@qq.com>
Diffstat (limited to 'routers/web/shared')
-rw-r--r-- | routers/web/shared/user/header.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/routers/web/shared/user/header.go b/routers/web/shared/user/header.go index 7531e1ba26..ef111cff80 100644 --- a/routers/web/shared/user/header.go +++ b/routers/web/shared/user/header.go @@ -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 +} |