From 54593db38cb2fe2592c0e0954e56aa161b28252e Mon Sep 17 00:00:00 2001 From: Ben Chang Date: Tue, 17 Dec 2024 05:46:13 +0000 Subject: [PATCH] make sure the drop down appears only when criteria are met --- routers/web/org/home.go | 8 +++++++- templates/org/home.tmpl | 6 ++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/routers/web/org/home.go b/routers/web/org/home.go index e0730934761..c559dd3be4d 100644 --- a/routers/web/org/home.go +++ b/routers/web/org/home.go @@ -5,10 +5,10 @@ package org import ( "fmt" + html_template "html/template" "net/http" "path" "strings" - html_template "html/template" "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/organization" @@ -131,6 +131,12 @@ func home(ctx *context.Context, viewRepositories bool) { ctx.Data["PageIsViewRepositories"] = true } + err = shared_user.RenderOrgHeader(ctx) + if err != nil { + ctx.ServerError("RenderOrgHeader", err) + return + } + var ( repos []*repo_model.Repository count int64 diff --git a/templates/org/home.tmpl b/templates/org/home.tmpl index a8e5d4ebd25..e74cbebd896 100644 --- a/templates/org/home.tmpl +++ b/templates/org/home.tmpl @@ -5,16 +5,18 @@
+ {{if and .ShowMemberAndTeamTab .HasPublicProfileReadme .HasPrivateProfileReadme}} + {{end}} {{if .IsViewerMember}} - {{if .PrivateProfileReadme}} + {{if and .ShowMemberAndTeamTab .PrivateProfileReadme}}
{{.PrivateProfileReadme}}
{{end}} {{else}}