summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/search.html21
1 files changed, 14 insertions, 7 deletions
diff --git a/views/search.html b/views/search.html
index 5cf0483..9373375 100644
--- a/views/search.html
+++ b/views/search.html
@@ -8,15 +8,22 @@
<body>
<a href="//{{.Domain}}"><img height=140 class=logo src="//{{.Domain}}/assets/logo.svg"></a>
<h1>National Law of {{.Country.Name}}</h1>
+ {{if not .Country.HasPlaceholder}}
+ <p><big><a href="{{.Country.SearchURL}}">{{.Country.SearchURL}}</a></big></p>
+
+ {{if not .HasJSONLaws}}
+ (No search form here because the search isn't linkable.)
+ {{end}}
+ {{end}}
{{if .Country.HasPlaceholder}}
- <form autocomplete="off">
- <input id=search name=q autofocus {{if .HasJSONLaws}}data-json{{end}}>
+ <form>
+ {{end}}
+ {{if or .Country.HasPlaceholder .HasJSONLaws}}
+ <input id=search name=q autocomplete="off" autofocus {{if .HasJSONLaws}}data-json{{end}}>
<ul id=suggestions></ul>
- </form>
- {{else}}
- <p><big><a href="{{.Country.SearchURL}}">{{.Country.SearchURL}}</a></big></p>
-
- (No search form here because the search isn't linkable.)
+ {{end}}
+ {{if .Country.HasPlaceholder}}
+ </form>
{{end}}
<script src="//{{.Domain}}/assets/script.js"></script>
</body>