From ed15c926685db918b4076d9d72e74ca9bdad9bab Mon Sep 17 00:00:00 2001 From: Shiny Nematoda Date: Mon, 18 Mar 2024 14:20:40 +0000 Subject: [PATCH] fixes for port --- templates/shared/search/code/results.tmpl | 4 ++-- templates/shared/search/code/search.tmpl | 6 +++++- templates/shared/searchfile.tmpl | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/templates/shared/search/code/results.tmpl b/templates/shared/search/code/results.tmpl index e1ebf15868..09604e0f6c 100644 --- a/templates/shared/search/code/results.tmpl +++ b/templates/shared/search/code/results.tmpl @@ -24,10 +24,10 @@ {{else}} {{.Filename}} {{end}} - {{ctx.Locale.Tr "repo.diff.view_file"}} + {{ctx.Locale.Tr "repo.diff.view_file"}}
- {{template "shared/searchfile" dict "RepoLink" $repo.Link "IsIndexer" true "SearchResult" .}} + {{template "shared/searchfile" dict "RepoLink" $repo.Link "CodeIndexerEnabled" $.CodeIndexerEnabled "SearchResult" .}}
{{template "shared/searchbottom" dict "root" $ "result" .}} diff --git a/templates/shared/search/code/search.tmpl b/templates/shared/search/code/search.tmpl index 545ec1ea65..4b1257bed5 100644 --- a/templates/shared/search/code/search.tmpl +++ b/templates/shared/search/code/search.tmpl @@ -1,5 +1,9 @@
- {{template "shared/search/combo_fuzzy" dict "Value" .Keyword "Disabled" .CodeIndexerUnavailable "IsFuzzy" .IsFuzzy "Placeholder" (ctx.Locale.Tr "search.code_kind")}} + {{if ne $.CodeIndexerEnabled false}} + {{template "shared/search/combo_fuzzy" dict "Value" .Keyword "Disabled" .CodeIndexerUnavailable "IsFuzzy" .IsFuzzy "Placeholder" (ctx.Locale.Tr "search.code_kind")}} + {{else}} + {{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.code_kind")}} + {{end}}
diff --git a/templates/shared/searchfile.tmpl b/templates/shared/searchfile.tmpl index 6ffcd7118b..4c098138de 100644 --- a/templates/shared/searchfile.tmpl +++ b/templates/shared/searchfile.tmpl @@ -4,7 +4,7 @@ {{range .SearchResult.Lines}} - {{.Num}} + {{.Num}} {{.FormattedContent}}