{% extends "base.html" %} {% load crispy_forms_tags %} {% load clean from bleach %} {% load guardian_tags %} {% block breadcrumbs %} {% get_obj_perms request.user for algorithm as "algorithm_perms" %} {% endblock %} {% block content %} {% get_obj_perms request.user for algorithm as "algorithm_perms" %} {% if "change_algorithm" in algorithm_perms %} {% if permission_request %}

{{ algorithm.title }}: review access request for user {{ permission_request.user.username }}

{% csrf_token %} {{ form | crispy }}
{% endif %} {% else %}

Request access

{% if not permission_request %}

You currently do not have permission to use this algorithm. If you would like to use the algorithm, you can request permission here.

An email will be sent to the algorithm's editors. They can grant you access.

{% csrf_token %} {{ form | crispy }}
{% else %}

You currently {% if permission_request.status != permission_request.ACCEPTED %}do not {% endif%}have permission to view this algorithm.

You have already sent a permission request. The status of your request is {{ permission_request.get_status_display|lower }}.

{% if permission_request.status == permission_request.REJECTED %} {% if permission_request.rejection_text %}

The algorithm's editors have left the following reason for the rejection:

{{ permission_request.rejection_text }}

{% endif %} {% endif %} {% endif %} {% endif %} {% endblock %}