Merge branch 'master' of git.freesoftwareextremist.com:public/bloat
[bloat] / templates / search.tmpl
1 {{with .Data}}
2 {{template "header.tmpl" (WithContext .HeaderData $.Ctx)}}
3 {{template "navigation.tmpl" (WithContext .NavbarData $.Ctx)}}
4 <div class="page-title"> Search </div>
5
6 <form class="search-form" action="/search" method="GET">
7         <span class="post-form-field>
8                 <label for="query"> Query </label>
9                 <input id="query" name="q" value="{{.Q}}">
10         </span>
11         <span class="post-form-field>
12                 <label for="type"> Type </label>
13                 <select id="type" name="type">
14                         <option value="statuses" {{if eq .Type "statuses"}}selected{{end}}>Statuses</option>
15                         <option value="accounts" {{if eq .Type "accounts"}}selected{{end}}>Accounts</option>
16                 </select>
17         </span>
18         <button type="submit"> Search </button>
19 </form>
20
21 {{if eq .Type "statuses"}}
22 {{range .Statuses}}
23 {{template "status.tmpl" (WithContext . $.Ctx)}}
24 {{end}}
25
26 {{end}}
27 {{if eq .Type "accounts"}}
28 {{template "userlist.tmpl" (WithContext .Users $.Ctx)}}
29 {{end}}
30
31 <div class="pagination">
32         {{if .NextLink}}
33                 <a href="{{.NextLink}}">next</a>
34         {{end}}
35 </div>
36
37 {{template "footer.tmpl"}}
38 {{end}}