Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wxiaoguang committed Dec 31, 2024
1 parent 4e7465a commit 0dcd145
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
8 changes: 4 additions & 4 deletions options/locale/locale_en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1015,8 +1015,8 @@ new_repo_helper = A repository contains all project files, including revision hi
owner = Owner
owner_helper = Some organizations may not show up in the dropdown due to a maximum repository count limit.
repo_name = Repository Name
repo_name_profile_public_hint= .profile is a special repository that you can use to add README.md to your public organization profile, visible to anyone. Make sure it’s public and initialize it with a README in the profile directory to get started.
repo_name_profile_private_hint = .profile-private is a special repository that you can use to add a README.md to your organization member profile, visible only to organization members. Make sure it’s private and initialize it with a README in the profile directory to get started.
repo_name_profile_public_hint= .profile is a special repository that you can use to add README.md and Wiki to your public organization profile, visible to anyone. Make sure it’s public and initialize it with a README in the profile directory to get started.
repo_name_profile_private_hint = .profile-private is a special repository that you can use to add a README.md and Wiki to your organization member profile, visible only to organization members. Make sure it’s private and initialize it with a README in the profile directory to get started.
repo_name_helper = Good repository names use short, memorable and unique keywords. A repository named '.profile' or '.profile-private' could be used to add a README.md for the user/organization profile.
repo_size = Repository Size
template = Template
Expand Down Expand Up @@ -2865,8 +2865,8 @@ teams.invite.by = Invited by %s
teams.invite.description = Please click the button below to join the team.
view_as_role = View as: %s
view_as_public_hint = You are viewing the README a public user.
view_as_member_hint = You are viewing the README a member of this organization.
view_as_public_hint = You are viewing the README/Wiki as a public user.
view_as_member_hint = You are viewing the README/Wiki as a member of this organization.
[admin]
maintenance = Maintenance
Expand Down
3 changes: 3 additions & 0 deletions routers/web/org/home.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ func prepareOrgProfileReadme(ctx *context.Context, prepareResult *shared_user.Pr
return false
}

ctx.Data["HasOrgProfileWiki"] = profileRepo.HasWiki()
ctx.Data["OrgProfileRepo"] = profileRepo

readmeBytes, err := readmeBlob.GetBlobContent(setting.UI.MaxDisplayFileSize)
if err != nil {
log.Error("failed to GetBlobContent for profile %q (view as %q) readme: %v", profileRepo.FullName(), viewAs, err)
Expand Down
5 changes: 3 additions & 2 deletions templates/org/home.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@
{{if .ShowMemberAndTeamTab}}
<div class="ui five wide column">
{{if .CanCreateOrgRepo}}
<div class="flex-text-block tw-flex-wrap tw-justify-end tw-mb-4">
<div class="center aligned tw-mb-4">
<a class="ui primary button" href="{{AppSubUrl}}/repo/create?org={{.Org.ID}}">{{ctx.Locale.Tr "new_repo"}}</a>
{{if not .DisableNewPullMirrors}}
<a class="ui primary button" href="{{AppSubUrl}}/repo/migrate?org={{.Org.ID}}&mirror=1">{{ctx.Locale.Tr "new_migrate"}}</a>
{{end}}
</div>
<div class="divider"></div>
{{end}}

{{if and .ShowMemberAndTeamTab .ShowOrgProfileReadmeSelector}}
Expand Down Expand Up @@ -55,7 +56,7 @@
{{$isMember := .IsOrganizationMember}}
{{range .Members}}
{{if or $isMember (call $.IsPublicMember .ID)}}
<a href="{{.HomeLink}}" data-tooltip-content="{{.Name}}{{if .FullName}} ({{.FullName}}){{end}}">{{ctx.AvatarUtils.Avatar . 24}}</a>
<a href="{{.HomeLink}}" title="{{.Name}}{{if .FullName}} ({{.FullName}}){{end}}">{{ctx.AvatarUtils.Avatar . 48}}</a>
{{end}}
{{end}}
</div>
Expand Down
2 changes: 1 addition & 1 deletion templates/org/menu.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
{{end}}
</a>
{{end}}
{{if .HasProfileWiki}}
{{if .HasOrgProfileWiki}}
<a class="item" href="{{$.OrgProfileRepo.Link}}/wiki">
{{svg "octicon-book"}} {{ctx.Locale.Tr "repo.wiki"}}
</a>
Expand Down

0 comments on commit 0dcd145

Please sign in to comment.