File tree 2 files changed +6
-3
lines changed
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}};
44
44
{{if not .ContextUser.IsOrganization}}
45
45
data.organizations = [{{range .Orgs}}{'name': {{.Name}}, 'num_repos': {{.NumRepos}}},{{end}}];
46
46
data.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}};
49
51
{{end}}
50
52
51
53
window.config.pageData.dashboardRepoList = data;
Original file line number Diff line number Diff line change 10
10
{{ textMyRepos }}
11
11
<span class =" ui grey label gt-ml-3" >{{ reposTotalCount }}</span >
12
12
</div >
13
- <a :href =" subUrl + '/repo/create'" :data-tooltip-content =" textNewRepo" >
13
+ <a :href =" subUrl + '/repo/create' + (isOrganization ? '?org=' + organizationId : '') " :data-tooltip-content =" textNewRepo" >
14
14
<svg-icon name =" octicon-plus" />
15
15
<span class =" sr-only" >{{ textNewRepo }}</span >
16
16
</a >
@@ -199,6 +199,7 @@ const sfc = {
199
199
isOrganization: true ,
200
200
canCreateOrganization: false ,
201
201
organizationsTotalCount: 0 ,
202
+ organizationId: 0 ,
202
203
203
204
subUrl: appSubUrl,
204
205
... pageData .dashboardRepoList ,
You can’t perform that action at this time.
0 commit comments