content/static/html/pages/search.tmpl: split off search results
Split the search results into a separate template to facilitate
making changes behind an experiment flag.
Trust: Jonathan Amsterdam
Run-TryBot: Jonathan Amsterdam
TryBot-Result: kokoro
</div>
{{else}}
<div>{{/* Containing element is needed to use *-of-type selectors */}}
+ {{if (.Experiments.IsActive "search-grouping")}}
+ {{template "grouped_search" .}}
+ {{else}}
+ {{template "legacy_search" .}}
+ {{end}}
+ </div>
+ {{end}}
+ <div class="SearchResults-footer">
+ {{template "pagination_nav" .Pagination}}
+ </div>
+ </div>
+ </div>
+{{end}}
+
+
+{{define "legacy_search"}}
{{$query := .Query}}
{{range $i, $v := .Results}}
<div class="SearchSnippet">
</div>
{{end}}
</div> <!-- SearchSnippet -->
- {{end}} {{/* range over Results */}}
- {{end}} {{/* else */}}
- </div>
- <div class="SearchResults-footer">
- {{template "pagination_nav" .Pagination}}
- </div>
- </div>
- </div>
+ {{end}}
+{{end}}
+
+{{define "grouped_search"}}
+ Unimplemented
{{end}}
\ No newline at end of file
