summaryrefslogtreecommitdiffstats
path: root/templates/repo/home.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'templates/repo/home.tmpl')
-rw-r--r--templates/repo/home.tmpl9
1 files changed, 6 insertions, 3 deletions
diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl
index 9924ae547d..6d525c24da 100644
--- a/templates/repo/home.tmpl
+++ b/templates/repo/home.tmpl
@@ -13,9 +13,12 @@
<div class="ui repo-search">
<form class="ui form ignore-dirty" action="{{.RepoLink}}/search" method="get">
<div class="field">
- <div class="ui action input">
- <input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "repo.search.search_repo"}}">
- <button class="ui icon button" type="submit">
+ <div class="ui action input{{if .CodeIndexerUnavailable }} disabled left icon tooltip{{end}}"{{if .CodeIndexerUnavailable }} data-content="{{.i18n.Tr "repo.search.code_search_unavailable"}}"{{end}}>
+ <input name="q" value="{{.Keyword}}"{{if .CodeIndexerUnavailable }} disabled{{end}} placeholder="{{.i18n.Tr "repo.search.search_repo"}}">
+ {{if .CodeIndexerUnavailable }}
+ <i class="icon df ac jc">{{svg "octicon-alert"}}</i>
+ {{end}}
+ <button class="ui icon button"{{if .CodeIndexerUnavailable }} disabled{{end}} type="submit">
{{svg "octicon-search"}}
</button>
</div>