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

{% load i18n teams_tags paginator widget media_compressor verbatim_templatetag %}

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

{% block body_attrs %}id="teams" class="v1"{% endblock %}

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

{% block scripts %}
    {% include "utils/chosenify.html" %}
    {{ block.super }}
    {% if assignable_roles %}
        {% include_bundle "js-teams-settings-panel" %}
    {% endif %}
    {% include_bundle "unisubs-onsite-compiled" %}
    <script src="{% url teams:rpc_api %}" type="text/javascript"></script>
    <script type="text/javascript">
        $(function() {
            $select = $("select#lang-filter", ".controls");
            $select.change(function(e) {
                var lang = $select.val();
                if (lang !== '') {
                    window.location = document.URL.split("?")[0] + '?lang=' + lang;
                } else {
                    window.location = document.URL.split("?")[0];
                }
            });
        });
    </script>
{% endblock %}

{% block view_content %}

    {% with "members" as current %}
        {% include "teams/_tabs.html" %}
    {% endwith %}

    {% if team.video %}
        {% widget widget_params %}
    {% endif %}

    <div class="view grid_9 alpha">

        {% if team|can_invite_to_team:user %}
            <div class="tools">
                <a href="{% url teams:invite_members slug=team.slug %}" class="button">Invite Members</a>
            </div>
        {% endif %}

        {% if team_member_list|length == 0 %}
            <p class="empty">{% trans "Sorry, no members found." %}</p>
        {% endif %}

        <ul class="members listing">
            {% for member in team_member_list %}
                {% with member.pk as mpk%}
                    <li>
                        <h3>
                            <a href="{{ member.user.get_absolute_url }}">
                                {{ member.user }}
                                {% if member.user == user %}(Me){% endif %}
                            </a>
                            {% for lang in member.user.get_languages %}
                                <span class="descriptor">{{ lang.get_language_display }}</span>
                            {% endfor %}
                        </h3>
                        <p>
                            {{ member.role|capfirst }}

                            {% member_projects member as member_project %}
                            {% if member_project %}
                                (
                                {% for project in member_project %}
                                    {{project.name}}{% if not forloop.last %},{% endif %}
                                {% endfor %}
                                )
                            {% endif %}
                        </p>
                        <a href="{{ member.user.get_absolute_url }}" class="thumb"><img src="{{ member.user.avatar }}" alt="{{ member.user }} avatar"></a>
                        <ul class="actions">
                            <li>
                                <a href="">Send a message</a>
                            </li>
                        </ul>
                        <ul class="admin-controls">
                            {% if member in assignable_roles %}
                                <li>
                                    <a class="edit-role" data-team-slug="{{team.slug}}" data-member-pk="{{member.pk}}" >Edit</a>
                                </li>
                            {% endif %}
                        </ul>
                    </li>
                {% endwith %}
            {% endfor %}
        </ul>
        {% if is_paginated %}{% paginator %}{% endif %}
    </div>

    <div class="controls grid_3 omega">
        {% include "teams/_filters_members.html" %}
        <div class="refine">
            <h4>Refine</h4>
            {% include "teams/_search.html" %}
            <select name="lang-filter" id="lang-filter">
                <option value="">All languages</option>
                {% for code, name in languages %}
                    <option value="{{ code }}">{{ name }}</option>
                {% endfor %}
            </select>
        </div>
        {% include "teams/_actions.html" %}
    </div>

    {% if assignable_roles %}
        <script id="editRoleDialog" type="text/html">
            {% verbatim %}
            <div class="bootstrap">
                <div class="modal">
                    <div class="modal-header">
                        <a href="#" class="close action-close">x</a>
                        <h3>Edit member role</h3>
                    </div>
                    <div class="modal-body">
                        <div class="field clearfix">
                            <label for="roles">Role:</label>
                            <select class="roles" id="roles">
                                {{#roles}}
                                    <option value="{{val}}">{{name}}</option>
                                {{/roles}}
                            </select>
                        </div>
                        <div class="field clearfix">
                            <label>Project Restriction:</label>
                            <select data-placeholder="Choose-selected..." style="width:350px;" multiple class="chzn-select projects">
                                {{#projects}}
                                    <option {{#selected}}selected="selected"{{/selected}} value="{{pk}}">{{name}}</option>
                                {{/projects}}
                            </select>
                        </div>
                        <div class="field clearfix">
                            <label>Language Restriction:</label>
                            <select data-placeholder="Choose-selected..." style="width:350px;"
                                multiple class="chzn-select langs">
                                {{#languages}}<commit_msg>Use 'None' when no languages or projects for member edit modal.<commit_after>{% extends "teams/base.html" %}

{% load i18n teams_tags paginator widget media_compressor verbatim_templatetag %}

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

{% block body_attrs %}id="teams" class="v1"{% endblock %}

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

{% block scripts %}
    {% include "utils/chosenify.html" %}
    {{ block.super }}
    {% if assignable_roles %}
        {% include_bundle "js-teams-settings-panel" %}
    {% endif %}
    {% include_bundle "unisubs-onsite-compiled" %}
    <script src="{% url teams:rpc_api %}" type="text/javascript"></script>
    <script type="text/javascript">
        $(function() {
            $select = $("select#lang-filter", ".controls");
            $select.change(function(e) {
                var lang = $select.val();
                if (lang !== '') {
                    window.location = document.URL.split("?")[0] + '?lang=' + lang;
                } else {
                    window.location = document.URL.split("?")[0];
                }
            });
        });
    </script>
{% endblock %}

{% block view_content %}

    {% with "members" as current %}
        {% include "teams/_tabs.html" %}
    {% endwith %}

    {% if team.video %}
        {% widget widget_params %}
    {% endif %}

    <div class="view grid_9 alpha">

        {% if team|can_invite_to_team:user %}
            <div class="tools">
                <a href="{% url teams:invite_members slug=team.slug %}" class="button">Invite Members</a>
            </div>
        {% endif %}

        {% if team_member_list|length == 0 %}
            <p class="empty">{% trans "Sorry, no members found." %}</p>
        {% endif %}

        <ul class="members listing">
            {% for member in team_member_list %}
                {% with member.pk as mpk%}
                    <li>
                        <h3>
                            <a href="{{ member.user.get_absolute_url }}">
                                {{ member.user }}
                                {% if member.user == user %}(Me){% endif %}
                            </a>
                            {% for lang in member.user.get_languages %}
                                <span class="descriptor">{{ lang.get_language_display }}</span>
                            {% endfor %}
                        </h3>
                        <p>
                            {{ member.role|capfirst }}

                            {% member_projects member as member_project %}
                            {% if member_project %}
                                (
                                {% for project in member_project %}
                                    {{project.name}}{% if not forloop.last %},{% endif %}
                                {% endfor %}
                                )
                            {% endif %}
                        </p>
                        <a href="{{ member.user.get_absolute_url }}" class="thumb"><img src="{{ member.user.avatar }}" alt="{{ member.user }} avatar"></a>
                        <ul class="actions">
                            <li>
                                <a href="">Send a message</a>
                            </li>
                        </ul>
                        <ul class="admin-controls">
                            {% if member in assignable_roles %}
                                <li>
                                    <a class="edit-role" data-team-slug="{{team.slug}}" data-member-pk="{{member.pk}}" >Edit</a>
                                </li>
                            {% endif %}
                        </ul>
                    </li>
                {% endwith %}
            {% endfor %}
        </ul>
        {% if is_paginated %}{% paginator %}{% endif %}
    </div>

    <div class="controls grid_3 omega">
        {% include "teams/_filters_members.html" %}
        <div class="refine">
            <h4>Refine</h4>
            {% include "teams/_search.html" %}
            <select name="lang-filter" id="lang-filter">
                <option value="">All languages</option>
                {% for code, name in languages %}
                    <option value="{{ code }}">{{ name }}</option>
                {% endfor %}
            </select>
        </div>
        {% include "teams/_actions.html" %}
    </div>

    {% if assignable_roles %}
        <script id="editRoleDialog" type="text/html">
            {% verbatim %}
            <div class="bootstrap">
                <div class="modal">
                    <div class="modal-header">
                        <a href="#" class="close action-close">x</a>
                        <h3>Edit member role</h3>
                    </div>
                    <div class="modal-body">
                        <div class="field clearfix">
                            <label for="roles">Role:</label>
                            <select class="roles" id="roles">
                                {{#roles}}
                                    <option value="{{val}}">{{name}}</option>
                                {{/roles}}
                            </select>
                        </div>
                        <div class="field clearfix">
                            <label>Project Restriction:</label>
                            <select data-placeholder="None" style="width:350px;" multiple class="chzn-select projects">
                                {{#projects}}
                                    <option {{#selected}}selected="selected"{{/selected}} value="{{pk}}">{{name}}</option>
                                {{/projects}}
                            </select>
                        </div>
                        <div class="field clearfix">
                            <label>Language Restriction:</label>
                            <select data-placeholder="None" style="width:350px;"
                                multiple class="chzn-select langs">
                                {{#languages}}
{'fraction_non_alphanumeric': 0.1452265372168285, 'fraction_numerical': 0.003236245954692557, 'mean_word_length': 1.1312068965517241, 'pattern_counts': {'":': 0, '<': 165, '<?xml version=': 0, '>': 165, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 20, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5090670', 'n_tokens_mistral': 3357, 'n_tokens_neox': 2980, 'n_words': 617}