Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0
Ce dépôt a été archivé le 2022-05-07. Vous pouvez voir ses fichiers ou le cloner, mais pas ouvrir de ticket ou de demandes d'ajout, ni soumettre de changements.
nyaa-pantsu/templates/_search.html
akuma06 9307087024 Refine form linked up & edited buildversion to commit hash (#1025)
Added the use of the new search form made by @kipukun
Buildversion are now commit hash. Please read the readme for new build
command (or just build using package.sh).
2017-06-20 10:06:01 +10:00

70 lignes
Pas d'EOL
4,2 Kio
HTML

{{define "search_common"}}
<select name="c" class="form-input hide-xs">
<option value="_">{{call $.T "all_categories"}}</option>
{{ range $name_cat, $id_cat := (GetCategories true true) }}
<option value="{{ $id_cat }}" {{if eq $.Search.Category $id_cat }}selected{{end}}>{{call $.T $name_cat }}</option>
{{ end }}
</select>
<label><span class="select-icon caret-down-icon"></span></label>
<select name="s" class="form-input hide-xs">
<option value="0">{{call $.T "show_all"}}</option>
<option value="1" {{if eq .Search.Status 1}}selected{{end}}>{{call $.T "filter_remakes"}}</option>
<option value="2" {{if eq .Search.Status 2}}selected{{end}}>{{call $.T "trusted"}}</option>
<option value="3" {{if eq .Search.Status 3}}selected{{end}}>A+</option>
</select>
{{ if .Search.ShowItemsPerPage }}
<select name="max" class="form-input hide-xs">
<option value="5" {{if eq .Navigation.MaxItemPerPage 5}}selected{{end}}>5</option>
<option value="10" {{if eq .Navigation.MaxItemPerPage 10}}selected{{end}}>10</option>
<option value="15" {{if eq .Navigation.MaxItemPerPage 15}}selected{{end}}>15</option>
<option value="20" {{if eq .Navigation.MaxItemPerPage 20}}selected{{end}}>20</option>
<option value="25" {{if eq .Navigation.MaxItemPerPage 25}}selected{{end}}>25</option>
<option value="30" {{if eq .Navigation.MaxItemPerPage 30}}selected{{end}}>30</option>
<option value="35" {{if eq .Navigation.MaxItemPerPage 35}}selected{{end}}>35</option>
<option value="40" {{if eq .Navigation.MaxItemPerPage 40}}selected{{end}}>40</option>
<option value="45" {{if eq .Navigation.MaxItemPerPage 45}}selected{{end}}>45</option>
<option value="50" {{if eq .Navigation.MaxItemPerPage 50}}selected{{end}}>50</option>
<option value="70" {{if eq .Navigation.MaxItemPerPage 70}}selected{{end}}>70</option>
<option value="100" {{if eq .Navigation.MaxItemPerPage 100}}selected{{end}}>100</option>
<option value="150" {{if eq .Navigation.MaxItemPerPage 150}}selected{{end}}>150</option>
<option value="200" {{if eq .Navigation.MaxItemPerPage 200}}selected{{end}}>200</option>
<option value="300" {{if eq .Navigation.MaxItemPerPage 300}}selected{{end}}>300</option>
</select>
{{ end }}
<input type="hidden" name="userID" value="{{ .Search.UserID }}">
{{end}}
{{define "search_button"}}
<input class="form-input search-box" name="q" placeholder="{{call $.T "search"}}" type="text" value="{{.Search.Query}}">
<button type="submit" class="form-input icon-search"></button>
{{end}}
{{define "search_refine"}}
<div style="text-align:left;" class="box">
<form method="GET" action="">
<input type="hidden" name="s" value="{{.Search.Status}}"/>
<input type="hidden" name="c" value="{{.Search.Category}}"/>
<input type="hidden" name="max" value="{{.Navigation.MaxItemPerPage}}"/>
<input type="hidden" name="userID" value="{{.Search.UserID}}"/>
<input type="hidden" name="q" value="{{.Search.Query}}"/>
<span>Between <input class="form-input" size="7" name="minSize" type="text" value="{{.Search.MinSize}}"> and <input size="7" class="form-input" name="maxSize" type="text" value="{{.Search.MaxSize}}">
<select name="sizeType" class="form-input">
<option value="b"{{if eq .Search.SizeType "b"}} selected{{end}}>B</option>
<option value="k"{{if eq .Search.SizeType "k"}} selected{{end}}>KiB</option>
<option value="m"{{if eq .Search.SizeType "m"}} selected{{end}}>MiB</option>
<option value="g"{{if eq .Search.SizeType "g"}} selected{{end}}>GiB</option>
</select>
large.
</span>
<br>
<span>Between <input class="form-input" size="7" name="fromDate" type="text" value="{{.Search.FromDate}}"> and <input class="form-input" size="7" name="toDate" type="text" value="{{.Search.ToDate}}">
<select name="dateType" class="form-input">
<option value="d"{{if eq .Search.DateType "d"}} selected{{end}}>days</option>
<option value="m"{{if eq .Search.DateType "m"}} selected{{end}}>months</option>
<option value="y"{{if eq .Search.DateType "y"}} selected{{end}}>years</option>
</select>
old.
</span>
<br>
<button style="margin-top:10px;" type="submit" class="form-input">Refine</button>
</form>
</div>
{{end}}