mirror of
https://github.com/go-gitea/gitea
synced 2024-11-13 21:54:24 +00:00
Fix the display of org level badges (#26504)
Follow #24654 #22705 #24232 In some pages we still have missing badges, for example: ![image](https://github.com/go-gitea/gitea/assets/18380374/f57fae6d-95ad-4996-8881-160c9cd27768) ![image](https://github.com/go-gitea/gitea/assets/18380374/11e86d43-b715-4d14-bdf0-51bf8b5c7b01) ![image](https://github.com/go-gitea/gitea/assets/18380374/61c514e7-d8f6-4c93-a61f-60604619e3a7)
This commit is contained in:
parent
31c92d9695
commit
0850be6750
@ -250,6 +250,7 @@ func HandleOrgAssignment(ctx *Context, args ...bool) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ctx.Data["ContextUser"] = ctx.ContextUser
|
||||||
|
|
||||||
ctx.Data["CanReadProjects"] = ctx.Org.CanReadUnit(ctx, unit.TypeProjects)
|
ctx.Data["CanReadProjects"] = ctx.Org.CanReadUnit(ctx, unit.TypeProjects)
|
||||||
ctx.Data["CanReadPackages"] = ctx.Org.CanReadUnit(ctx, unit.TypePackages)
|
ctx.Data["CanReadPackages"] = ctx.Org.CanReadUnit(ctx, unit.TypePackages)
|
||||||
|
@ -471,6 +471,7 @@ func RepoAssignment(ctx *Context) context.CancelFunc {
|
|||||||
}
|
}
|
||||||
ctx.Repo.Owner = owner
|
ctx.Repo.Owner = owner
|
||||||
ctx.ContextUser = owner
|
ctx.ContextUser = owner
|
||||||
|
ctx.Data["ContextUser"] = ctx.ContextUser
|
||||||
ctx.Data["Username"] = ctx.Repo.Owner.Name
|
ctx.Data["Username"] = ctx.Repo.Owner.Name
|
||||||
|
|
||||||
// redirect link to wiki
|
// redirect link to wiki
|
||||||
|
@ -152,7 +152,6 @@ func Home(ctx *context.Context) {
|
|||||||
pager.SetDefaultParams(ctx)
|
pager.SetDefaultParams(ctx)
|
||||||
pager.AddParam(ctx, "language", "Language")
|
pager.AddParam(ctx, "language", "Language")
|
||||||
ctx.Data["Page"] = pager
|
ctx.Data["Page"] = pager
|
||||||
ctx.Data["ContextUser"] = ctx.ContextUser
|
|
||||||
|
|
||||||
ctx.Data["ShowMemberAndTeamTab"] = ctx.Org.IsMember || len(members) > 0
|
ctx.Data["ShowMemberAndTeamTab"] = ctx.Org.IsMember || len(members) > 0
|
||||||
|
|
||||||
|
@ -62,7 +62,6 @@ func Members(ctx *context.Context) {
|
|||||||
}
|
}
|
||||||
ctx.Data["Page"] = pager
|
ctx.Data["Page"] = pager
|
||||||
ctx.Data["Members"] = members
|
ctx.Data["Members"] = members
|
||||||
ctx.Data["ContextUser"] = ctx.ContextUser
|
|
||||||
ctx.Data["MembersIsPublicMember"] = membersIsPublic
|
ctx.Data["MembersIsPublicMember"] = membersIsPublic
|
||||||
ctx.Data["MembersIsUserOrgOwner"] = organization.IsUserOrgOwner(members, org.ID)
|
ctx.Data["MembersIsUserOrgOwner"] = organization.IsUserOrgOwner(members, org.ID)
|
||||||
ctx.Data["MembersTwoFaStatus"] = members.GetTwoFaStatus()
|
ctx.Data["MembersTwoFaStatus"] = members.GetTwoFaStatus()
|
||||||
|
@ -45,7 +45,6 @@ func Settings(ctx *context.Context) {
|
|||||||
ctx.Data["PageIsSettingsOptions"] = true
|
ctx.Data["PageIsSettingsOptions"] = true
|
||||||
ctx.Data["CurrentVisibility"] = ctx.Org.Organization.Visibility
|
ctx.Data["CurrentVisibility"] = ctx.Org.Organization.Visibility
|
||||||
ctx.Data["RepoAdminChangeTeamAccess"] = ctx.Org.Organization.RepoAdminChangeTeamAccess
|
ctx.Data["RepoAdminChangeTeamAccess"] = ctx.Org.Organization.RepoAdminChangeTeamAccess
|
||||||
ctx.Data["ContextUser"] = ctx.ContextUser
|
|
||||||
ctx.HTML(http.StatusOK, tplSettingsOptions)
|
ctx.HTML(http.StatusOK, tplSettingsOptions)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +56,6 @@ func Teams(ctx *context.Context) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
ctx.Data["Teams"] = ctx.Org.Teams
|
ctx.Data["Teams"] = ctx.Org.Teams
|
||||||
ctx.Data["ContextUser"] = ctx.ContextUser
|
|
||||||
|
|
||||||
ctx.HTML(http.StatusOK, tplTeams)
|
ctx.HTML(http.StatusOK, tplTeams)
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,6 @@ func Packages(ctx *context.Context) {
|
|||||||
|
|
||||||
ctx.Data["Title"] = ctx.Tr("packages.title")
|
ctx.Data["Title"] = ctx.Tr("packages.title")
|
||||||
ctx.Data["IsPackagesPage"] = true
|
ctx.Data["IsPackagesPage"] = true
|
||||||
ctx.Data["ContextUser"] = ctx.ContextUser
|
|
||||||
ctx.Data["Query"] = query
|
ctx.Data["Query"] = query
|
||||||
ctx.Data["PackageType"] = packageType
|
ctx.Data["PackageType"] = packageType
|
||||||
ctx.Data["AvailableTypes"] = packages.TypeList
|
ctx.Data["AvailableTypes"] = packages.TypeList
|
||||||
|
@ -22,7 +22,6 @@ import (
|
|||||||
func prepareContextForCommonProfile(ctx *context.Context) {
|
func prepareContextForCommonProfile(ctx *context.Context) {
|
||||||
ctx.Data["IsPackageEnabled"] = setting.Packages.Enabled
|
ctx.Data["IsPackageEnabled"] = setting.Packages.Enabled
|
||||||
ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled
|
ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled
|
||||||
ctx.Data["ContextUser"] = ctx.ContextUser
|
|
||||||
ctx.Data["EnableFeed"] = setting.Other.EnableFeed
|
ctx.Data["EnableFeed"] = setting.Other.EnableFeed
|
||||||
ctx.Data["FeedURL"] = ctx.ContextUser.HomeLink()
|
ctx.Data["FeedURL"] = ctx.ContextUser.HomeLink()
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,6 @@ func CodeSearch(ctx *context.Context) {
|
|||||||
ctx.Data["IsPackageEnabled"] = setting.Packages.Enabled
|
ctx.Data["IsPackageEnabled"] = setting.Packages.Enabled
|
||||||
ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled
|
ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled
|
||||||
ctx.Data["Title"] = ctx.Tr("explore.code")
|
ctx.Data["Title"] = ctx.Tr("explore.code")
|
||||||
ctx.Data["ContextUser"] = ctx.ContextUser
|
|
||||||
|
|
||||||
language := ctx.FormTrim("l")
|
language := ctx.FormTrim("l")
|
||||||
keyword := ctx.FormTrim("q")
|
keyword := ctx.FormTrim("q")
|
||||||
|
@ -27,6 +27,7 @@ func UserAssignmentWeb() func(ctx *context.Context) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
ctx.ContextUser = userAssignment(ctx.Base, ctx.Doer, errorFn)
|
ctx.ContextUser = userAssignment(ctx.Base, ctx.Doer, errorFn)
|
||||||
|
ctx.Data["ContextUser"] = ctx.ContextUser
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user