summaryrefslogtreecommitdiffstats
path: root/templates/user/dashboard
diff options
context:
space:
mode:
authoryp05327 <576951401@qq.com>2023-04-26 11:25:29 +0900
committerGitHub <noreply@github.com>2023-04-25 22:25:29 -0400
commit5f21e0f8eb66791fc86c07baac80b485fd5965fc (patch)
tree055518a0e438e72b65e403ca10572ffb99cbe84b /templates/user/dashboard
parent2ec2d065316a488c4748061fe7b19f0b57f3546f (diff)
downloadgitea-5f21e0f8eb66791fc86c07baac80b485fd5965fc.tar.gz
gitea-5f21e0f8eb66791fc86c07baac80b485fd5965fc.zip
Automatically select the org when click create repo from org dashboard (#24325)
![image](https://user-images.githubusercontent.com/18380374/234209941-d661b07f-e963-427b-a673-78c46043a792.png) In org dashboard, the create repo link will be `repo/create?org={orgId}`
Diffstat (limited to 'templates/user/dashboard')
-rw-r--r--templates/user/dashboard/repolist.tmpl6
1 files changed, 4 insertions, 2 deletions
diff --git a/templates/user/dashboard/repolist.tmpl b/templates/user/dashboard/repolist.tmpl
index 0a8f427f9d..20638aab41 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;