aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiteabot <teabot@gitea.io>2024-11-19 10:49:29 +0800
committerGitHub <noreply@github.com>2024-11-19 02:49:29 +0000
commit1b7031c5c273ab4ff41530e10edbc333155852a5 (patch)
tree2c014bc91f6207c475c6f468a4f6fbec8ae2af85
parent673fee427e6426d08d8bb48e583de45d4f70018a (diff)
downloadgitea-1b7031c5c273ab4ff41530e10edbc333155852a5.tar.gz
gitea-1b7031c5c273ab4ff41530e10edbc333155852a5.zip
Fix some places which doesn't repsect org full name setting (#32243) (#32550)
Backport #32243 by @lunny Partially fix #31345 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
-rw-r--r--templates/admin/org/list.tmpl2
-rw-r--r--templates/user/dashboard/repolist.tmpl2
-rw-r--r--web_src/js/components/DashboardRepoList.vue2
3 files changed, 3 insertions, 3 deletions
diff --git a/templates/admin/org/list.tmpl b/templates/admin/org/list.tmpl
index 987ceab1e0..55207a6f97 100644
--- a/templates/admin/org/list.tmpl
+++ b/templates/admin/org/list.tmpl
@@ -52,7 +52,7 @@
<tr>
<td>{{.ID}}</td>
<td>
- <a href="{{.HomeLink}}">{{.Name}}</a>
+ <a href="{{.HomeLink}}">{{if and DefaultShowFullName .FullName}}{{.FullName}} ({{.Name}}){{else}}{{.Name}}{{end}}</a>
{{if .Visibility.IsPrivate}}
<span class="text gold">{{svg "octicon-lock"}}</span>
{{end}}
diff --git a/templates/user/dashboard/repolist.tmpl b/templates/user/dashboard/repolist.tmpl
index be710675d5..a2764ba608 100644
--- a/templates/user/dashboard/repolist.tmpl
+++ b/templates/user/dashboard/repolist.tmpl
@@ -45,7 +45,7 @@ data.teamId = {{.Team.ID}};
{{end}}
{{if not .ContextUser.IsOrganization}}
-data.organizations = [{{range .Orgs}}{'name': {{.Name}}, 'num_repos': {{.NumRepos}}, 'org_visibility': {{.Visibility}}},{{end}}];
+data.organizations = [{{range .Orgs}}{'name': {{.Name}}, 'full_name': {{.FullName}}, 'num_repos': {{.NumRepos}}, 'org_visibility': {{.Visibility}}},{{end}}];
data.isOrganization = false;
data.organizationsTotalCount = {{.UserOrgsCount}};
data.canCreateOrganization = {{.SignedUser.CanCreateOrganization}};
diff --git a/web_src/js/components/DashboardRepoList.vue b/web_src/js/components/DashboardRepoList.vue
index 79f942d345..10df000d66 100644
--- a/web_src/js/components/DashboardRepoList.vue
+++ b/web_src/js/components/DashboardRepoList.vue
@@ -471,7 +471,7 @@ export default sfc; // activate the IDE's Vue plugin
<li class="tw-flex tw-items-center tw-py-2" v-for="org in organizations" :key="org.name">
<a class="repo-list-link muted" :href="subUrl + '/' + encodeURIComponent(org.name)">
<svg-icon name="octicon-organization" :size="16" class-name="repo-list-icon"/>
- <div class="text truncate">{{ org.name }}</div>
+ <div class="text truncate">{{ org.full_name ? `${org.full_name} (${org.name})` : org.name }}</div>
<div><!-- div to prevent underline of label on hover -->
<span class="ui tiny basic label" v-if="org.org_visibility !== 'public'">
{{ org.org_visibility === 'limited' ? textOrgVisibilityLimited: textOrgVisibilityPrivate }}