mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-08 16:14:30 +00:00
8546b01249
#3654 introduced support for searching non-default branches and tags. However, the results page lacked any indicator (aside from the url) on which branch/tag the searcg was performed. A branch dropdown was introduced to the code search page when git-grep is used both as an indicator and as a intrusive way to switch between branches/tags. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4262 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Co-authored-by: Shiny Nematoda <snematoda.751k2@aleeas.com> Co-committed-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
15 lines
692 B
Go HTML Template
15 lines
692 B
Go HTML Template
{{template "base/head" .}}
|
|
<div role="main" aria-label="{{.Title}}" class="page-content repository file list">
|
|
{{template "repo/header" .}}
|
|
<div class="ui container">
|
|
{{if $.CodeIndexerDisabled}}
|
|
{{$branchURLPrefix := printf "%s/search/branch/" $.RepoLink}}
|
|
{{$tagURLPrefix := printf "%s/search/tag/" $.RepoLink}}
|
|
{{$suffix := printf "?q=%s&fuzzy=%t" (.Keyword|QueryEscape) .IsFuzzy}}
|
|
{{template "repo/branch_dropdown" dict "root" . "ContainerClasses" "tw-mb-3" "branchURLPrefix" $branchURLPrefix "branchURLSuffix" $suffix "tagURLPrefix" $tagURLPrefix "tagURLSuffix" $suffix}}
|
|
{{end}}
|
|
{{template "shared/search/code/search" .}}
|
|
</div>
|
|
</div>
|
|
{{template "base/footer" .}}
|