Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/NyaaPantsu/nyaa into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
akuma06 committed Jul 22, 2017
2 parents 0f0b658 + 3807c69 commit df45959
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/search/search.go
Expand Up @@ -50,7 +50,7 @@ func SearchHandler(c *gin.Context) {

maxPages := math.Ceil(float64(nbTorrents) / float64(searchParam.Max))
if pagenum > int(maxPages) {
c.AbortWithError(http.StatusNotFound, errors.New("Page superior to the maximum number of pages"))
templates.Static(c, "errors/no_results.jet.html")
return
}

Expand Down
Binary file added public/img/no_results.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions templates/errors/no_results.jet.html
@@ -0,0 +1,9 @@
{{ extends "layouts/index_site" }}
{{block title()}}{{ T("err_no_results")}}{{end}}
{{block content_body()}}
<div style="text-align: center;">
<h1>{{ T("err_no_results")}}</h1>
<img src="/img/no_results.jpg" />
</div>
{{end}}
{{block mascot()}}<br>{{end}}
4 changes: 4 additions & 0 deletions translations/en-us.all.json
Expand Up @@ -195,6 +195,10 @@
"id": "error_500",
"translation": "Error 500"
},
{
"id": "err_no_results",
"translation": "No results found"
},
{
"id": "upload",
"translation": "Upload"
Expand Down

0 comments on commit df45959

Please sign in to comment.