Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

Fixing navigation pages

Cette révision appartient à :
akuma06 2017-07-07 00:27:08 +02:00
Parent 725b0423da
révision 4e3221f69e
3 fichiers modifiés avec 8 ajouts et 7 suppressions

Voir le fichier

@ -13,7 +13,7 @@ import (
// ActivityListHandler : Show a list of activity
func ActivityListHandler(c *gin.Context) {
page := c.Query("page")
page := c.Param("page")
pagenum := 1
offset := 100
userid := c.Query("userid")
@ -41,6 +41,6 @@ func ActivityListHandler(c *gin.Context) {
activity, nbActivities := activities.FindAll(offset, (pagenum-1)*offset, strings.Join(conditions, " AND "), values...)
nav := navigation{nbActivities, offset, pagenum, "activities"}
nav := navigation{nbActivities, offset, pagenum, "activities/p"}
modelList(c, "site/torrents/activities.jet.html", activity, nav, newSearchForm(c))
}

Voir le fichier

@ -162,7 +162,7 @@ func TorrentsListPanel(c *gin.Context) {
ShowItemsPerPage: true,
}
nav := navigation{count, int(searchParam.Max), pagenum, "mod_tlist_page"}
nav := navigation{count, int(searchParam.Max), pagenum, "mod/torrents/p"}
modelList(c, "admin/torrentlist.jet.html", torrents, nav, searchForm)
}
@ -185,7 +185,7 @@ func TorrentReportListPanel(c *gin.Context) {
torrentReports, nbReports, _ := reports.GetAll(offset, (pagenum-1)*offset)
reportJSON := models.TorrentReportsToJSON(torrentReports)
nav := navigation{nbReports, offset, pagenum, "mod_trlist_page"}
nav := navigation{nbReports, offset, pagenum, "mod/reports/p"}
modelList(c, "admin/torrent_report.jet.html", reportJSON, nav, newSearchForm(c))
}
@ -205,7 +205,7 @@ func UsersListPanel(c *gin.Context) {
}
users, nbUsers := users.FindUsersForAdmin(offset, (pagenum-1)*offset)
nav := navigation{nbUsers, offset, pagenum, "mod_ulist_page"}
nav := navigation{nbUsers, offset, pagenum, "mod/users/p"}
modelList(c, "admin/userlist.jet.html", users, nav, newSearchForm(c))
}
@ -232,7 +232,7 @@ func CommentsListPanel(c *gin.Context) {
}
comments, nbComments := comments.FindAll(offset, (pagenum-1)*offset, conditions, values...)
nav := navigation{nbComments, offset, pagenum, "mod_clist_page"}
nav := navigation{nbComments, offset, pagenum, "mod/comments/p"}
modelList(c, "admin/commentlist.jet.html", comments, nav, newSearchForm(c))
}
@ -445,7 +445,7 @@ func DeletedTorrentsModPanel(c *gin.Context) {
ShowItemsPerPage: true,
}
nav := navigation{count, int(searchParam.Max), pagenum, "mod_tlist_page"}
nav := navigation{count, int(searchParam.Max), pagenum, "mod/torrents/deleted/p"}
search := searchForm
modelList(c, "admin/torrentlist.jet.html", torrents, nav, search)
}

Voir le fichier

@ -38,6 +38,7 @@ func init() {
Router.Any("/verify/email/:token", UserVerifyEmailHandler)
Router.Any("/faq", FaqHandler)
Router.Any("/activities", ActivityListHandler)
Router.Any("/activities/p/:page", ActivityListHandler)
Router.Any("/feed", RSSHandler)
Router.Any("/feed/p/:page", RSSHandler)
Router.Any("/feed/magnet", RSSMagnetHandler)