From 5eb56a4ea1bffa91a85e7badd92309725d90a78f Mon Sep 17 00:00:00 2001 From: kilo Date: Mon, 17 Jul 2017 21:54:06 +0200 Subject: [PATCH] Make previewed real torrent hidden (50% opacity) and remove any link they have to avoid painful missclicks (#1222) * Update upload.jet.html * Add files via upload --- .../partials/torrent_item_upload.jet.html | 42 +++++++++++++++++++ templates/site/torrents/upload.jet.html | 2 +- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 templates/layouts/partials/torrent_item_upload.jet.html diff --git a/templates/layouts/partials/torrent_item_upload.jet.html b/templates/layouts/partials/torrent_item_upload.jet.html new file mode 100644 index 00000000..64c6adb4 --- /dev/null +++ b/templates/layouts/partials/torrent_item_upload.jet.html @@ -0,0 +1,42 @@ +{{ range _, cat := GetCategories(false, true) }} +T.Add("{{ cat.ID }}", "{{ T(cat.Name) }}") +{{end}} +{{ range _, language := GetTorrentLanguages() }} +T.Add("{{ language.Code }}", "{{ LanguageName(language, T) }}") +{{ if language.Tag != language.Code }} +T.Add("{{ language.Tag }}", "{{ LanguageName(language, T) }}") +{{end}} +{{end}} +Templates.Add("torrents.item", function(torrent) { + return ""+ + {{ if User.HasAdmin() }} + ""+ + ""+ + ""+ + {{ end }} + ""+ + {{ if Sukebei() }} + "
"+ + {{else}} + "
"+ + {{end}} + ""+ + ((torrent.languages[0] != "") ? "" : "") + + ""+ + "
"+ + ""+Templates.EncodeEntities(torrent.name) +""+ + ""+ + ((torrent.comments.length > 0) ? "" + torrent.comments.length + "" : "")+ + ""+ + ""+ + ""+ + "
"+ + "
"+(torrent.torrent != "" ? "
" : "") + + ""+ + ""+humanFileSize(torrent.filesize)+""+ + ""+torrent.seeders+""+ + ""+torrent.leechers+""+ + ""+torrent.completed+""+ + ""+torrent.date+""+ + ""; +}); \ No newline at end of file diff --git a/templates/site/torrents/upload.jet.html b/templates/site/torrents/upload.jet.html index 3e4e0283..607a641c 100644 --- a/templates/site/torrents/upload.jet.html +++ b/templates/site/torrents/upload.jet.html @@ -112,7 +112,7 @@