diff --git a/templates/user/dashboard/repolist.tmpl b/templates/user/dashboard/repolist.tmpl index 0a8f427f9da15..20638aab41125 100644 --- a/templates/user/dashboard/repolist.tmpl +++ b/templates/user/dashboard/repolist.tmpl @@ -44,8 +44,10 @@ data.teamId = {{.Team.ID}}; {{if not .ContextUser.IsOrganization}} data.organizations = [{{range .Orgs}}{'name': {{.Name}}, 'num_repos': {{.NumRepos}}},{{end}}]; data.isOrganization = false; -data.organizationsTotalCount = {{.UserOrgsCount}} -data.canCreateOrganization = {{.SignedUser.CanCreateOrganization}} +data.organizationsTotalCount = {{.UserOrgsCount}}; +data.canCreateOrganization = {{.SignedUser.CanCreateOrganization}}; +{{else}} +data.organizationId = {{.ContextUser.ID}}; {{end}} window.config.pageData.dashboardRepoList = data; diff --git a/web_src/js/components/DashboardRepoList.vue b/web_src/js/components/DashboardRepoList.vue index 1af53aac902b0..33b312aa6ee72 100644 --- a/web_src/js/components/DashboardRepoList.vue +++ b/web_src/js/components/DashboardRepoList.vue @@ -10,7 +10,7 @@ {{ textMyRepos }} {{ reposTotalCount }} - + {{ textNewRepo }} @@ -199,6 +199,7 @@ const sfc = { isOrganization: true, canCreateOrganization: false, organizationsTotalCount: 0, + organizationId: 0, subUrl: appSubUrl, ...pageData.dashboardRepoList,