-
+
YGG tracker
+ {#32
{{ '
Upload any torrent - download with Yggdrasil' | trans | format(path('torrent_submit')) | raw }}
+ #}
{% block header_search %}
{{ render(controller(
'App\\Controller\\SearchController::module',
{
- query : app.request.get('query'),
- type : app.request.get('type')
+ request: app.request
}
)) }}
{% endblock %}
diff --git a/templates/default/search/module.html.twig b/templates/default/search/module.html.twig
index 6677ce5..8b1b99b 100644
--- a/templates/default/search/module.html.twig
+++ b/templates/default/search/module.html.twig
@@ -1,4 +1,69 @@
\ No newline at end of file
diff --git a/templates/default/torrent/edit/categories.html.twig b/templates/default/torrent/edit/categories.html.twig
new file mode 100644
index 0000000..417828d
--- /dev/null
+++ b/templates/default/torrent/edit/categories.html.twig
@@ -0,0 +1,109 @@
+{% extends 'default/layout.html.twig' %}
+{% block title %}{{'Edit categories'|trans }} - {{'Torrent'|trans }} #{{ torrentId }} - {{ name }}{% endblock %}
+{% block main_content %}
+
+ {% for edition in editions %}
+
+ {% if edition.active %}
+ {{ edition.added | format_ago }}
+ {% else %}
+
+ {{ edition.added | format_ago }}
+
+ {% endif %}
+ {{ 'by'|trans }}
+
+
+
+
+ {% if session.moderator or session.owner %}
+
+
+
+
+
+
+ {% endif %}
+ {% if edition.approved %}
+ {% if session.moderator %}
+
+
+
+
+
+ {% else %}
+
+
+
+
+
+ {% endif %}
+ {% else %}
+ {% if session.moderator %}
+
+
+
+
+
+ {% else %}
+
+
+
+
+
+ {% endif %}
+ {% endif %}
+
+
+ {% endfor %}
+{% endblock %}
diff --git a/templates/default/torrent/edit/locales.html.twig b/templates/default/torrent/edit/locales.html.twig
index 1245721..dcab8db 100644
--- a/templates/default/torrent/edit/locales.html.twig
+++ b/templates/default/torrent/edit/locales.html.twig
@@ -24,7 +24,7 @@
- {% for locale in locales %}
+ {% for locale in locales | sort %}
{% if locale in form.locales.attribute.value %}
diff --git a/templates/default/torrent/edit/poster.html.twig b/templates/default/torrent/edit/poster.html.twig
new file mode 100644
index 0000000..e4ed5e9
--- /dev/null
+++ b/templates/default/torrent/edit/poster.html.twig
@@ -0,0 +1,121 @@
+{% extends 'default/layout.html.twig' %}
+{% block title %}{{ 'Edit torrent poster' | trans }} - {{ 'Torrent' | trans }} #{{ torrentId }} - {{ name }}{% endblock %}
+{% block main_content %}
+
+ {% for edition in editions %}
+
+ {% if edition.active %}
+ {{ edition.added | format_ago }}
+ {% else %}
+
+ {{ edition.added | format_ago }}
+
+ {% endif %}
+ {{ 'by' | trans }}
+
+
+
+
+ {% if session.moderator or session.owner %}
+
+
+
+
+
+
+ {% endif %}
+ {% if edition.approved %}
+ {% if session.moderator %}
+
+
+
+
+
+ {% else %}
+
+
+
+
+
+ {% endif %}
+ {% else %}
+ {% if session.moderator %}
+
+
+
+
+
+ {% else %}
+
+
+
+
+
+ {% endif %}
+ {% endif %}
+
+ {% if edition.active %}
+
+ {% endif %}
+
+ {% endfor %}
+{% endblock %}
diff --git a/templates/default/torrent/info.html.twig b/templates/default/torrent/info.html.twig
index f59c5a4..dda2a72 100644
--- a/templates/default/torrent/info.html.twig
+++ b/templates/default/torrent/info.html.twig
@@ -2,16 +2,18 @@
{% import _self as self %}
{% for key, value in tree %}
{% if value is iterable %}
-
-
- {{ key }}
-
+
+ {{ key }}
+
+
{{ self.recursive_file_tree(value) }}
{% else %}
-
- {{ key }}
-
+
+
+ {{ key }}
+
+
{{ value | format_bytes }}
@@ -27,7 +29,8 @@
{% endif %}
{% endblock %}
{% block main_content %}
-
+
{{ file.name }}
{#{{ 'Torrent' | trans }} #{{ torrent.id }}#}
@@ -78,7 +81,7 @@
- {% if session.moderator %}
+ {% if session.moderator or session.owner %}
@@ -88,19 +91,19 @@
- {{ 'Approved' | trans }}
+ {{ 'Enabled' | trans }}
- {% if torrent.approved %}
+ {% if torrent.status %}
{{ 'Yes' | trans }}
-
+
{% else %}
{{ 'No' | trans }}
-
+
@@ -108,6 +111,30 @@
{% endif %}
+ {% if session.moderator %}
+
+
+ {{ 'Approved' | trans }}
+
+
+ {% if torrent.approved %}
+ {{ 'Yes' | trans }}
+
+
+
+
+
+ {% else %}
+ {{ 'No' | trans }}
+
+
+
+
+
+ {% endif %}
+
+
+ {% endif %}
{% endif %}
@@ -193,13 +220,26 @@
{% endif %}
+
+
+ {{ 'Private' | trans }}
+
+
+ {% if file.private %}
+ {{ 'Yes' | trans }}
+ {% else %}
+ {{ 'No' | trans }}
+ {% endif %}
+
+
{% if file.source %}
{{ 'Source' | trans }}
- {{ file.source }}
+ {# strip all tags then apply whitelist markdown filters to prevent ping from remote #}
+ {{ file.source | trim | striptags | url_to_markdown | markdown_to_html | nl2br }}
{% endif %}
@@ -209,7 +249,8 @@
{{ 'Software' | trans }}
- {{ file.software }}
+ {# strip all tags then apply whitelist markdown filters to prevent ping from remote #}
+ {{ file.software | trim | striptags | url_to_markdown | markdown_to_html | nl2br }}
{% endif %}
@@ -219,7 +260,8 @@
{{ 'Comment' | trans }}
- {{ file.comment }}
+ {# strip all tags then apply whitelist markdown filters to prevent ping from remote #}
+ {{ file.comment | trim | striptags | url_to_markdown | markdown_to_html | nl2br }}
{% endif %}
@@ -290,7 +332,7 @@
{% for tracker, status in trackers %}
-
+
{% if status %}
{{ tracker }}
{% else %}
@@ -307,23 +349,41 @@
{% endfor %}
-
+
- {{ 'Locales' | trans }}
+ {{ 'Locale' | trans }}
{% if torrent.locales %}
- {% for i, locale in torrent.locales %}{% if i > 0 %},{% endif %} {{ locale|locale_name(locale)|u.title }}{% endfor %}
+ {% set i = 0 %}
+ {% for locale in torrent.locales | sort %}{% if i > 0 %},{% endif %} {{ locale | locale_name(locale) | u.title }}{% set i = i + 1 %}{% endfor %}
{% endif %}
-
+
+
+
+
+
+ {{ 'Category' | trans }}
+
+
+ {% if torrent.categories %}
+
+ {% set i = 0 %}
+ {% for category in torrent.categories | sort %}{% if i > 0 %},{% endif %} {{ category | trans_category | u.title }}{% set i = i + 1 %}{% endfor %}
+
+ {% endif %}
+
+
+
+
+
+
+
+
+
+ {{ 'Poster' | trans }}
+
+
+ {% if torrent.poster %}
+ {{ 'Yes' | trans }}
+ {% else %}
+ {{ 'No' | trans }}
+ {% endif %}
+
+
diff --git a/templates/default/torrent/list.html.twig b/templates/default/torrent/list.html.twig
index b16b13a..93e27d1 100644
--- a/templates/default/torrent/list.html.twig
+++ b/templates/default/torrent/list.html.twig
@@ -5,11 +5,33 @@
{% if query %}
{{ 'Search results' | trans }}
-
-
-
-
-
+ {% if app.request.get('filter') %}
+
+
+
+
+
+
+
+
+
+
+ {% else %}
+
+
+
+
+
+
+
+
+
+
+ {% endif %}
{% else %}
{{ 'Recent uploads' | trans }}
@@ -24,7 +46,8 @@
{% if torrents %}
{% for torrent in torrents %}
-
+
@@ -34,11 +57,20 @@
{% if torrent.scrape.leechers > 0 and torrent.scrape.seeders == 0 %}
+ class="label label-green font-size-10-px position-relative display-inline-block"
+ title="{{ 'Active leechers waiting for seeders' | trans }}"
+ rel="nofollow">
{{ 'wanted' | trans }}
{% endif %}
+ {% if torrent.status == false %}
+
+
+
+
+
+
+ {% endif %}
{% if torrent.approved == false %}
@@ -47,7 +79,7 @@
{% endif %}
{% if torrent.sensitive == true %}
-
+
@@ -71,22 +103,17 @@
{% if torrent.keywords %}
{% for keyword, quantity in torrent.keywords %}
-
+
#{{ keyword }}
{% endfor %}
{% endif %}
- {#
-
- {{ torrent.added | format_ago }}
- {{ 'by' | trans }}
-
-
-
-
- #}
{{ torrent.file.size | format_bytes }}
@@ -169,17 +196,31 @@
{% if query %}
{% if pagination.page > 1 %}
{% if pagination.page == 2 %}
-
+
{{ 'Back' | trans | lower }}
{% else %}
-
+
{{ 'Back' | trans | lower }}
{% endif %}
{% endif %}
{% if pagination.page < pagination.pages %}
-
+
{{ 'Next' | trans | lower }}
{% endif %}
diff --git a/templates/default/torrent/submit.html.twig b/templates/default/torrent/submit.html.twig
index 27f6a14..c36da9a 100644
--- a/templates/default/torrent/submit.html.twig
+++ b/templates/default/torrent/submit.html.twig
@@ -31,7 +31,7 @@
{% endfor %}
- {% for locale in locales %}
+ {% for locale in locales | sort %}
{% if locale in form.locales.attribute.value %}
@@ -48,9 +48,42 @@
#}
+
+
+
+ {{'Content category' | trans }}
+
+
+
+
+
+
+ {% for error in form.categories.error %}
+
+ {{ error }}
+
+ {% endfor %}
+
+ {% for category in categories | sort %}
+
+ {% if category in form.categories.attribute.value %}
+
+ {% else %}
+
+ {% endif %}
+
+ {{ category | trans_category | u.title }}
+
+
+ {% endfor %}
+ {#
+ {{'Other...'|trans }}
+ #}
+
+
-
+
{{'Sensitive'|trans }}
diff --git a/templates/default/user/info.html.twig b/templates/default/user/info.html.twig
index a3632ab..a22da9e 100644
--- a/templates/default/user/info.html.twig
+++ b/templates/default/user/info.html.twig
@@ -172,7 +172,29 @@
{{ 'Languages' | trans }}
- {% for i, locale in user.locales %}{% if i > 0 %},{% endif %} {{ locale|locale_name(locale)|u.title }}{% endfor %}
+ {% set i = 0 %}
+ {% for locale in user.locales | sort %}{% if i > 0 %},{% endif %} {{ locale | locale_name(locale) | u.title }}{% set i = i + 1 %}{% endfor %}
+
+
+
+
+ {{ 'Categories' | trans }}
+
+
+ {% set i = 0 %}
+ {% for category in user.categories | sort %}{% if i > 0 %},{% endif %} {{ category | trans_category | u.title }}{% set i = i + 1 %}{% endfor %}
+
+
+
+
+ {{ 'Posters' | trans }}
+
+
+ {% if user.posters %}
+ {{ 'Yes' | trans }}
+ {% else %}
+ {{ 'No' | trans }}
+ {% endif %}
diff --git a/templates/default/user/settings.html.twig b/templates/default/user/settings.html.twig
index 606b3fb..49fcbed 100644
--- a/templates/default/user/settings.html.twig
+++ b/templates/default/user/settings.html.twig
@@ -58,6 +58,23 @@
+
+
+ {{ 'Posters' | trans }}
+
+
+
+ {% if user.posters %}
+
+ {% else %}
+
+ {% endif %}
+
+ {{ 'Enabled' | trans }}
+
+
+
+
{{ 'Search' | trans }}
@@ -65,34 +82,60 @@
- {{ 'Content' | trans }}
+
+ {{ 'Locales' | trans }}
+
-
- {% for locale in locales %}
-
-
+
+
+ {{ 'Categories' | trans }}
+
+
+
+ {% for category in categories | sort %}
+
+ {% if category in user.categories %}
+
+ {% else %}
+
+ {% endif %}
+
+ {{ category | trans_category | u.title }}
+
+
+ {% endfor %}
+
+
+
+
{{ 'Sensitive' | trans }}
-
-
@@ -104,20 +147,22 @@
+ {% set i = 0 %}
{% for group, event in events %}
+ {% set i = i + 1 %}
-
+
{{ group }}
-
+
{% for key, value in event %}
-
+
{% if value in user.events %}
{% else %}
{% endif %}
-
+
{{ key }}
@@ -136,10 +181,13 @@
{% if user.yggdrasil %}
-
+
{% else %}
-
+
{% endif %}
+
+ {{ 'Enabled' | trans }}
+
diff --git a/translations/messages+intl-icu.cs.xlf b/translations/messages+intl-icu.cs.xlf
index 2340666..e661df7 100644
--- a/translations/messages+intl-icu.cs.xlf
+++ b/translations/messages+intl-icu.cs.xlf
@@ -169,10 +169,6 @@
Waiting for approve
Waiting for approve
-
- Content visible for non sensitive users only
- Content visible for non sensitive users only
-
Size
Size
@@ -397,10 +393,6 @@
Join translation
Join translation
-
- Content
- Content
-
Activity
Activity
@@ -729,6 +721,198 @@
Seeders wanted for torrent
Seeders wanted for torrent
+
+ Hide
+ Hide
+
+
+ have disabled torrent
+ have disabled torrent
+
+
+ have enabled torrent
+ have enabled torrent
+
+
+ disabled
+ disabled
+
+
+ Poster file out of size limit
+ Poster file out of size limit
+
+
+ Image file not supported
+ Image file not supported
+
+
+ Poster file required
+ Poster file required
+
+
+ Edit torrent poster
+ Edit torrent poster
+
+
+ Edit poster for torrent
+ Edit poster for torrent
+
+
+ Poster
+ Poster
+
+
+ Posters
+ Posters
+
+
+ have deleted poster edition
+ have deleted poster edition
+
+
+ have disapproved poster edition
+ have disapproved poster edition
+
+
+ have approved poster edition
+ have approved poster edition
+
+
+ have added poster edition
+ have added poster edition
+
+
+ Torrent posters
+ Torrent posters
+
+
+ Center
+ Center
+
+
+ Top
+ Top
+
+
+ Bottom
+ Bottom
+
+
+ Categories
+ Categories
+
+
+ At least one category required
+ At least one category required
+
+
+ Content category
+ Content category
+
+
+ This torrent have selected categories
+ This torrent have selected categories
+
+
+ Edit categories
+ Edit categories
+
+
+ Edit categories for torrent
+ Edit categories for torrent
+
+
+ Locale
+ Locale
+
+
+ Category
+ Category
+
+
+ Torrent categories
+ Torrent categories
+
+
+ have deleted categories edition
+ have deleted categories edition
+
+
+ have disapproved categories edition
+ have disapproved categories edition
+
+
+ have approved categories edition
+ have approved categories edition
+
+
+ have added categories edition
+ have added categories edition
+
+
+ movie
+ movie
+
+
+ series
+ series
+
+
+ tv
+ tv
+
+
+ animation
+ animation
+
+
+ music
+ music
+
+
+ game
+ game
+
+
+ audiobook
+ audiobook
+
+
+ podcast
+ podcast
+
+
+ book
+ book
+
+
+ archive
+ archive
+
+
+ picture
+ picture
+
+
+ software
+ software
+
+
+ other
+ other
+
+
+ Hide filter
+ Hide filter
+
+
+ Show filter
+ Show filter
+
+
+ Private
+ Private
+