Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0
Ce dépôt a été archivé le 2022-05-07. Vous pouvez voir ses fichiers ou le cloner, mais pas ouvrir de ticket ou de demandes d'ajout, ni soumettre de changements.
nyaa-pantsu/templates/layouts/partials/helpers/tags.jet.html
akuma06 2b4731d16c Dbidlinks (#1396)
* Add Anidb, Vndb, Vgmdb links

* Anidb, Vndb, Vgmdb and Dlsite links into tag design
* Add external links to Anidb, Vndb, Vgmdb and dlsite

* Add filter links to tags

* Filter string translation already exists

* Fix display tags

* Update translation changelog

* Do not display tag type when default
2017-08-26 11:42:12 +10:00

16 lignes
1,2 Kio
HTML

{{ block tag(tag=nil,accepted=false,torrent=nil,user=nil) }}
{{ if isset(user) && isset(tag) }}
{{if accepted || user.ID > 0 }}
<span class="tag{{ if !accepted }} pending{{else}} accepted{{end}}" title="Tag: {{ tag.Type }} ({{ if !accepted }}{{ tag.Total }}{{else}}{{ T("accepted") }}{{end}})"{{ if !accepted }} data-weight="{{ tag.Total }}"{{end}}>
<span class="tag-text{{ if user.ID > 0 }} votable{{end}}">
{{ if tag.Type != Config.Torrents.Tags.Default }}{{ T("tagtype_" + tag.Type) }}: {{end}}{{ T(tag.GetName()) }}
</span>
{{ if !accepted }}
<a href="/torrent/tag/{{ if user.Tags.Contains(tag) }}remove?id={{torrent.ID}}&tag={{ tag.Tag }}&type={{ tag.Type }}{{else}}add?id={{torrent.ID}}&tag_{{ tag.Type }}={{ tag.Tag }}{{end}}" class="tag-form {{ if user.Tags.Contains(tag) }}minus{{else}}plus{{end}}{{if accepted}} accepted{{end}}"></a>
{{ else }}
<a href="/search?tags={{ tag.Tag }}" title="{{ T("filter") }}"><i style="padding: 0px 0px 2px;" class="icon-search"></i></a>
{{ end }}
</span>
{{ end }}
{{ end }}
{{ end }}