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

{{Torrent.Name}}


{{ if len(Torrent.Languages) > 0 && Torrent.Languages[0] != "" }} {{end}} {{ if Torrent.Tags.HasAccepted() || User.ID > 0 }} {{end}}
{{ T("category") }}: {{ CategoryName(Torrent.Category, Torrent.SubCategory) == "" ? T("unknown") : 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")}}: {{ range _, language := Torrent.Languages}} {{ if language != "" }} 5 }}class="big"{{ end }}> {{ LanguageNameFromCode(language, T) }} {{ LanguageNameFromCode(language, T) }} {{end}} {{end}}
{{ T("torrent_tags")}}: {{ range Torrent.Tags }} {{if .Accepted || User.ID > 0 }} {{ T("tagtype_" + .Type) }}: {{ .Tag }} {{ if !.Accepted }} {{ end }} {{end}} {{end}} {{ if User.ID > 0 }}{{ T("add") }}{{ end }}
{{ T("magnet_link")}}
{{ if Torrent.TorrentLink != ""}}
{{ T("torrent_file")}}
{{end}} {{ if User.ID > 0}} {{ T("report_btn") }} {{ if User.HasAdmin()}} {{ T("delete") }} {{ T("edit") }} {{ else if User.CurrentUserIdentical(Torrent.UploaderID) }} {{ T("delete") }} {{ T("edit") }} {{end}} {{end}}

{{ T("description")}}

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

{{ T("no_description") }}

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

{{ T("no_files") }}

{{ end }}

{{ T("comments")}}

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

{{element.Username}}

{{element.Content|raw}}

{{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()}} {{ if User.ID > 0 }} {{end}} {{end}}