50a6e844db
* 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
13 lignes
1 Kio
HTML
13 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 }}
|