Remake search is now Filter Remakes like old nyaa
Cette révision appartient à :
Parent
1fbe264e5c
révision
62a72b0b35
2 fichiers modifiés avec 6 ajouts et 2 suppressions
6
main.go
6
main.go
|
@ -191,7 +191,11 @@ func searchByQuery(r *http.Request, pagenum int) (SearchParam, []Torrents, int)
|
||||||
parameters.params = append(parameters.params, searchSubCatId)
|
parameters.params = append(parameters.params, searchSubCatId)
|
||||||
}
|
}
|
||||||
if search_param.Status != "" {
|
if search_param.Status != "" {
|
||||||
conditions = append(conditions, "status_id = ?")
|
if search_param.Status == "2" {
|
||||||
|
conditions = append(conditions, "status_id != ?")
|
||||||
|
} else {
|
||||||
|
conditions = append(conditions, "status_id = ?")
|
||||||
|
}
|
||||||
parameters.params = append(parameters.params, search_param.Status)
|
parameters.params = append(parameters.params, search_param.Status)
|
||||||
}
|
}
|
||||||
searchQuerySplit := strings.Split(search_param.Query, " ")
|
searchQuerySplit := strings.Split(search_param.Query, " ")
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
</select>
|
</select>
|
||||||
<select name="s" class="form-control input-sm">
|
<select name="s" class="form-control input-sm">
|
||||||
<option value="">Show all</option>
|
<option value="">Show all</option>
|
||||||
<option value="2" {{if eq .Search.Status "2"}}selected{{end}}>Remakes</option>
|
<option value="2" {{if eq .Search.Status "2"}}selected{{end}}>Filter Remakes</option>
|
||||||
<option value="3" {{if eq .Search.Status "3"}}selected{{end}}>Trusted</option>
|
<option value="3" {{if eq .Search.Status "3"}}selected{{end}}>Trusted</option>
|
||||||
<option value="4" {{if eq .Search.Status "4"}}selected{{end}}>A+</option>
|
<option value="4" {{if eq .Search.Status "4"}}selected{{end}}>A+</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
Référencer dans un nouveau ticket