2017-05-07 01:20:13 +02:00
{{define "search_common"}}
< select name = "c" class = "form-control input-sm" value >
2017-05-21 00:38:28 +02:00
< option value = "_" > {{call $.T "all_categories"}}< / option >
2017-05-23 04:05:33 +02:00
{{ range $name_cat, $id_cat := (GetCategories true) }}
< option value = "{{ $id_cat }}" { { if eq $ . Search . Category $ id_cat } } selected { { end } } > {{call $.T $name_cat }}< / option >
{{ end }}
2017-05-07 01:20:13 +02:00
< / select >
< select name = "s" class = "form-control input-sm" >
2017-05-21 00:38:28 +02:00
< 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 >
2017-05-09 13:31:58 +02:00
< option value = "3" { { if eq . Search . Status 3 } } selected { { end } } > A+< / option >
2017-05-07 01:20:13 +02:00
< / select >
2017-05-14 13:01:59 +02:00
{{ if .Search.ShowItemsPerPage }}
2017-05-13 18:53:54 +02:00
< select id = "max" name = "max" class = "form-control input-sm" >
2017-05-07 01:20:13 +02:00
< 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 >
2017-05-14 13:01:59 +02:00
{{ end }}
2017-05-13 18:53:54 +02:00
< input type = "hidden" name = "userID" value = "{{ .Search.UserID }}" >
2017-05-07 01:20:13 +02:00
{{end}}
{{define "search_button"}}
< div class = "input-group" >
2017-05-21 00:38:28 +02:00
< input name = "q" class = "form-control input-sm" placeholder = "{{call $.T " search " } } " type = "text" value = "{{.Search.Query}}" >
2017-05-07 01:20:13 +02:00
< span class = "input-group-btn" >
2017-05-21 00:38:28 +02:00
< button type = "submit" class = "btn btn-sm btn-success" > < span class = "glyphicon glyphicon-search" aria-hidden = "true" > < / span > < span class = "search_text" > {{call $.T "search"}}< / span > < / button >
2017-05-07 01:20:13 +02:00
< / span >
< / div >
{{end}}