Not showing torrents with invalid categories in listing (#1302)
* Show "unknown" category if name is empty (invalid) * Don't show torrent in listing if invalid category
Cette révision appartient à :
Parent
5e95b57958
révision
3708647c73
2 fichiers modifiés avec 3 ajouts et 1 suppressions
|
@ -52,6 +52,7 @@
|
|||
</thead>
|
||||
<tbody id="torrentListResults">
|
||||
{{ range Models}}
|
||||
{{ if CategoryName(.Category, .SubCategory) != ""}}
|
||||
<tr id="torrent_{{ .ID }}" class="torrent-info {{if .Status == 2}}remake{{else if .Status == 3}}trusted{{else if .Status == 4}}aplus{{end}}" >
|
||||
{{ if User.HasAdmin() }}
|
||||
<td class="tr-cb hide">
|
||||
|
@ -105,6 +106,7 @@
|
|||
{{end}}
|
||||
<td class="tr-date home-td date-short hide-xs">{{.Date}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<tr class="torrent-info-row">
|
||||
<td class="torrent-info-td torrent-info-label">{{ T("category") }}:</td>
|
||||
<td class="torrent-info-td torrent-info-data" style="padding:0">
|
||||
<a href="{{URL.Parse("/search?c="+Torrent.Category+"_"+Torrent.SubCategory) }}">{{ T(CategoryName(Torrent.Category, Torrent.SubCategory)) }}</a>
|
||||
<a href="{{URL.Parse("/search?c="+Torrent.Category+"_"+Torrent.SubCategory) }}">{{ CategoryName(Torrent.Category, Torrent.SubCategory) == "" ? T("unknown") : T(CategoryName(Torrent.Category, Torrent.SubCategory)) }}</a>
|
||||
<br/>
|
||||
</td>
|
||||
<td class="torrent-info-td torrent-info-label">{{ T("date") }}:</td>
|
||||
|
|
Référencer dans un nouveau ticket