]> source.dussan.org Git - gitea.git/commitdiff
Fix some places which doesn't repsect org full name setting (#32243)
authorLunny Xiao <xiaolunwen@gmail.com>
Mon, 18 Nov 2024 06:24:49 +0000 (22:24 -0800)
committerGitHub <noreply@github.com>
Mon, 18 Nov 2024 06:24:49 +0000 (06:24 +0000)
Partially fix #31345

templates/admin/org/list.tmpl
templates/user/dashboard/repolist.tmpl
web_src/js/components/DashboardRepoList.vue

index d0805c85bc9d13928db407006c127962e25a6e16..d5e09939c5324939823f1a104c040d17abfaf833 100644 (file)
@@ -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}}
index be710675d560ac50c877cbc88d71a1aef2faf831..a2764ba608442b15dfa29d85318e1160c284c4f5 100644 (file)
@@ -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}};
index a6a8ccd2d11e13c66b97faeabeba78d42cd145b3..3d3ac2fc6971614261ec2b94020595c5a8d7bcdf 100644 (file)
@@ -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 }}