{% extends "projects/project_menu.html" %} {% load i18n %} {% load pagination_tags %} {% load txcommontags %} {% load permissions %} {% load txpermissions %} {% block title %}{{ block.super }} | {{ project.name }} | {% trans "Access Control" %}{% endblock %} {% block breadcrumb %}{{ block.super }} » {{ project.name }}{% endblock %} {% block content_main %}

{% trans "Access Control" %}

{% if approved %}

{% trans "Give access to a translator to send translations to your project" %}

{% else %}

{% trans "Requests for access to submit files" %}

{% endif %} {% get_permission "project_perm.submit_file" for request.user and project as "can_submit_file" %} {% get_permission "project_perm.maintain" for request.user and project as "is_maintainer" %} {% get_permission_request "project_perm.submit_file" for request.user and project as "can_submit_file_request" %}
{% if is_maintainer %}
{% form_as_table_rows project_permission_form %}
{% endif %} {% if not project.anyone_submit %}
{% if form and not can_submit_file_request %} {% include "txpermissions/permission_form.html" %} {% else %} {% if approved %} {% txpermission_form for project using "project_perm.submit_file" %} {% else %} {% if not can_submit_file and not can_submit_file_request %} {% txpermission_request_form for project using "project_perm.submit_file" %} {% endif %} {% endif %} {% endif %}
{% get_permission_requests project as "all_permission_requests" %} {% if all_permission_requests %}

{% trans "Pending requests:" %}

    {% for perm in all_permission_requests|dictsort:"user.username" %}
  • {{ perm.user }} {% if can_submit_file %} - {{perm.user.email|mungify}} {% endif %} {% txpermission_request_approve_form project perm %} {% txpermission_request_delete_form project perm %}
  • {% endfor %}
{% endif %} {% get_permissions project as "all_permissions" %} {% if all_permissions %} {% autopaginate all_permissions 20 %}

{% trans "Users with access to submit files:" %}

    {% for perm in all_permissions|dictsort:"user.username" %}
  • {{ perm.user }} {% if can_submit_file %} - {{perm.user.email|mungify}} {% endif %} {% txpermission_delete_form project perm %}
  • {% endfor %}
{% endif %} {% endif %}
{% endblock %}