<commit_before>{% extends "teams/base.html" %}

{% load i18n utils_tags query_string teams_tags paginator profiles_tags markup media_compressor %}

{% block title %}
    {{ team }} | Universal Subtitles
{% endblock %}

{% block css %}
    {{ block.super }}
    {% include_bundle "widget-css"%}
{% endblock %}

{% block scripts %}
    {{ block.super }}

    {% include "utils/chosenify.html" %}

    {% include_bundle "unisubs-onsite-compiled" %}

    <script src="{% url teams:rpc_api %}" type="text/javascript"></script>
    <script src="{{ STATIC_URL }}js/unisubs.filters.js" type="text/javascript"></script>
    <script src="{{ STATIC_URL }}js/unisubs.modal.js" type="text/javascript"></script>

    <script type="text/javascript">
        var GLOBAL_WIDGET_SETTINGS = {{ general_settings|safe }};

        $(function() {
            $form = $('form', 'div#remove-modal');
            $('a.remove-video').click(function() {
                $form.attr('action', $(this).siblings('form').attr('action'));
            });

            $form.submit(function() {
                var $checked = $('input[name="del-opt"]:checked', 'div#remove-modal');
                if ($checked.val() == 'total-destruction') {
                    $form.attr('action', $form.attr('action').replace('remove', 'delete'));

                    if (confirm("Are you sure you want to permanently delete this video? This action is irreversible.")) {
                        return true;
                    }
                    else {
                        return false;
                    }
                } else {
                    if (confirm("All open tasks for this video will be aborted, and in-progress subtitles will be published. Do you want to proceed?")) {
                        return true;
                    }
                    else {
                        return false;
                    }
                }
            });

            {% if request.GET.lang %}
                $select = $('select#lang-filter');
                $opt = $('option[id="lang-opt-{{ request.GET.lang }}"]');
                $select.children().removeAttr('selected');
                $opt.attr('selected', 'selected');
                $select.trigger('liszt:updated');
            {% endif %}
        });
    </script>
{% endblock %}

{% block select_language_dialog %}
    {% select_language_dialog %}
{% endblock %}

{% block view_content %}

    <div class="grid_8 view omega">
        {% with "videos" as current %}
            {% if not project %}
                {% include 'teams/_tabs.html' %}
            {% else %}
                {% include 'teams/_tabs_projects.html' %}
            {% endif %}
        {% endwith %}

        <div class="tools group">
            {% include "teams/_search.html" %}
            {% if can_add_video %}
                <a href="{% url teams:add_video team.slug %}{% if project %}?project={{ project.pk }}{% endif %}" class="button">{% trans "Add Video" %}</a>
            {% endif %}  
            <a href="#filter" id="sort-filter">
                {% trans 'Filter and Sort' %}
                <span></span>
            </a>
        </div>
        <div class="filters group {% if filtered or request.GET.sort %}active{% endif %}">
            <p>
                <div class="filter-chunk">
                    <span class="inner">{% trans 'Videos with subtitles in' %}</span>
                    <select name="lang-filter" id="lang-filter">
                        <option value="{{ request.path }}{% query_string request.GET lang='' page='' %}">{% trans 'all languages' %}</option>
                        {% for code, name in language_choices %}
                            <option id="lang-opt-{{ code }}" {% if request.GET.lang == code %}selected="selected"{% endif %} value="{% query_string request.GET lang=code page='' %}">{{ name }}</option>
                        {% endfor %}
                    </select>
                </div>
                <div class="filter-chunk">
                    <span class="inner">{% trans 'sorted by' %}</span>
                    <select name="sort">
                        <option {% if request.GET.sort == 'name' %}selected="selected"{% endif %} value="{% query_string request.GET sort='name' page='' %}">
                            {% trans 'name, a-z' %}
                        </option>
                        <option {% if request.GET.sort == '-name' %}selected="selected"{% endif %} value="{% query_string request.GET sort='-name' page='' %}">
                            {% trans 'name, z-a' %}
                        </option>
                        <option {% if request.GET.sort == '-time' or not request.GET.sort %}selected="selected"{% endif %} value="{% query_string request.GET sort='-time' page='' %}">
                            {% trans 'time, newest' %}
                        </option>
                        <option {% if request.GET.sort == 'time' %}selected="selected"{% endif %} value="{% query_string request.GET sort='time' page='' %}">
                            {% trans 'time, oldest' %}
                        </option>
                        <option {% if request.GET.sort == '-subs' %}selected="selected"{% endif %} value="{% query_string request.GET sort='-subs' page='' %}">
                            {% trans 'subtitles, most' %}
                        </option>
                        <option {% if request.GET.sort == 'subs' %}selected="selected"{% endif %} value="{% query_string request.GET sort='subs' page='' %}">
                            {% trans 'subtitles, least' %}
                        </option>
                    </select>
                </div>
            </p>
            {% if filtered or request.GET.sort %}
                <a href="{% url teams:detail team.slug %}" class="clear-filters">{% trans 'Clear' %}</a>
            {% endif %}
        </div><commit_msg>Adjust wording of inline filters on videos list.<commit_after>{% extends "teams/base.html" %}

{% load i18n utils_tags query_string teams_tags paginator profiles_tags markup media_compressor %}

