{% extends "base.html" %} {% block content %}

Change requests

People can volunteer for an open assignment or accept a request sent directly to them.

{% for swap in swaps %}
{{ swap.assignment.date.strftime('%A, %d %B %Y') }}

{{ swap.assignment.schedule.name }}

{{ swap.requester.name }} requested a change{% if swap.target_user %} with {{ swap.target_user.name }}{% else %} and opened it to anyone{% endif %}.

{% if swap.message %}

{{ swap.message }}

{% endif %} {% if swap.accepted_by %}

Accepted by {{ swap.accepted_by.name }}.

{% endif %}
{{ swap.status.replace('_', ' ') }}
{% if swap.status == 'open' and swap.requester_id != current_user.id and (swap.target_user_id is none or swap.target_user_id == current_user.id) %}
{% endif %} {% if swap.status == 'open' and swap.target_user_id == current_user.id %}
{% endif %} {% if swap.requester_id == current_user.id and swap.status in ['open', 'pending_approval'] %}
{% endif %} {% if current_user.is_admin and swap.status == 'pending_approval' %}
{% endif %}
{% else %}
No change requests yet.
{% endfor %}
{% endblock %}