File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -44,8 +44,10 @@ data.teamId = {{.Team.ID}};
4444{{if not .ContextUser.IsOrganization}}
4545data.organizations = [{{range .Orgs}}{'name': {{.Name}}, 'num_repos': {{.NumRepos}}},{{end}}];
4646data.isOrganization = false;
47- data.organizationsTotalCount = {{.UserOrgsCount}}
48- data.canCreateOrganization = {{.SignedUser.CanCreateOrganization}}
47+ data.organizationsTotalCount = {{.UserOrgsCount}};
48+ data.canCreateOrganization = {{.SignedUser.CanCreateOrganization}};
49+ {{else}}
50+ data.organizationId = {{.ContextUser.ID}};
4951{{end}}
5052
5153window.config.pageData.dashboardRepoList = data;
Original file line number Diff line number Diff line change 1010 {{ textMyRepos }}
1111 <span class =" ui grey label gt-ml-3" >{{ reposTotalCount }}</span >
1212 </div >
13- <a :href =" subUrl + '/repo/create'" :data-tooltip-content =" textNewRepo" >
13+ <a :href =" subUrl + '/repo/create' + (isOrganization ? '?org=' + organizationId : '') " :data-tooltip-content =" textNewRepo" >
1414 <svg-icon name =" octicon-plus" />
1515 <span class =" sr-only" >{{ textNewRepo }}</span >
1616 </a >
@@ -199,6 +199,7 @@ const sfc = {
199199 isOrganization: true ,
200200 canCreateOrganization: false ,
201201 organizationsTotalCount: 0 ,
202+ organizationId: 0 ,
202203
203204 subUrl: appSubUrl,
204205 ... pageData .dashboardRepoList ,
You can’t perform that action at this time.
0 commit comments