init torrent categories feature #26

This commit is contained in:
ghost 2023-11-04 06:26:01 +02:00
parent 35babed517
commit 701b448cd6
18 changed files with 1113 additions and 77 deletions

View file

@ -31,7 +31,7 @@
</div>
{% endfor %}
</div>
{% for locale in locales %}
{% for locale in locales | sort %}
<div class="margin-t-8-px margin-b-4-px margin-r-8-px display-inline-block min-width-120-px">
{% if locale in form.locales.attribute.value %}
<input type="checkbox" name="locales[]" id="{{ locale }}" value="{{ locale }}" checked="checked" />
@ -48,9 +48,42 @@
#}
</div>
<div class="margin-b-16-px border-bottom-default"></div>
<div class="margin-y-16-px">
<div class="margin-b-8-px">
<label for="categories">
{{'Content category' | trans }}
</label>
<sub class="opacity-0 parent-hover-opacity-09" title="{{ 'This torrent have selected categories' | trans }}">
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" fill="currentColor" viewBox="0 0 16 16">
<path d="M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16zm.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"/>
</svg>
</sub>
{% for error in form.categories.error %}
<div class="text-color-red margin-y-8-px">
{{ error }}
</div>
{% endfor %}
</div>
{% for category in categories | sort %}
<div class="margin-t-8-px margin-b-4-px margin-r-8-px display-inline-block min-width-120-px">
{% if category in form.categories.attribute.value %}
<input type="checkbox" name="categories[]" id="{{ category }}" value="{{ category }}" checked="checked" />
{% else %}
<input type="checkbox" name="categories[]" id="{{ category }}" value="{{ category }}" />
{% endif %}
<label class="margin-l-4-px" for="{{ category }}">
{{ category | u.title }}
</label>
</div>
{% endfor %}
{#
{{'Other...'|trans }}
#}
</div>
<div class="margin-b-16-px border-bottom-default"></div>
<div>
<input type="checkbox" name="sensitive" id="sensitive" value="true" {% if form.sensitive.attribute.value %}checked="checked"{% endif %} />
<label for="sensitive">
<label class="margin-l-4-px" for="sensitive">
{{'Sensitive'|trans }}
</label>
<sub class="opacity-0 parent-hover-opacity-09" title="{{ 'Mark torrent content as sensitive' | trans }}">