From e68b9d00a6e05b3a941f63ffb696f91e554ac5ec Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 18 Oct 2024 20:33:49 +0200 Subject: Adding upstream version 9.0.3. Signed-off-by: Daniel Baumann --- templates/shared/search/code/results.tmpl | 44 +++++++++++++++++++++++++++++++ templates/shared/search/code/search.tmpl | 28 ++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 templates/shared/search/code/results.tmpl create mode 100644 templates/shared/search/code/search.tmpl (limited to 'templates/shared/search/code') diff --git a/templates/shared/search/code/results.tmpl b/templates/shared/search/code/results.tmpl new file mode 100644 index 0000000..fe37557 --- /dev/null +++ b/templates/shared/search/code/results.tmpl @@ -0,0 +1,44 @@ +
+ {{range $term := .SearchResultLanguages}} + + + {{$term.Language}} +
{{$term.Count}}
+
+ {{end}} +
+ +{{template "base/paginate" .}} diff --git a/templates/shared/search/code/search.tmpl b/templates/shared/search/code/search.tmpl new file mode 100644 index 0000000..6a52bb9 --- /dev/null +++ b/templates/shared/search/code/search.tmpl @@ -0,0 +1,28 @@ +
+ {{template "shared/search/combo_fuzzy" + dict + "Value" .Keyword + "Disabled" .CodeIndexerUnavailable + "IsFuzzy" .IsFuzzy + "Placeholder" (ctx.Locale.Tr "search.code_kind") + "CodeIndexerDisabled" $.CodeIndexerDisabled}} +
+
+
+ {{if .CodeIndexerUnavailable}} +
+

{{ctx.Locale.Tr "search.code_search_unavailable"}}

+
+ {{else}} + {{if .CodeIndexerDisabled}} +
+

{{ctx.Locale.Tr "search.code_search_by_git_grep"}}

+
+ {{end}} + {{if .SearchResults}} + {{template "shared/search/code/results" .}} + {{else if .Keyword}} +
{{ctx.Locale.Tr "search.no_results"}}
+ {{end}} + {{end}} +
-- cgit v1.2.3