{{ extends "layouts/index_site" }} {{ import "layouts/partials/helpers/csrf" }} {{ import "layouts/partials/helpers/captcha" }} {{ import "layouts/partials/helpers/treeview" }} {{block title()}}{{Torrent.Name}}{{end}} {{block additional_header()}} {{end}} {{block content_body()}}

{{Torrent.Name}}


{{if FlagCode(Torrent.Language) != ""}} {{end}}
{{ T("category") }}:{{ T(CategoryName(Torrent.Category, Torrent.SubCategory)) }}
{{ T("date") }}:{{Torrent.Date}}
{{ T("uploaded_by") }}:{{ genUploaderLink(Torrent.UploaderID, Torrent.UploaderName, Torrent.Hidden)|raw }} {{ T("seeders")}}:{{if Torrent.LastScrape.IsZero}}{{ T("unknown")}}{{else}}{{Torrent.Seeders}}{{end}}
{{ T("website_link") }}:{{if Torrent.WebsiteLink != ""}}{{Torrent.WebsiteLink}}{{else}}N/A{{end}} {{ T("leechers")}}:{{if Torrent.LastScrape.IsZero}}{{ T("unknown")}}{{else}}{{Torrent.Leechers}}{{end}}
{{ T("hash")}}:{{Torrent.Hash}} {{ T("completed")}}:{{if Torrent.LastScrape.IsZero}}{{ T("unknown")}}{{else}}{{Torrent.Completed}}{{end}}
{{ T("size")}}:{{ fileSize(Torrent.Filesize, T) }} {{ T("last_scraped")}}{{formatDateRFC(Torrent.LastScrape)}}{{else}}">{{ T("unknown")}}{{end}}
{{ T("torrent_language")}}:{{ LanguageName(Torrent.Language, T) }} {{ LanguageName(Torrent.Language, T) }}
{{ T("magnet_link")}}
{{ if Torrent.TorrentLink != ""}}
{{ T("torrent_file")}}
{{end}} {{ if User.ID > 0}} {{ T("report_btn") }} {{ if HasAdmin(User)}} {{ T("delete") }} {{ T("edit") }} {{ else if CurrentUserIdentical(User, Torrent.UploaderID) }} {{ T("delete") }} {{ T("edit") }} {{end}} {{end}}

{{ T("description")}}

{{ if Torrent.Description != ""}}
{{Torrent.Description|raw}}
{{else}}

{{ T("no_description") }}

{{end}}
{{ if len(Torrent.FileList) > 0 }} {* how do i concat lol *} {{ yield make_treeview(treeviewData=makeTreeViewData(RootFolder, 0, T, "root")) }}
{{ T("file_name")}} {{ T("size")}}
{{ else }}

{{ T("no_files") }}

{{ end }}

{{ T("comments")}}

{{range index, element := Torrent.Comments}}
#{{index}}{{formatDateRFC(.Date)}}

{{.Username}}

{{.Content}}

{{end}}
{{ yield csrf_field()}}

{{ if User.ID > 0}} {{ T("submit_a_comment_as_username", User.Username) }} {{else}} {{ T("submit_a_comment_as_anonymous")|raw}} {{end}}

{{ yield captcha(captchaid=CaptchaID)}}
{{ if User.ID > 0 }} {{end}} {{end}} {{ block footer_js()}} {{end}}