{% block title %}
    {{ team }} | Universal Subtitles
{% endblock %}

{% block css %}
    {{ block.super }}
    {% include_bundle "widget-css"%}
{% endblock %}

{% block scripts %}
    {{ block.super }}

    {% include "utils/chosenify.html" %}

    {% include_bundle "unisubs-onsite-compiled" %}

    <script src="{% url teams:rpc_api %}" type="text/javascript"></script>
    <script src="{{ STATIC_URL }}js/unisubs.filters.js" type="text/javascript"></script>
    <script src="{{ STATIC_URL }}js/unisubs.modal.js" type="text/javascript"></script>

    <script type="text/javascript">
        var GLOBAL_WIDGET_SETTINGS = {{ general_settings|safe }};

        $(function() {
            $form = $('form', 'div#remove-modal');
            $('a.remove-video').click(function() {
                $form.attr('action', $(this).siblings('form').attr('action'));
            });

            $form.submit(function() {
                var $checked = $('input[name="del-opt"]:checked', 'div#remove-modal');
                if ($checked.val() == 'total-destruction') {
                    $form.attr('action', $form.attr('action').replace('remove', 'delete'));

                    if (confirm("Are you sure you want to permanently delete this video? This action is irreversible.")) {
                        return true;
                    }
                    else {
                        return false;
                    }
                } else {
                    if (confirm("All open tasks for this video will be aborted, and in-progress subtitles will be published. Do you want to proceed?")) {
                        return true;
                    }
                    else {
                        return false;
                    }
                }
            });

            {% if request.GET.lang %}
                $select = $('select#lang-filter');
                $opt = $('option[id="lang-opt-{{ request.GET.lang }}"]');
                $select.children().removeAttr('selected');
                $opt.attr('selected', 'selected');
                $select.trigger('liszt:updated');
            {% endif %}
        });
    </script>
{% endblock %}

{% block select_language_dialog %}
    {% select_language_dialog %}
{% endblock %}

{% block view_content %}

    <div class="grid_8 view omega">
        {% with "videos" as current %}
            {% if not project %}
                {% include 'teams/_tabs.html' %}
            {% else %}
                {% include 'teams/_tabs_projects.html' %}
            {% endif %}
        {% endwith %}

        <div class="tools group">
            {% include "teams/_search.html" %}
            {% if can_add_video %}
                <a href="{% url teams:add_video team.slug %}{% if project %}?project={{ project.pk }}{% endif %}" class="button">{% trans "Add Video" %}</a>
            {% endif %}  
            <a href="#filter" id="sort-filter">
                {% trans 'Filter and Sort' %}
                <span></span>
            </a>
        </div>
        <div class="filters group {% if filtered or request.GET.sort %}active{% endif %}">
            <p>
                <div class="filter-chunk">
                    <span class="inner">{% trans 'Videos with' %}</span>
                    <select name="lang-filter" id="lang-filter">
                        <option value="{{ request.path }}{% query_string request.GET lang='' page='' %}">{% trans 'any' %}</option>
                        {% for code, name in language_choices %}
                            <option id="lang-opt-{{ code }}" {% if request.GET.lang == code %}selected="selected"{% endif %} value="{% query_string request.GET lang=code page='' %}">{{ name }}</option>
                        {% endfor %}
                    </select>
                    <span>{% trans 'subtitles' %}</span>
                </div>
                <div class="filter-chunk">
                    <span class="inner">{% trans 'sorted by' %}</span>
                    <select name="sort">
                        <option {% if request.GET.sort == 'name' %}selected="selected"{% endif %} value="{% query_string request.GET sort='name' page='' %}">
                            {% trans 'name, a-z' %}
                        </option>
                        <option {% if request.GET.sort == '-name' %}selected="selected"{% endif %} value="{% query_string request.GET sort='-name' page='' %}">
                            {% trans 'name, z-a' %}
                        </option>
                        <option {% if request.GET.sort == '-time' or not request.GET.sort %}selected="selected"{% endif %} value="{% query_string request.GET sort='-time' page='' %}">
                            {% trans 'time, newest' %}
                        </option>
                        <option {% if request.GET.sort == 'time' %}selected="selected"{% endif %} value="{% query_string request.GET sort='time' page='' %}">
                            {% trans 'time, oldest' %}
                        </option>
                        <option {% if request.GET.sort == '-subs' %}selected="selected"{% endif %} value="{% query_string request.GET sort='-subs' page='' %}">
                            {% trans 'most subtitles' %}
                        </option>
                        <option {% if request.GET.sort == 'subs' %}selected="selected"{% endif %} value="{% query_string request.GET sort='subs' page='' %}">
                            {% trans 'least subtitles' %}
                        </option>
                    </select>
                </div>
            </p>
            {% if filtered or request.GET.sort %}
                <a href="{% url teams:detail team.slug %}" class="clear-filters">{% trans 'Clear' %}</a>
            {% endif %}
        </div>
{'fraction_non_alphanumeric': 0.16749348356175903, 'fraction_numerical': 0.0005044984444631295, 'mean_word_length': 1.5918500762693397, 'pattern_counts': {'":': 0, '<': 107, '<?xml version=': 0, '>': 107, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5374244', 'n_tokens_mistral': 3457, 'n_tokens_neox': 3023, 'n_words': 737}