diff --git a/templates/admin/org/list.tmpl b/templates/admin/org/list.tmpl index 987ceab1e0..76cdf919ce 100644 --- a/templates/admin/org/list.tmpl +++ b/templates/admin/org/list.tmpl @@ -52,7 +52,7 @@ {{.ID}} - {{.Name}} + {{if and DefaultShowFullName .FullName}}{{.FullName}}({{.Name}}){{else}}{{.Name}}{{end}} {{if .Visibility.IsPrivate}} {{svg "octicon-lock"}} {{end}} diff --git a/templates/base/head_script.tmpl b/templates/base/head_script.tmpl index 22e08e9c8f..0a443ab493 100644 --- a/templates/base/head_script.tmpl +++ b/templates/base/head_script.tmpl @@ -13,6 +13,7 @@ If you introduce mistakes in it, Gitea JavaScript code wouldn't run correctly. assetVersionEncoded: encodeURIComponent('{{AssetVersion}}'), // will be used in URL construction directly assetUrlPrefix: '{{AssetUrlPrefix}}', runModeIsProd: {{.RunModeIsProd}}, + defaultShowFullName: {{DefaultShowFullName}}, customEmojis: {{CustomEmojis}}, csrfToken: '{{.CsrfToken}}', pageData: {{.PageData}}, 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 986fcc1181..144e419baf 100644 --- a/web_src/js/components/DashboardRepoList.vue +++ b/web_src/js/components/DashboardRepoList.vue @@ -4,7 +4,7 @@ import $ from 'jquery'; import {SvgIcon} from '../svg.ts'; import {GET} from '../modules/fetch.ts'; -const {appSubUrl, assetUrlPrefix, pageData} = window.config; +const {appSubUrl, assetUrlPrefix, pageData, defaultShowFullName} = window.config; // make sure this matches templates/repo/commit_status.tmpl const commitStatus = { @@ -64,6 +64,7 @@ const sfc = { canCreateOrganization: false, organizationsTotalCount: 0, organizationId: 0, + defaultShowFullName, subUrl: appSubUrl, ...pageData.dashboardRepoList, @@ -471,7 +472,7 @@ export default sfc; // activate the IDE's Vue plugin
  • -
    {{ org.name }}
    +
    {{ defaultShowFullName && org.full_name ? org.full_name : org.name }}
    {{ org.org_visibility === 'limited' ? textOrgVisibilityLimited: textOrgVisibilityPrivate }} diff --git a/web_src/js/types.ts b/web_src/js/types.ts index f3ac305162..53d272e29e 100644 --- a/web_src/js/types.ts +++ b/web_src/js/types.ts @@ -12,6 +12,7 @@ export type Config = { assetVersionEncoded: string, assetUrlPrefix: string, runModeIsProd: boolean, + defaultShowFullName: boolean, customEmojis: Record, csrfToken: string, pageData: Record,