You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

repolist.tmpl 2.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <script type="module">
  2. const data = {
  3. ...window.config.pageData.dashboardRepoList, // it only contains searchLimit and uid
  4. isMirrorsEnabled: {{.MirrorsEnabled}},
  5. isStarsEnabled: {{not .IsDisableStars}},
  6. textRepository: {{.locale.Tr "repository"}},
  7. textOrganization: {{.locale.Tr "organization"}},
  8. textMyRepos: {{.locale.Tr "home.my_repos"}},
  9. textNewRepo: {{.locale.Tr "new_repo"}},
  10. textSearchRepos: {{.locale.Tr "home.search_repos"}},
  11. textFilter: {{.locale.Tr "home.filter"}},
  12. textShowArchived: {{.locale.Tr "home.show_archived"}},
  13. textShowPrivate: {{.locale.Tr "home.show_private"}},
  14. textShowBothArchivedUnarchived: {{.locale.Tr "home.show_both_archived_unarchived"}},
  15. textShowOnlyUnarchived: {{.locale.Tr "home.show_only_unarchived"}},
  16. textShowOnlyArchived: {{.locale.Tr "home.show_only_archived"}},
  17. textShowBothPrivatePublic: {{.locale.Tr "home.show_both_private_public"}},
  18. textShowOnlyPublic: {{.locale.Tr "home.show_only_public"}},
  19. textShowOnlyPrivate: {{.locale.Tr "home.show_only_private"}},
  20. textAll: {{.locale.Tr "all"}},
  21. textSources: {{.locale.Tr "sources"}},
  22. textForks: {{.locale.Tr "forks"}},
  23. textMirrors: {{.locale.Tr "mirrors"}},
  24. textCollaborative: {{.locale.Tr "collaborative"}},
  25. textFirstPage: {{.locale.Tr "admin.first_page"}},
  26. textPreviousPage: {{.locale.Tr "repo.issues.previous"}},
  27. textNextPage: {{.locale.Tr "repo.issues.next"}},
  28. textLastPage: {{.locale.Tr "admin.last_page"}},
  29. textMyOrgs: {{.locale.Tr "home.my_orgs"}},
  30. textNewOrg: {{.locale.Tr "new_org"}},
  31. textOrgVisibilityLimited: {{.locale.Tr "org.settings.visibility.limited_shortname"}},
  32. textOrgVisibilityPrivate: {{.locale.Tr "org.settings.visibility.private_shortname"}},
  33. };
  34. {{if .Team}}
  35. data.teamId = {{.Team.ID}};
  36. {{end}}
  37. {{if not .ContextUser.IsOrganization}}
  38. data.organizations = [{{range .Orgs}}{'name': {{.Name}}, 'num_repos': {{.NumRepos}}, 'org_visibility': {{.Visibility}}},{{end}}];
  39. data.isOrganization = false;
  40. data.organizationsTotalCount = {{.UserOrgsCount}};
  41. data.canCreateOrganization = {{.SignedUser.CanCreateOrganization}};
  42. {{else}}
  43. data.organizationId = {{.ContextUser.ID}};
  44. {{end}}
  45. window.config.pageData.dashboardRepoList = data;
  46. </script>
  47. <div id="dashboard-repo-list" class="six wide column"></div>