mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2026-04-01 17:45:31 +00:00
implement torrent statuses management #28
This commit is contained in:
parent
3cbc6ea90f
commit
989f2f3311
64 changed files with 1051 additions and 282 deletions
|
|
@ -80,7 +80,7 @@
|
|||
</div>
|
||||
<table class="width-100">
|
||||
<tbody>
|
||||
{% if session.moderator %}
|
||||
{% if session.moderator or session.owner %}
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div class="padding-y-8-px border-bottom-default text-right">
|
||||
|
|
@ -90,19 +90,19 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td class="padding-t-16-px">
|
||||
{{ 'Approved' | trans }}
|
||||
{{ 'Enabled' | trans }}
|
||||
</td>
|
||||
<td class="padding-t-16-px">
|
||||
{% if torrent.approved %}
|
||||
{% if torrent.status %}
|
||||
{{ 'Yes' | trans }}
|
||||
<a class="float-right" href="{{ path('torrent_approve_toggle', { torrentId : torrent.id }) }}" title="{{ 'Toggle' | trans }}">
|
||||
<a class="float-right" href="{{ path('torrent_status_toggle', { torrentId : torrent.id }) }}" title="{{ 'Toggle' | trans }}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
|
||||
<path d="M5 3a5 5 0 0 0 0 10h6a5 5 0 0 0 0-10H5zm6 9a4 4 0 1 1 0-8 4 4 0 0 1 0 8z"/>
|
||||
</svg>
|
||||
</a>
|
||||
{% else %}
|
||||
{{ 'No' | trans }}
|
||||
<a class="float-right text-color-red" href="{{ path('torrent_approve_toggle', { torrentId : torrent.id }) }}" title="{{ 'Toggle' | trans }}">
|
||||
<a class="float-right text-color-red" href="{{ path('torrent_status_toggle', { torrentId : torrent.id }) }}" title="{{ 'Toggle' | trans }}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
|
||||
<path d="M11 4a4 4 0 0 1 0 8H8a4.992 4.992 0 0 0 2-4 4.992 4.992 0 0 0-2-4h3zm-6 8a4 4 0 1 1 0-8 4 4 0 0 1 0 8zM0 8a5 5 0 0 0 5 5h6a5 5 0 0 0 0-10H5a5 5 0 0 0-5 5z"/>
|
||||
</svg>
|
||||
|
|
@ -110,6 +110,30 @@
|
|||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% if session.moderator %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ 'Approved' | trans }}
|
||||
</td>
|
||||
<td>
|
||||
{% if torrent.approved %}
|
||||
{{ 'Yes' | trans }}
|
||||
<a class="float-right" href="{{ path('torrent_approve_toggle', { torrentId : torrent.id }) }}" title="{{ 'Toggle' | trans }}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
|
||||
<path d="M5 3a5 5 0 0 0 0 10h6a5 5 0 0 0 0-10H5zm6 9a4 4 0 1 1 0-8 4 4 0 0 1 0 8z"/>
|
||||
</svg>
|
||||
</a>
|
||||
{% else %}
|
||||
{{ 'No' | trans }}
|
||||
<a class="float-right text-color-red" href="{{ path('torrent_approve_toggle', { torrentId : torrent.id }) }}" title="{{ 'Toggle' | trans }}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
|
||||
<path d="M11 4a4 4 0 0 1 0 8H8a4.992 4.992 0 0 0 2-4 4.992 4.992 0 0 0-2-4h3zm-6 8a4 4 0 1 1 0-8 4 4 0 0 1 0 8zM0 8a5 5 0 0 0 5 5h6a5 5 0 0 0 0-10H5a5 5 0 0 0-5 5z"/>
|
||||
</svg>
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
|
|
|
|||
|
|
@ -39,6 +39,14 @@
|
|||
{{ 'wanted' | trans }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if torrent.status == false %}
|
||||
<sub class="margin-l-8-px float-right opacity-06 hover-opacity-1" title="{{ 'Disabled' | trans }}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="currentColor" viewBox="0 0 16 16">
|
||||
<path d="m10.79 12.912-1.614-1.615a3.5 3.5 0 0 1-4.474-4.474l-2.06-2.06C.938 6.278 0 8 0 8s3 5.5 8 5.5a7.029 7.029 0 0 0 2.79-.588zM5.21 3.088A7.028 7.028 0 0 1 8 2.5c5 0 8 5.5 8 5.5s-.939 1.721-2.641 3.238l-2.062-2.062a3.5 3.5 0 0 0-4.474-4.474L5.21 3.089z"/>
|
||||
<path d="M5.525 7.646a2.5 2.5 0 0 0 2.829 2.829l-2.83-2.829zm4.95.708-2.829-2.83a2.5 2.5 0 0 1 2.829 2.829zm3.171 6-12-12 .708-.708 12 12-.708.708z"/>
|
||||
</svg>
|
||||
</sub>
|
||||
{% endif %}
|
||||
{% if torrent.approved == false %}
|
||||
<sub class="margin-l-8-px float-right opacity-06 hover-opacity-1" title="{{ 'Waiting for approve' | trans }}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="currentColor" viewBox="0 0 16 16">
|
||||
|
|
@ -47,7 +55,7 @@
|
|||
</sub>
|
||||
{% endif %}
|
||||
{% if torrent.sensitive == true %}
|
||||
<sub class="margin-l-8-px float-right opacity-06 hover-opacity-1" title="{{ 'Content visible for non sensitive users only' | trans }}">
|
||||
<sub class="margin-l-8-px float-right opacity-06 hover-opacity-1" title="{{ 'Sensitive' | trans }}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="currentColor" viewBox="0 0 16 16">
|
||||
<path d="m9.97 4.88.953 3.811C10.159 8.878 9.14 9 8 9c-1.14 0-2.158-.122-2.923-.309L6.03 4.88C6.635 4.957 7.3 5 8 5s1.365-.043 1.97-.12zm-.245-.978L8.97.88C8.718-.13 7.282-.13 7.03.88L6.275 3.9C6.8 3.965 7.382 4 8 4c.618 0 1.2-.036 1.725-.098zm4.396 8.613a.5.5 0 0 1 .037.96l-6 2a.5.5 0 0 1-.316 0l-6-2a.5.5 0 0 1 .037-.96l2.391-.598.565-2.257c.862.212 1.964.339 3.165.339s2.303-.127 3.165-.339l.565 2.257 2.391.598z"/>
|
||||
</svg>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue