diff options
author | Daniel Baumann <daniel@debian.org> | 2024-10-18 20:33:49 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2024-12-12 23:57:56 +0100 |
commit | e68b9d00a6e05b3a941f63ffb696f91e554ac5ec (patch) | |
tree | 97775d6c13b0f416af55314eb6a89ef792474615 /templates/user/dashboard/repolist.tmpl | |
parent | Initial commit. (diff) | |
download | forgejo-e68b9d00a6e05b3a941f63ffb696f91e554ac5ec.tar.xz forgejo-e68b9d00a6e05b3a941f63ffb696f91e554ac5ec.zip |
Adding upstream version 9.0.3.
Signed-off-by: Daniel Baumann <daniel@debian.org>
Diffstat (limited to 'templates/user/dashboard/repolist.tmpl')
-rw-r--r-- | templates/user/dashboard/repolist.tmpl | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/templates/user/dashboard/repolist.tmpl b/templates/user/dashboard/repolist.tmpl new file mode 100644 index 0000000..2781f71 --- /dev/null +++ b/templates/user/dashboard/repolist.tmpl @@ -0,0 +1,55 @@ +<script type="module"> +const data = { + ...window.config.pageData.dashboardRepoList, // it only contains searchLimit and uid + + isMirrorsEnabled: {{.MirrorsEnabled}}, + isStarsEnabled: {{not .IsDisableStars}}, + + textMyRepos: {{ctx.Locale.Tr "home.my_repos"}}, + textSearchRepos: {{ctx.Locale.Tr "search.repo_kind"}}, + textFilter: {{ctx.Locale.Tr "home.filter"}}, + textShowArchived: {{ctx.Locale.Tr "home.show_archived"}}, + textShowPrivate: {{ctx.Locale.Tr "home.show_private"}}, + + textShowBothArchivedUnarchived: {{ctx.Locale.Tr "home.show_both_archived_unarchived"}}, + textShowOnlyUnarchived: {{ctx.Locale.Tr "home.show_only_unarchived"}}, + textShowOnlyArchived: {{ctx.Locale.Tr "home.show_only_archived"}}, + + textShowBothPrivatePublic: {{ctx.Locale.Tr "home.show_both_private_public"}}, + textShowOnlyPublic: {{ctx.Locale.Tr "home.show_only_public"}}, + textShowOnlyPrivate: {{ctx.Locale.Tr "home.show_only_private"}}, + + textAll: {{ctx.Locale.Tr "all"}}, + textSources: {{ctx.Locale.Tr "sources"}}, + textForks: {{ctx.Locale.Tr "forks"}}, + textMirrors: {{ctx.Locale.Tr "mirrors"}}, + textCollaborative: {{ctx.Locale.Tr "collaborative"}}, + + textFirstPage: {{ctx.Locale.Tr "admin.first_page"}}, + textPreviousPage: {{ctx.Locale.Tr "repo.issues.previous"}}, + textNextPage: {{ctx.Locale.Tr "repo.issues.next"}}, + textLastPage: {{ctx.Locale.Tr "admin.last_page"}}, + + textMyOrgs: {{ctx.Locale.Tr "home.my_orgs"}}, + + textOrgVisibilityLimited: {{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}, + textOrgVisibilityPrivate: {{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}, +}; + +{{if .Team}} +data.teamId = {{.Team.ID}}; +{{end}} + +{{if not .ContextUser.IsOrganization}} +data.organizations = [{{range .Orgs}}{'name': {{.Name}}, 'num_repos': {{.NumRepos}}, 'org_visibility': {{.Visibility}}},{{end}}]; +data.isOrganization = false; +data.organizationsTotalCount = {{.UserOrgsCount}}; +data.canCreateOrganization = {{.SignedUser.CanCreateOrganization}}; +{{else}} +data.organizationId = {{.ContextUser.ID}}; +{{end}} + +window.config.pageData.dashboardRepoList = data; +</script> + +<div id="dashboard-repo-list" class="flex-container-sidebar"></div> |