mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-23 17:14:24 +00:00
847f03b6a6
Unify all but a few search boxes to use uniform style, uniform translations and shared templates where possible. Remove a few duplicated search templates, e. g. code search. <details><summary>Example after screenshots:</summary> ![grafik](https://github.com/go-gitea/gitea/assets/47871822/e20e7d6b-c6be-4a47-b132-672766f41421) ![grafik](https://github.com/go-gitea/gitea/assets/47871822/d5b11b9c-c12f-4a29-8fb0-24e5aa511d18) ![grafik](https://github.com/go-gitea/gitea/assets/47871822/d86bb444-36c7-426d-9cf1-c634963dffb1) ![grafik](https://github.com/go-gitea/gitea/assets/47871822/a76c0319-0518-484a-a840-563d02b61198) </details> Also includes #29700 Co-authored-by: 6543 <6543@obermui.de> --------- Co-authored-by: 6543 <m.huber@kithara.com> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Giteabot <teabot@gitea.io> Conflicts: routers/web/repo/search.go templates/repo/home.tmpl templates/repo/search.tmpl templates/shared/repo_search.tmpl
56 lines
2.1 KiB
Go HTML Template
56 lines
2.1 KiB
Go HTML Template
<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="six wide column"></div>
|