code.gitea.io/gitea@v1.22.3/templates/user/dashboard/repolist.tmpl (about)

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