Fix code search input for different views (#30678)
Now only show the "code search" on the repo home page, because it only does global search. So do not show it when viewing file or directory to avoid misleading users (it doesn't search in a directory)
This commit is contained in:
parent
cd70ab31cd
commit
993736d838
4 changed files with 12 additions and 14 deletions
|
@ -212,8 +212,6 @@ func SearchCommits(ctx *context.Context) {
|
|||
|
||||
// FileHistory show a file's reversions
|
||||
func FileHistory(ctx *context.Context) {
|
||||
ctx.Data["IsRepoToolbarCommits"] = true
|
||||
|
||||
fileName := ctx.Repo.TreePath
|
||||
if len(fileName) == 0 {
|
||||
Commits(ctx)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue