{% extends "site_base.html" %} {% load staticfiles %} {% load i18n %} {% load bootstrap_tags %} {% block head_title %}{% trans "Exchange" %}: {{ exchange }}{% endblock %} {% block extra_head %} {% endblock %} {% block body_class %}exchange{% endblock %} {% block body_base %}
{% include "_messages.html" %}
{% if exchange %} {{ exchange }} {% else %} New {{ exchange_type.name }} {% endif %} {% if exchange.order %}
{% endif %}
{% trans "Total transfer value" %}: {{ total_t }} {% trans "Total reciprocal transfer value" %}: {{ total_rect }}
{% csrf_token %} {{ exchange_form|as_bootstrap }} {% if agent %}
{% if not exchange %}

Enter this information, click on Save changes, then you can enter the exchange detail.

{% endif %} {% endif %}
{% if exchange %}

Transfers

{% for slot in slots %} {% if not slot.is_reciprocal %}

{{ slot.name }} {% if agent and exchange %} {% trans "New Commitment" %} {% trans "New Transfer" %} {% endif %} Total: {{ slot.total }}

{% if agent and exchange %} {% endif %} {% for xfer in slot.xfers %}
{% if xfer.commitments.all %} {% trans "Commitment" %}: {{ xfer.commit_text }} {% if logger %} {% if not xfer.events.all %}
{% csrf_token %}
{% trans "Transfer This" %} {% endif %} {% endif %} {% if xfer.commit_description %}
{{ xfer.commit_description|urlize|linebreaks }}
{% endif %} {% if xfer.events.all %}
{% trans "Transfer" %}: {{ xfer.commit_event_text }} {% if logger %}
{% csrf_token %}
{% endif %} {% if event.description %}
{{ event.description|urlize|linebreaks }}
{% endif %}
{% endif %} {% else %} {% trans "Transfer" %}: {{ xfer.event_text }} {% if logger %}
{% csrf_token %}
{% endif %} {% if xfer.description %}
{{ xfer.description|urlize|linebreaks }}
{% endif %} {% endif %}
{% endfor %}
{% endif %} {% endfor %}
{% if exchange.can_have_reciprocal_transfers %}

Reciprocal Transfers

{% for slot in slots %} {% if slot.is_reciprocal %}

{{ slot.name }} {% if agent and exchange %} {% trans "New Commitment" %} {% trans "New Transfer" %} {% endif %} Total: {{ slot.total }}

{% if agent and exchange %} {% endif %} {% for xfer in slot.xfers %}
{% if xfer.commitments.all %} {% trans "Commitment" %}: {{ xfer.commit_text }} {% if logger %} {% if not xfer.events.all %}
{% csrf_token %}
{% trans "Transfer This" %} {% endif %} {% endif %} {% if xfer.events.all %}
{% trans "Transfer" %}: {{ xfer.commit_event_text }} {% if logger %}
{% csrf_token %}
{% endif %} {% if event.description %}
{{ event.description|urlize|linebreaks }}
{% endif %}
{% endif %} {% else %} {% trans "Transfer" %}: {{ xfer.event_text }} {% if logger %}
{% csrf_token %}
{% endif %} {% if xfer.description %}
{{ xfer.description|urlize|linebreaks }}
{% endif %} {% endif %}
{% endfor %}
{% endif %} {% endfor %}
{% endif %}

{% trans "Work" %} {% if logger and exchange %} {% trans "Log a work event" %} {% endif %}

{% if logger and exchange %} {% endif %} {% for event in work_events %}
{% trans "Work event" %}: {{ event.resource_type.name }} {{ event.quantity }} {{ event.unit_of_quantity }} {{ event.event_date }} {% trans "Done by" %} {{ event.from_agent.nick }} {% if agent == event.from_agent or logger %}
{% csrf_token %}
{% endif %} {% if event.description %}
{{ event.description|urlize|linebreaks }}
{% endif %}
{% endfor %}
{% endif %}
{% endblock %} {% block extra_script %} {% endblock %} {% block extra_body %} {{ block.super }} {% endblock %}