~jadedctrl/jam-xwx-moe

~jadedctrl/jam-xwx-moe/bloat-fe/instance/ŝablonoj/search.tmpl
 ..
0 {{with .Data}}
1 {{template "header.tmpl" (WithContext .CommonData $.Ctx)}}
2 <div class="page-title"> Serĉi </div>
3
4 <form class="search-form" action="/search" method="GET">
5 <span class="post-form-field">
6 <label for="query"> Serĉomendo </label>
7 <input id="query" name="q" value="{{.Q}}">
8 </span>
9 <span class="post-form-field">
10 <label for="type"> Celo </label>
11 <select id="type" name="type">
12 <option value="statuses" {{if eq .Type "statuses"}}selected{{end}}>Afiŝoj</option>
13 <option value="accounts" {{if eq .Type "accounts"}}selected{{end}}>Kontoj</option>
14 </select>
15 </span>
16 <button type="submit"> Serĉi </button>
17 </form>
18
19 {{if eq .Type "statuses"}}
20 {{range .Statuses}}
21 {{template "status.tmpl" (WithContext . $.Ctx)}}
22 {{else}}
23 {{if .Q}}<div class="no-data-found">Neniu datumo trovita</div>{{end}}
24 {{end}}
25 {{end}}
26
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}}">[sekva]</a>
34 {{end}}
35 </div>
36
37 {{template "footer.tmpl"}}
38 {{end}}