-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Add DISABLE_ORGANIZATIONS_PAGE
and DISABLE_CODE_PAGE
settings for explore pages and fix an issue related to user search
#32288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
wxiaoguang
merged 17 commits into
go-gitea:main
from
Zettat123:more-explore-page-settings
Oct 22, 2024
Merged
Changes from 3 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
0b04828
add DISABLE_ORGANIZATIONS_PAGE and DISABLE_CODE_PAGE settings
Zettat123 b88875b
fix api middleware
Zettat123 c3a3bab
use db settings
Zettat123 efe0df8
use .SystemConfig
Zettat123 b793c6b
format
Zettat123 2d1ce03
Revert "format"
Zettat123 6c4673d
Revert "use .SystemConfig"
Zettat123 ce6eeab
Revert "use db settings"
Zettat123 7314a27
fix reqExploreSignIn
Zettat123 0658fa6
fix and
Zettat123 2336451
improve var names
Zettat123 b1b8e3e
fix redirect
Zettat123 c5e17d9
Merge branch 'main' into more-explore-page-settings
GiteaBot 792aeea
Merge branch 'main' into more-explore-page-settings
GiteaBot 03292a8
fix reqExploreSignIn
Zettat123 ea02778
fix /user/search
wxiaoguang fa79343
fix lint
wxiaoguang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,13 @@ import ( | |
|
||
// Organizations render explore organizations page | ||
func Organizations(ctx *context.Context) { | ||
ctx.Data["UsersIsDisabled"] = setting.Service.Explore.DisableUsersPage | ||
if setting.Config().Service.ExplorePage.DisableOrganizationsPage.Value(ctx) { | ||
ctx.Redirect(setting.AppSubURL + "/explore/repos") | ||
return | ||
} | ||
|
||
ctx.Data["UsersIsDisabled"] = setting.Config().Service.ExplorePage.DisableUsersPage.Value(ctx) | ||
ctx.Data["CodeIsDisabled"] = setting.Config().Service.ExplorePage.DisableCodePage.Value(ctx) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think there is no need to keep repeating assigning template variables. There is global |
||
ctx.Data["Title"] = ctx.Tr("explore") | ||
ctx.Data["PageIsExplore"] = true | ||
ctx.Data["PageIsExploreOrganizations"] = true | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.