Albirew/nyaa-pantsu
Albirew
/
nyaa-pantsu
Archivé
1
0
Bifurcation 0

Update template.go

Cette révision appartient à :
kilo 2017-11-08 11:45:00 +01:00 révisé par GitHub
Parent 8f28efcbc9
révision c1658bc872
Signature inconnue de Forgejo
ID de la clé GPG: 4AEE18F83AFDEB23
1 fichiers modifiés avec 8 ajouts et 0 suppressions

Voir le fichier

@ -160,6 +160,14 @@ func Torrent(c *gin.Context, torrent models.TorrentJSON, rootFolder *filelist.Fi
Render(c, path.Join(SiteDir, "torrents", "view.jet.html"), variables)
}
// Torrent render a torrent view template
func TorrentFileList(c *gin.Context, torrent models.TorrentJSON, rootFolder *filelist.FileListFolder) {
variables := Commonvariables(c)
variables.Set("Torrent", torrent)
variables.Set("RootFolder", rootFolder)
Render(c, path.Join(SiteDir, "torrents", "filelist.jet.html"), variables)
}
// userProfilBase render the base for user profile
func userProfileBase(c *gin.Context, templateName string, userProfile *models.User, variables jet.VarMap) {
currentUser, _, _ := cookies.CurrentUser(c)