mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2026-03-31 17:15:38 +00:00
implement approved/sensitive access behavior
This commit is contained in:
parent
130add0904
commit
60a5593446
22 changed files with 681 additions and 122 deletions
|
|
@ -6,9 +6,24 @@
|
|||
<span class="margin-l-4-px">
|
||||
{{ 'added torrent' | trans }}
|
||||
</span>
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% if session.user.moderator or session.user.owner %}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% if torrent.approved == false %}
|
||||
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if torrent.approved == false %}
|
||||
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
|
||||
{% elseif torrent.sensitive == true %}
|
||||
#{{ torrent.id }} ({{ 'sensitive' | trans }})
|
||||
{% else %}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="column width-20 text-right">
|
||||
{{ added | format_ago }}
|
||||
|
|
|
|||
|
|
@ -6,9 +6,24 @@
|
|||
<span class="margin-l-4-px">
|
||||
{{ 'approved torrent' | trans }}
|
||||
</span>
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% if session.user.moderator or session.user.owner %}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% if torrent.approved == false %}
|
||||
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if torrent.approved == false %}
|
||||
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
|
||||
{% elseif torrent.sensitive == true %}
|
||||
#{{ torrent.id }} ({{ 'sensitive' | trans }})
|
||||
{% else %}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="column width-20 text-right">
|
||||
{{ added | format_ago }}
|
||||
|
|
|
|||
|
|
@ -6,9 +6,24 @@
|
|||
<span class="margin-l-4-px">
|
||||
{{ 'disapproved torrent' | trans }}
|
||||
</span>
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% if session.user.moderator or session.user.owner %}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% if torrent.approved == false %}
|
||||
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if torrent.approved == false %}
|
||||
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
|
||||
{% elseif torrent.sensitive == true %}
|
||||
#{{ torrent.id }} ({{ 'sensitive' | trans }})
|
||||
{% else %}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="column width-20 text-right">
|
||||
{{ added | format_ago }}
|
||||
|
|
|
|||
|
|
@ -6,9 +6,24 @@
|
|||
<span class="margin-x-l-px">
|
||||
{{ 'downloaded torrent file' | trans }}
|
||||
</span>
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% if session.user.moderator or session.user.owner %}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% if torrent.approved == false %}
|
||||
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if torrent.approved == false %}
|
||||
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
|
||||
{% elseif torrent.sensitive == true %}
|
||||
#{{ torrent.id }} ({{ 'sensitive' | trans }})
|
||||
{% else %}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="column width-20 text-right">
|
||||
{{ added | format_ago }}
|
||||
|
|
|
|||
|
|
@ -6,9 +6,24 @@
|
|||
<span class="margin-l-4-px">
|
||||
{{ 'downloaded magnet link' | trans }}
|
||||
</span>
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% if session.user.moderator or session.user.owner %}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% if torrent.approved == false %}
|
||||
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if torrent.approved == false %}
|
||||
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
|
||||
{% elseif torrent.sensitive == true %}
|
||||
#{{ torrent.id }} ({{ 'sensitive' | trans }})
|
||||
{% else %}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="column width-20 text-right">
|
||||
{{ added | format_ago }}
|
||||
|
|
|
|||
|
|
@ -14,9 +14,24 @@
|
|||
#{{ torrent.locales.id }}
|
||||
{% endif %}
|
||||
{{ 'for torrent' | trans }}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% if session.user.moderator or session.user.owner %}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% if torrent.approved == false %}
|
||||
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if torrent.approved == false %}
|
||||
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
|
||||
{% elseif torrent.sensitive == true %}
|
||||
#{{ torrent.id }} ({{ 'sensitive' | trans }})
|
||||
{% else %}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="column width-20 text-right">
|
||||
{{ added | format_ago }}
|
||||
|
|
|
|||
|
|
@ -12,9 +12,24 @@
|
|||
#{{ torrent.locales.id }}
|
||||
{% endif %}
|
||||
{{ 'for torrent' | trans }}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% if session.user.moderator or session.user.owner %}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% if torrent.approved == false %}
|
||||
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if torrent.approved == false %}
|
||||
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
|
||||
{% elseif torrent.sensitive == true %}
|
||||
#{{ torrent.id }} ({{ 'sensitive' | trans }})
|
||||
{% else %}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="column width-20 text-right">
|
||||
{{ added | format_ago }}
|
||||
|
|
|
|||
|
|
@ -14,9 +14,24 @@
|
|||
#{{ torrent.locales.id }}
|
||||
{% endif %}
|
||||
{{ 'for torrent' | trans }}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% if session.user.moderator or session.user.owner %}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% if torrent.approved == false %}
|
||||
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if torrent.approved == false %}
|
||||
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
|
||||
{% elseif torrent.sensitive == true %}
|
||||
#{{ torrent.id }} ({{ 'sensitive' | trans }})
|
||||
{% else %}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="column width-20 text-right">
|
||||
{{ added | format_ago }}
|
||||
|
|
|
|||
|
|
@ -12,9 +12,24 @@
|
|||
#{{ torrent.locales.id }}
|
||||
{% endif %}
|
||||
{{ 'for torrent' | trans }}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% if session.user.moderator or session.user.owner %}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% if torrent.approved == false %}
|
||||
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if torrent.approved == false %}
|
||||
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
|
||||
{% elseif torrent.sensitive == true %}
|
||||
#{{ torrent.id }} ({{ 'sensitive' | trans }})
|
||||
{% else %}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="column width-20 text-right">
|
||||
{{ added | format_ago }}
|
||||
|
|
|
|||
|
|
@ -12,9 +12,24 @@
|
|||
#{{ torrent.sensitive.id }}
|
||||
{% endif %}
|
||||
{{ 'for torrent' | trans }}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% if session.user.moderator or session.user.owner %}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% if torrent.approved == false %}
|
||||
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if torrent.approved == false %}
|
||||
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
|
||||
{% elseif torrent.sensitive == true %}
|
||||
#{{ torrent.id }} ({{ 'sensitive' | trans }})
|
||||
{% else %}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="column width-20 text-right">
|
||||
{{ added | format_ago }}
|
||||
|
|
|
|||
|
|
@ -12,9 +12,24 @@
|
|||
#{{ torrent.sensitive.id }}
|
||||
{% endif %}
|
||||
{{ 'for torrent' | trans }}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% if session.user.moderator or session.user.owner %}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% if torrent.approved == false %}
|
||||
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if torrent.approved == false %}
|
||||
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
|
||||
{% elseif torrent.sensitive == true %}
|
||||
#{{ torrent.id }} ({{ 'sensitive' | trans }})
|
||||
{% else %}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="column width-20 text-right">
|
||||
{{ added | format_ago }}
|
||||
|
|
|
|||
|
|
@ -12,9 +12,24 @@
|
|||
#{{ torrent.sensitive.id }}
|
||||
{% endif %}
|
||||
{{ 'for torrent' | trans }}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% if session.user.moderator or session.user.owner %}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% if torrent.approved == false %}
|
||||
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if torrent.approved == false %}
|
||||
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
|
||||
{% elseif torrent.sensitive == true %}
|
||||
#{{ torrent.id }} ({{ 'sensitive' | trans }})
|
||||
{% else %}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="column width-20 text-right">
|
||||
{{ added | format_ago }}
|
||||
|
|
|
|||
|
|
@ -12,9 +12,24 @@
|
|||
#{{ torrent.sensitive.id }}
|
||||
{% endif %}
|
||||
{{ 'for torrent' | trans }}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% if session.user.moderator or session.user.owner %}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% if torrent.approved == false %}
|
||||
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if torrent.approved == false %}
|
||||
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
|
||||
{% elseif torrent.sensitive == true %}
|
||||
#{{ torrent.id }} ({{ 'sensitive' | trans }})
|
||||
{% else %}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="column width-20 text-right">
|
||||
{{ added | format_ago }}
|
||||
|
|
|
|||
|
|
@ -6,9 +6,24 @@
|
|||
<span class="margin-l-4-px">
|
||||
{{ 'added star for torrent' | trans }}
|
||||
</span>
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% if session.user.moderator or session.user.owner %}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% if torrent.approved == false %}
|
||||
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if torrent.approved == false %}
|
||||
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
|
||||
{% elseif torrent.sensitive == true %}
|
||||
#{{ torrent.id }} ({{ 'sensitive' | trans }})
|
||||
{% else %}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="column width-20 text-right">
|
||||
{{ added | format_ago }}
|
||||
|
|
|
|||
|
|
@ -7,9 +7,24 @@
|
|||
<span class="margin-l-4-px">
|
||||
{{ 'removed star from torrent' | trans }}
|
||||
</span>
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% if session.user.moderator or session.user.owner %}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% if torrent.approved == false %}
|
||||
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if torrent.approved == false %}
|
||||
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
|
||||
{% elseif torrent.sensitive == true %}
|
||||
#{{ torrent.id }} ({{ 'sensitive' | trans }})
|
||||
{% else %}
|
||||
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
|
||||
{{ torrent.name }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="column width-20 text-right">
|
||||
{{ added | format_ago }}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<div class="padding-16-px margin-y-8-px border-radius-3-px background-color-night">
|
||||
{{ render(controller(
|
||||
'App\\Controller\\ActivityController::event',
|
||||
{ activity : activity }
|
||||
{ user : session.user, activity : activity }
|
||||
)) }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue