Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

Proper user torrent listing (#1136)

* Update torrents.jet.html

* Update torrents.jet.html

* Update torrents.jet.html
Cette révision appartient à :
kilo 2017-07-10 02:19:02 +02:00 révisé par ewhal
Parent 92356a30e2
révision 09313cdc0e

Voir le fichier

@ -14,19 +14,19 @@
{{ range i, t := UserProfile.Torrents }}
{{ if DisplayTorrent(t, User) }}
{{ torrent := t.ToJSON() }}
<tr class="torrent-info user-torrent
<tr class="user-torrent torrent-info
{{if torrent.Status == 2}}remake{{else if torrent.Status == 3}}trusted{{else if torrent.Status == 4}}aplus{{end}}">
<!-- forced width because the <td> gets bigger randomly otherwise -->
<td class="tr-cat user-td">
{{ if Sukebei }}
<div class="nyaa-cat sukebei-cat-{{ torrent.Category }}{{ torrent.SubCategory }}">
{{ else}}
<div class="nyaa-cat nyaa-cat-{{ torrent.SubCategory}}">
{{end}}
<a href="{{ URL.Parse("/search?c="+torrent.Category+"_"+ .torrentSubCategory) }}" title="{{ T(CategoryName(.Category, .SubCategory)) }}" class="category">
{{if torrent.Languages[0] != "" }}
<a href="{{ URL.Parse("/search?c="+torrent.Category+"_"+ .SubCategory +"&lang=") }}{{ range key, language := torrent.Languages }}{{ language }}{{ if len(torrent.Languages) > 1 && (key+1) < len(torrent.Languages) }},{{ end }}{{ end }}">
<img src="/img/blank.gif" alt="{{ LanguageName(torrent.Languages[0], T) }}" class="flag flag-{{ (len(torrent.Languages) == 1) ? FlagCode(.Languages[0]) : "multiple" }}" title=" {{ range key, language := torrent.Languages }}{{ LanguageName(language, T) }}{{ if len(torrent.Languages) > 1 && (key+1) < len(torrent.Languages) }},{{ end }}{{ end }}">
<div class="nyaa-cat sukebei-cat-{{ torrent.Category }}{{ torrent.SubCategory}}">
{{ else }}
<div class="nyaa-cat nyaa-cat-{{ torrent.SubCategory }}">
{{ end }}
<a href="{{URL.Parse ("/search?c="+ torrent.Category + "_" +torrent.SubCategory) }}" title="{{T(CategoryName(torrent.Category, torrent.SubCategory))}}">
{{ if torrent.Languages[0] != "" }}
<a href="{{ URL.Parse("/search?c="+torrent.Category+"_"+ torrent.SubCategory +"&lang=") }}{{ range key, language := torrent.Languages }}{{ language }}{{ if len(torrent.Languages) > 1 && (key+1) < len(torrent.Languages) }},{{ end }}{{ end }}">
<img src="/img/blank.gif" alt="{{ LanguageName(torrent.Languages[0], T) }}" class="flag flag-{{ (len(torrent.Languages) == 1) ? FlagCode(torrent.Languages[0]) : "multiple" }}" title=" {{ range key, language := torrent.Languages }}{{ LanguageName(language, T) }}{{ if len(torrent.Languages) > 1 && (key+1) < len(torrent.Languages) }},{{ end }}{{ end }}">
</a>
{{end}}
</a>