{{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;
{{ textMyRepos }}
<span class="ui grey label gt-ml-3">{{ reposTotalCount }}</span>
</div>
- <a :href="subUrl + '/repo/create'" :data-tooltip-content="textNewRepo">
+ <a :href="subUrl + '/repo/create' + (isOrganization ? '?org=' + organizationId : '')" :data-tooltip-content="textNewRepo">
<svg-icon name="octicon-plus"/>
<span class="sr-only">{{ textNewRepo }}</span>
</a>
isOrganization: true,
canCreateOrganization: false,
organizationsTotalCount: 0,
+ organizationId: 0,
subUrl: appSubUrl,
...pageData.dashboardRepoList,