Merge pull request #63 from Lietzu/master
Remake search is now Filter Remakes like old nyaa
Cette révision appartient à :
révision
9f64351e4d
2 fichiers modifiés avec 6 ajouts et 2 suppressions
6
main.go
6
main.go
|
@ -158,7 +158,11 @@ func searchByQuery(r *http.Request, pagenum int) (SearchParam, []model.Torrents,
|
|||
parameters.Params = append(parameters.Params, searchSubCatId)
|
||||
}
|
||||
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)
|
||||
}
|
||||
searchQuerySplit := strings.Split(search_param.Query, " ")
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
</select>
|
||||
<select name="s" class="form-control input-sm">
|
||||
<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="4" {{if eq .Search.Status "4"}}selected{{end}}>A+</option>
|
||||
</select>
|
||||
|
|
Référencer dans un nouveau ticket