aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorZettat123 <zettat123@gmail.com>2024-10-22 13:09:19 +0800
committerGitHub <noreply@github.com>2024-10-22 13:09:19 +0800
commit9206fbb55fd28f21720072fce6a36cc22277934c (patch)
treef8b99ae96e1446423194ca03032300248b0dd76f /templates
parent3d6ccbac3f20c485ab95a29d280c9371e558bfac (diff)
downloadgitea-9206fbb55fd28f21720072fce6a36cc22277934c.tar.gz
gitea-9206fbb55fd28f21720072fce6a36cc22277934c.zip
Add `DISABLE_ORGANIZATIONS_PAGE` and `DISABLE_CODE_PAGE` settings for explore pages and fix an issue related to user search (#32288)
These settings can allow users to only display the repositories explore page. Thanks to yp05327 and wxiaoguang ! --------- Co-authored-by: Giteabot <teabot@gitea.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'templates')
-rw-r--r--templates/explore/navbar.tmpl6
1 files changed, 4 insertions, 2 deletions
diff --git a/templates/explore/navbar.tmpl b/templates/explore/navbar.tmpl
index a157cd4b75..6b595af63a 100644
--- a/templates/explore/navbar.tmpl
+++ b/templates/explore/navbar.tmpl
@@ -3,15 +3,17 @@
<a class="{{if .PageIsExploreRepositories}}active {{end}}item" href="{{AppSubUrl}}/explore/repos">
{{svg "octicon-repo"}} {{ctx.Locale.Tr "explore.repos"}}
</a>
- {{if not .UsersIsDisabled}}
+ {{if not .UsersPageIsDisabled}}
<a class="{{if .PageIsExploreUsers}}active {{end}}item" href="{{AppSubUrl}}/explore/users">
{{svg "octicon-person"}} {{ctx.Locale.Tr "explore.users"}}
</a>
{{end}}
+ {{if not .OrganizationsPageIsDisabled}}
<a class="{{if .PageIsExploreOrganizations}}active {{end}}item" href="{{AppSubUrl}}/explore/organizations">
{{svg "octicon-organization"}} {{ctx.Locale.Tr "explore.organizations"}}
</a>
- {{if and (not ctx.Consts.RepoUnitTypeCode.UnitGlobalDisabled) .IsRepoIndexerEnabled}}
+ {{end}}
+ {{if and (not ctx.Consts.RepoUnitTypeCode.UnitGlobalDisabled) .IsRepoIndexerEnabled (not .CodePageIsDisabled)}}
<a class="{{if .PageIsExploreCode}}active {{end}}item" href="{{AppSubUrl}}/explore/code">
{{svg "octicon-code"}} {{ctx.Locale.Tr "explore.code"}}
</a>