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 50a6e844db Fix adding tag form (nojs) + miscalleneous (#1468)
* Fix search Status
Should fix #1428 ?s=2 and others. Reason: the sql query wasn't correct when filtering (status >= ? = ?)

* Fix adding tag form (nojs) + miscalleneous
* Fix #1423 by checking http method before finding the tags.
* Form is now like other tags form
* New Middleware LoggedInMiddleware to protect routes to logged user only
* Display of Non-Accepted tags in torrent view improved by translating tagtype values

* Update tag.jet.html
2017-09-03 10:30:30 +10:00

14 lignes
1 Kio
HTML

{{ block tag(tag=nil,accepted=false,torrentID=0) }}
{{if isset(tag) && (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 }}
{{ if len(Config.Torrents.Tags.Types.Get(tag.Type).Defaults) > 0 && Config.Torrents.Tags.Types.Get(tag.Type).Defaults[0] != "db" }}{{ T("tagvalue_"+tag.Tag) }}{{else}}{{ tag.Tag }}{{end}}
</span>
{{ if !accepted }}
<a href="/torrent/tag/{{ if User.Tags.Contains(.) }}remove{{else}}add{{end}}?id={{torrentID}}&tag={{ tag.Tag }}&type={{ tag.Type }}" class="tag-form {{ if User.Tags.Contains(.) }}minus{{else}}plus{{end}}{{if accepted}} accepted{{end}}"></a>
{{ end }}
</span>
{{ end }}
{{ end }}