phpcomposeryggdrasiljs-lessbittorrentsymfonysphinxalt-webwikidistributedsocial-networkcatalogtorrentmagnetfederatedsqlitetracker
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
222 lines
11 KiB
222 lines
11 KiB
{% macro recursive_file_tree(tree) %} |
|
{% import _self as self %} |
|
{% for key, value in tree %} |
|
{% if value is iterable %} |
|
<div class="padding-l-8-px cursor-default"> |
|
<div class="padding-y-4-px"> |
|
{{ key }} |
|
</div> |
|
{{ self.recursive_file_tree(value) }} |
|
</div> |
|
{% else %} |
|
<div class="padding-y-4-px padding-l-8-px background-color-hover-night-light cursor-default"> |
|
{{ key }} |
|
<div class="float-right padding-x-8-px"> |
|
{{ value | format_bytes }} |
|
</div> |
|
</div> |
|
{% endif %} |
|
{% endfor %} |
|
{% endmacro %} |
|
{% from _self import recursive_file_tree %} |
|
{% extends 'default/layout.html.twig' %} |
|
{% block title %}{% if file.name %}{{ file.name }} - {% endif %}{{ 'Torrent'|trans }} #{{ torrent.id }} - {{ name }}{% endblock %} |
|
{% block main_content %} |
|
<div class="padding-24-px margin-y-8-px border-radius-3-px background-color-night"> |
|
<div class="padding-b-16-px"> |
|
<h1> |
|
{{ 'Torrent'|trans }} #{{ torrent.id }} |
|
</h1> |
|
<a class="float-right margin-l-8-px" href="#" title="{{ 'Bookmark'|trans }}"> |
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> |
|
<path d="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z"/> |
|
</svg> |
|
</a> |
|
{# |
|
<a class="float-right margin-l-8-px" href="#" title="{{ 'Torrent'|trans }}"> |
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> |
|
<path fill-rule="evenodd" d="M1 8a7 7 0 1 0 14 0A7 7 0 0 0 1 8zm15 0A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.5 4.5a.5.5 0 0 0-1 0v5.793L5.354 8.146a.5.5 0 1 0-.708.708l3 3a.5.5 0 0 0 .708 0l3-3a.5.5 0 0 0-.708-.708L8.5 10.293V4.5z"/> |
|
</svg> |
|
</a> |
|
<a class="float-right margin-l-8-px" href="#" title="{{ 'Magnet'|trans }}"> |
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16"> |
|
<path d="M8 1a7 7 0 0 0-7 7v3h4V8a3 3 0 0 1 6 0v3h4V8a7 7 0 0 0-7-7Zm7 11h-4v3h4v-3ZM5 12H1v3h4v-3ZM0 8a8 8 0 1 1 16 0v8h-6V8a2 2 0 1 0-4 0v8H0V8Z"/> |
|
</svg> |
|
</a> |
|
#} |
|
</div> |
|
<div class="padding-y-8-px border-bottom-default text-right"> |
|
{{ 'Common'|trans }} |
|
</div> |
|
<div class="padding-y-16-px"> |
|
<table class="width-100"> |
|
<tbody> |
|
{% if file.name %} |
|
<tr> |
|
<td> |
|
{{ 'Filename'|trans }} |
|
</td> |
|
<td> |
|
{{ file.name }} |
|
</td> |
|
</tr> |
|
{% endif %} |
|
{% if file.created %} |
|
<tr> |
|
<td> |
|
{{ 'Created'|trans }} |
|
</td> |
|
<td> |
|
{{ file.created | format_date }} |
|
</td> |
|
</tr> |
|
{% endif %} |
|
|
|
{% if file.size %} |
|
<tr> |
|
<td> |
|
{{ 'Size'|trans }} |
|
</td> |
|
<td> |
|
{{ file.size | format_bytes }} |
|
</td> |
|
</tr> |
|
{% endif %} |
|
{% if file.pieces %} |
|
<tr> |
|
<td> |
|
{{ 'Pieces'|trans }} |
|
</td> |
|
<td> |
|
{{ file.pieces | format_number }} |
|
</td> |
|
</tr> |
|
{% endif %} |
|
{% if file.hash.v1 %} |
|
<tr> |
|
<td> |
|
{{ 'Info hash v1'|trans }} |
|
</td> |
|
<td> |
|
{{ file.hash.v1 }} |
|
</td> |
|
</tr> |
|
{% endif %} |
|
{% if file.hash.v2 %} |
|
<tr> |
|
<td> |
|
{{ 'Info hash v2'|trans }} |
|
</td> |
|
<td> |
|
{{ file.hash.v2 }} |
|
</td> |
|
</tr> |
|
{% endif %} |
|
{% if file.source %} |
|
<tr> |
|
<td> |
|
{{ 'Source'|trans }} |
|
</td> |
|
<td> |
|
{{ file.source }} |
|
</td> |
|
</tr> |
|
{% endif %} |
|
{% if file.software %} |
|
<tr> |
|
<td> |
|
{{ 'Software'|trans }} |
|
</td> |
|
<td> |
|
{{ file.software }} |
|
</td> |
|
</tr> |
|
{% endif %} |
|
{% if file.comment %} |
|
<tr> |
|
<td> |
|
{{ 'Comment'|trans }} |
|
</td> |
|
<td> |
|
{{ file.comment }} |
|
</td> |
|
</tr> |
|
{% endif %} |
|
</tbody> |
|
</table> |
|
</div> |
|
<div class="padding-y-8-px border-bottom-default text-right"> |
|
{{ 'Files'|trans }} |
|
</div> |
|
<div class="padding-y-16-px"> |
|
{% for tree in file.tree %} |
|
{{ recursive_file_tree(tree) }} |
|
{% endfor %} |
|
</div> |
|
<div class="padding-y-8-px border-bottom-default text-right"> |
|
{{ 'Trackers'|trans }} |
|
</div> |
|
<div class="padding-y-16-px"> |
|
{% for tracker in trackers %} |
|
<div class="padding-y-4-px"> |
|
{{ tracker }} |
|
</div> |
|
{% endfor %} |
|
{% for announces in trackers %} |
|
{% for tracker in announces %} |
|
<div class="padding-y-4-px"> |
|
{% if tracker not in trackers %} |
|
{{ tracker }} |
|
<span class="float-right" title="{{ 'Blocked'|trans }}"> |
|
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" fill="currentColor" viewBox="0 0 16 16"> |
|
<path d="M1.5 1.5A.5.5 0 0 1 2 1h12a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.128.334L10 8.692V13.5a.5.5 0 0 1-.342.474l-3 1A.5.5 0 0 1 6 14.5V8.692L1.628 3.834A.5.5 0 0 1 1.5 3.5v-2z"/> |
|
</svg> |
|
</span> |
|
{% endif %} |
|
</div> |
|
{% endfor %} |
|
{% endfor %} |
|
</div> |
|
<div class="padding-y-8-px text-right"> |
|
<a class="margin-r-4-px opacity-0 parent-hover-opacity-09" href="{{ path('torrent_edit_locales', { torrentId : torrent.id }) }}" title="{{'Edit'|trans }}"> |
|
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" fill="currentColor" viewBox="0 0 16 16"> |
|
<path d="M12.854.146a.5.5 0 0 0-.707 0L10.5 1.793 14.207 5.5l1.647-1.646a.5.5 0 0 0 0-.708l-3-3zm.646 6.061L9.793 2.5 3.293 9H3.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.207l6.5-6.5zm-7.468 7.468A.5.5 0 0 1 6 13.5V13h-.5a.5.5 0 0 1-.5-.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.5-.5V10h-.5a.499.499 0 0 1-.175-.032l-.179.178a.5.5 0 0 0-.11.168l-2 5a.5.5 0 0 0 .65.65l5-2a.5.5 0 0 0 .168-.11l.178-.178z"/> |
|
</svg> |
|
</a> |
|
{{ 'Locales'|trans }} |
|
<div class="padding-b-8-px border-bottom-default"></div> |
|
<div class="padding-y-16-px text-left"> |
|
{% if torrent.locales %} |
|
<div class="padding-y-4-px"> |
|
{% for i, locale in torrent.locales.value %}{% if i > 0 %},{% endif %} {{ locale|locale_name(locale)|u.title }}{% endfor %} |
|
</div> |
|
{% endif %} |
|
</div> |
|
</div> |
|
<div class="padding-y-8-px text-right"> |
|
<a class="margin-r-4-px opacity-0 parent-hover-opacity-09" href="{{ path('torrent_edit_locales', { torrentId : torrent.id }) }}" title="{{'Edit'|trans }}"> |
|
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" fill="currentColor" viewBox="0 0 16 16"> |
|
<path d="M12.854.146a.5.5 0 0 0-.707 0L10.5 1.793 14.207 5.5l1.647-1.646a.5.5 0 0 0 0-.708l-3-3zm.646 6.061L9.793 2.5 3.293 9H3.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.207l6.5-6.5zm-7.468 7.468A.5.5 0 0 1 6 13.5V13h-.5a.5.5 0 0 1-.5-.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.5-.5V10h-.5a.499.499 0 0 1-.175-.032l-.179.178a.5.5 0 0 0-.11.168l-2 5a.5.5 0 0 0 .65.65l5-2a.5.5 0 0 0 .168-.11l.178-.178z"/> |
|
</svg> |
|
</a> |
|
{{ 'Pages'|trans }} |
|
<div class="padding-b-8-px border-bottom-default"></div> |
|
<div class="padding-y-16-px text-left"> |
|
{% for page in torrent.pages %} |
|
<div> |
|
{{ page }} |
|
</div> |
|
{% endfor %} |
|
<form name="pages" method="post" action="{{ path('page_submit') }}"> |
|
<input type="hidden" name="torrentId" value="{{ torrent.id }}" /> |
|
<button type="submit" class="button-green"> |
|
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" fill="currentColor" viewBox="0 0 16 16"> |
|
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.5 4.5a.5.5 0 0 0-1 0v3h-3a.5.5 0 0 0 0 1h3v3a.5.5 0 0 0 1 0v-3h3a.5.5 0 0 0 0-1h-3v-3z"/> |
|
</svg> |
|
{{'Add'|trans }} |
|
</button> |
|
</form> |
|
</div> |
|
</div> |
|
</div> |
|
{% endblock %} |