diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index fc58c32cb..e39328180 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -164,6 +164,8 @@ search = Search... type_tooltip = Search type fuzzy = Fuzzy fuzzy_tooltip = Include results that also match the search term closely +union = Union +union_tooltip = Include results that match any of the whitespace seperated keywords exact = Exact exact_tooltip = Include only results that match the exact search term repo_kind = Search repos... diff --git a/templates/shared/search/code/results.tmpl b/templates/shared/search/code/results.tmpl index 50d4a35c3..fe375579b 100644 --- a/templates/shared/search/code/results.tmpl +++ b/templates/shared/search/code/results.tmpl @@ -26,7 +26,10 @@ - {{.Filename}} {{else}} - {{.Filename}} + + {{/* + */}}{{.Filename}} + {{end}} {{ctx.Locale.Tr "repo.diff.view_file"}} diff --git a/templates/shared/search/code/search.tmpl b/templates/shared/search/code/search.tmpl index 37a23dc3d..6a52bb946 100644 --- a/templates/shared/search/code/search.tmpl +++ b/templates/shared/search/code/search.tmpl @@ -1,5 +1,11 @@
- {{template "shared/search/combo_fuzzy" dict "Value" .Keyword "Disabled" .CodeIndexerUnavailable "IsFuzzy" .IsFuzzy "Placeholder" (ctx.Locale.Tr "search.code_kind")}} + {{template "shared/search/combo_fuzzy" + dict + "Value" .Keyword + "Disabled" .CodeIndexerUnavailable + "IsFuzzy" .IsFuzzy + "Placeholder" (ctx.Locale.Tr "search.code_kind") + "CodeIndexerDisabled" $.CodeIndexerDisabled}}
diff --git a/templates/shared/search/combo_fuzzy.tmpl b/templates/shared/search/combo_fuzzy.tmpl index 3540a89ec..38189b051 100644 --- a/templates/shared/search/combo_fuzzy.tmpl +++ b/templates/shared/search/combo_fuzzy.tmpl @@ -1,10 +1,15 @@ {{/* Value - value of the search field (for search results page) */}} {{/* Disabled (optional) - if search field/button has to be disabled */}} {{/* Placeholder (optional) - placeholder text to be used */}} -{{/* IsFuzzy - state of the fuzzy search toggle */}} +{{/* IsFuzzy - state of the fuzzy/union search toggle */}} +{{/* CodeIndexerDisabled (optional) - if the performed search is done using git-grep */}} {{/* Tooltip (optional) - a tooltip to be displayed on button hover */}}
{{template "shared/search/input" dict "Value" .Value "Disabled" .Disabled "Placeholder" .Placeholder}} - {{template "shared/search/fuzzy" dict "Disabled" .Disabled "IsFuzzy" .IsFuzzy}} + {{template "shared/search/fuzzy" + dict + "Disabled" .Disabled + "IsFuzzy" .IsFuzzy + "CodeIndexerDisabled" .CodeIndexerDisabled}} {{template "shared/search/button" dict "Disabled" .Disabled "Tooltip" .Tooltip}}
diff --git a/templates/shared/search/fuzzy.tmpl b/templates/shared/search/fuzzy.tmpl index 5c09d3c15..25cfc5762 100644 --- a/templates/shared/search/fuzzy.tmpl +++ b/templates/shared/search/fuzzy.tmpl @@ -1,10 +1,21 @@ {{/* Disabled (optional) - if dropdown has to be disabled */}} {{/* IsFuzzy - state of the fuzzy search toggle */}} -