Automatically select the org when click create repo from org dashboard (#24325)
 In org dashboard, the create repo link will be `repo/create?org={orgId}`
This commit is contained in:
parent
2ec2d06531
commit
5f21e0f8eb
2 changed files with 6 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue