2023-03-14 04:09:06 +00:00
|
|
|
<script type="module">
|
|
|
|
const data = {
|
|
|
|
...window.config.pageData.dashboardRepoList, // it only contains searchLimit and uid
|
2022-10-01 14:26:38 +00:00
|
|
|
|
2023-05-05 08:41:21 +00:00
|
|
|
isMirrorsEnabled: {{.MirrorsEnabled}},
|
2023-03-14 04:09:06 +00:00
|
|
|
isStarsEnabled: {{not .IsDisableStars}},
|
|
|
|
|
|
|
|
textRepository: {{.locale.Tr "repository"}},
|
|
|
|
textOrganization: {{.locale.Tr "organization"}},
|
|
|
|
textMyRepos: {{.locale.Tr "home.my_repos"}},
|
|
|
|
textNewRepo: {{.locale.Tr "new_repo"}},
|
|
|
|
textSearchRepos: {{.locale.Tr "home.search_repos"}},
|
|
|
|
textFilter: {{.locale.Tr "home.filter"}},
|
|
|
|
textShowArchived: {{.locale.Tr "home.show_archived"}},
|
|
|
|
textShowPrivate: {{.locale.Tr "home.show_private"}},
|
|
|
|
|
|
|
|
textShowBothArchivedUnarchived: {{.locale.Tr "home.show_both_archived_unarchived"}},
|
|
|
|
textShowOnlyUnarchived: {{.locale.Tr "home.show_only_unarchived"}},
|
|
|
|
textShowOnlyArchived: {{.locale.Tr "home.show_only_archived"}},
|
|
|
|
|
|
|
|
textShowBothPrivatePublic: {{.locale.Tr "home.show_both_private_public"}},
|
|
|
|
textShowOnlyPublic: {{.locale.Tr "home.show_only_public"}},
|
|
|
|
textShowOnlyPrivate: {{.locale.Tr "home.show_only_private"}},
|
|
|
|
|
|
|
|
textAll: {{.locale.Tr "all"}},
|
|
|
|
textSources: {{.locale.Tr "sources"}},
|
|
|
|
textForks: {{.locale.Tr "forks"}},
|
|
|
|
textMirrors: {{.locale.Tr "mirrors"}},
|
|
|
|
textCollaborative: {{.locale.Tr "collaborative"}},
|
|
|
|
|
|
|
|
textFirstPage: {{.locale.Tr "admin.first_page"}},
|
|
|
|
textPreviousPage: {{.locale.Tr "repo.issues.previous"}},
|
|
|
|
textNextPage: {{.locale.Tr "repo.issues.next"}},
|
|
|
|
textLastPage: {{.locale.Tr "admin.last_page"}},
|
|
|
|
|
|
|
|
textMyOrgs: {{.locale.Tr "home.my_orgs"}},
|
|
|
|
textNewOrg: {{.locale.Tr "new_org"}},
|
2023-05-07 00:33:43 +00:00
|
|
|
|
|
|
|
textOrgVisibilityLimited: {{.locale.Tr "org.settings.visibility.limited_shortname"}},
|
|
|
|
textOrgVisibilityPrivate: {{.locale.Tr "org.settings.visibility.private_shortname"}},
|
2023-03-14 04:09:06 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
{{if .Team}}
|
|
|
|
data.teamId = {{.Team.ID}};
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
{{if not .ContextUser.IsOrganization}}
|
2023-05-07 00:33:43 +00:00
|
|
|
data.organizations = [{{range .Orgs}}{'name': {{.Name}}, 'num_repos': {{.NumRepos}}, 'org_visibility': {{.Visibility}}},{{end}}];
|
2023-03-14 04:09:06 +00:00
|
|
|
data.isOrganization = false;
|
2023-04-26 02:25:29 +00:00
|
|
|
data.organizationsTotalCount = {{.UserOrgsCount}};
|
|
|
|
data.canCreateOrganization = {{.SignedUser.CanCreateOrganization}};
|
|
|
|
{{else}}
|
|
|
|
data.organizationId = {{.ContextUser.ID}};
|
2023-03-14 04:09:06 +00:00
|
|
|
{{end}}
|
|
|
|
|
|
|
|
window.config.pageData.dashboardRepoList = data;
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<div id="dashboard-repo-list" class="six wide column"></div>
|