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,24 +14,24 @@
{{ range i, t := UserProfile.Torrents }} {{ range i, t := UserProfile.Torrents }}
{{ if DisplayTorrent(t, User) }} {{ if DisplayTorrent(t, User) }}
{{ torrent := t.ToJSON() }} {{ 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}}"> {{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 --> <!-- forced width because the <td> gets bigger randomly otherwise -->
<td class="tr-cat user-td"> <td class="tr-cat user-td">
{{ if Sukebei }} {{ if Sukebei }}
<div class="nyaa-cat sukebei-cat-{{ torrent.Category }}{{ torrent.SubCategory }}"> <div class="nyaa-cat sukebei-cat-{{ torrent.Category }}{{ torrent.SubCategory}}">
{{ else}} {{ else }}
<div class="nyaa-cat nyaa-cat-{{ torrent.SubCategory}}"> <div class="nyaa-cat nyaa-cat-{{ torrent.SubCategory }}">
{{end}} {{ end }}
<a href="{{ URL.Parse("/search?c="+torrent.Category+"_"+ .torrentSubCategory) }}" title="{{ T(CategoryName(.Category, .SubCategory)) }}" class="category"> <a href="{{URL.Parse ("/search?c="+ torrent.Category + "_" +torrent.SubCategory) }}" title="{{T(CategoryName(torrent.Category, torrent.SubCategory))}}">
{{if torrent.Languages[0] != "" }} {{ 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 }}"> <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(.Languages[0]) : "multiple" }}" title=" {{ range key, language := torrent.Languages }}{{ LanguageName(language, T) }}{{ 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> </a>
{{end}} {{end}}
</a> </a>
</div> </div>
</td> </td>
<td class="tr-name"> <td class="tr-name">
<a href="/view/{{torrent.ID}}"> <a href="/view/{{torrent.ID}}">
{{torrent.Name}} {{torrent.Name}}