{{define "title"}}{{.Torrent.Name}}{{end}} {{define "contclass"}}cont-view {{if eq .Torrent.Status 2}}remake{{end}} {{if eq .Torrent.Status 3}}trusted{{end}} {{if eq .Torrent.Status 4}}aplus{{end}}{{end}} {{ define "make_treeview" }} {{ range $index, $folder := .Folder.Folders }} {{ $folderId := (print $.IdentifierChain "_" $index) }} {{ fileSize $folder.TotalSize $.T }} {{ template "make_treeview" (makeTreeViewData $folder (inc $.NestLevel) $.T $folderId) }}
{{ end }} {{ range .Folder.Files }} {{.Filename}} {{fileSize .Filesize $.T}} {{ end }} {{ end }} {{define "content"}}
{{with .Torrent}} {{ range (index $.FormErrors "errors")}}
× {{ . }}
{{end}} {{ range (index $.Infos "infos")}}
× {{ . }}
{{end}}

{{.Name}}


{{ call $.T "category" }}:{{ if Sukebei}}{{ call $.T (CategoryName .Category .SubCategory) }}{{else}}{{ call $.T (CategoryName .Category .SubCategory) }}{{end}}
{{ call $.T "date" }}:{{.Date}}
{{ call $.T "uploaded_by" }}:{{.UploaderName}} {{call $.T "seeders"}}:{{if .LastScrape.IsZero}}{{call $.T "unknown"}}{{else}}{{.Seeders}}{{end}}
{{ call $.T "website_link" }}:{{if ne .WebsiteLink ""}}{{.WebsiteLink}}{{else}}{{GetHostname $.Config.WebAddress.Nyaa}}{{end}} {{call $.T "leechers"}}:{{if .LastScrape.IsZero}}{{call $.T "unknown"}}{{else}}{{.Leechers}}{{end}}
{{call $.T "hash"}}:{{.Hash}} {{call $.T "completed"}}:{{if .LastScrape.IsZero}}{{call $.T "unknown"}}{{else}}{{.Completed}}{{end}}
{{call $.T "size"}}:{{ fileSize .Filesize $.T }} {{call $.T "last_scraped"}}{{formatDateRFC .LastScrape}}{{else}}">{{call $.T "unknown"}}{{end}}
{{call $.T "magnet_link"}} {{ if ne .TorrentLink ""}} {{call $.T "torrent_file"}} {{end}} {{ if gt $.User.ID 0}} {{ call $.T "report_btn" }} {{end}} {{ if HasAdmin $.User}} {{ call $.T "delete" }} {{ call $.T "edit" }} {{end}}

{{call $.T "description"}}

{{ if ne .Description ""}}
{{.Description}}
{{else}}

{{ call $.T "no_description" }}

{{end}}
{{ if gt (len .FileList) 0 }} {{/* how do i concat lol */}} {{ template "make_treeview" (makeTreeViewData $.RootFolder 0 $.T "root") }}
{{call $.T "filename"}} {{call $.T "size"}}
{{ else }}

{{ call $.T "no_files" }}

{{ end }}

{{call $.T "comments"}}

{{range $index, $element := .Comments}}
#{{inc $index}}{{formatDateRFC .Date}}

{{.Username}}

{{.Content}}

{{end}} {{end}}
{{ block "csrf_field" $ }}{{end}}

{{ if gt .User.ID 0}} {{call $.T "submit_a_comment_as_username" .User.Username}} {{else}} {{call $.T "submit_a_comment_as_anonymous"}} {{end}}

{{block "captcha" (makeCaptchaData .CaptchaID $.T)}}{{end}}
{{end}}