@@ -111,7 +111,7 @@ func home(ctx *context.Context, viewRepositories bool) {
111111 ctx .Data ["DisableNewPullMirrors" ] = setting .Mirror .DisableNewPull
112112 ctx .Data ["ShowMemberAndTeamTab" ] = ctx .Org .IsMember || len (members ) > 0
113113
114- if ! prepareOrgProfileReadme (ctx , viewRepositories ) {
114+ if ! prepareOrgProfileRepo (ctx , viewRepositories ) {
115115 ctx .Data ["PageIsViewRepositories" ] = true
116116 }
117117
@@ -168,15 +168,18 @@ func home(ctx *context.Context, viewRepositories bool) {
168168 ctx .HTML (http .StatusOK , tplOrgHome )
169169}
170170
171- func prepareOrgProfileReadme (ctx * context.Context , viewRepositories bool ) bool {
171+ func prepareOrgProfileRepo (ctx * context.Context , viewRepositories bool ) bool {
172172 profileDbRepo , profileGitRepo , profileReadme , profileClose := shared_user .FindUserProfileReadme (ctx , ctx .Doer )
173173 defer profileClose ()
174- ctx .Data ["HasProfileReadme" ] = profileReadme != nil
175174
176175 if profileGitRepo == nil || profileReadme == nil || viewRepositories {
177176 return false
178177 }
179178
179+ ctx .Data ["OrgProfileRepo" ] = profileDbRepo
180+ ctx .Data ["HasProfileWiki" ] = profileDbRepo .HasWiki ()
181+ ctx .Data ["HasProfileReadme" ] = true
182+
180183 if bytes , err := profileReadme .GetBlobContent (setting .UI .MaxDisplayFileSize ); err != nil {
181184 log .Error ("failed to GetBlobContent: %v" , err )
182185 } else {
0 commit comments