{% extends "site_base.html" %} {% load staticfiles %} {% load i18n %} {% load bootstrap_tags %} {% block head_title %}{% trans "Value Equation" %}{% endblock %} {% block extra_head %} {% endblock %} {% block body_class %}x{% endblock %} {% block body_base %}
{% include "_messages.html" %} {% if value_equation %} {% trans "Edit Value Equation" %} {{ value_equation }} {% trans "Value Equation Sandbox" %} {% if value_equation.live and user.is_staff %} {% trans "Distribute Income" %} {% endif %} {% else %} {% trans "Create Value Equation" %} {% endif %} {% trans "Value Equations List" %} {% if not value_equation %} {% if agent %}
{% trans "Create New Value Equation" %}
{% endif %} {% else %}
{{ value_equation }} {% if user == value_equation.created_by or user.is_superuser %}
{% trans "Change" %}
{% trans "Add a Bucket" %}
{% endif %}
{% comment %}
{% endcomment %} {% if user.is_superuser %}
{% csrf_token %}
{% endif %}
Context: {% if value_equation.context_agent %} {{ value_equation.context_agent.nick }} {% else %} None {% endif %}
Bucket percentages are calculated using the method: {{ value_equation.get_percentage_behavior_display }}
{% if value_equation.description %}
{{ value_equation.description|urlize|linebreaks }}
{% endif %} {% if value_equation.buckets.all %} {% for bucket in value_equation.buckets.all %}
{{ bucket }} {% if user == value_equation.created_by or user.is_superuser %}
{% trans "Change" %}
{% csrf_token %}
{% if bucket.filter_method %}
{% trans "Add a Bucket Rule" %}
{% endif %} {% endif %} {% if bucket.filter_method %}
Filter method: {{ bucket.get_filter_method_display }}
{% endif %} {% if bucket.distribution_agent %}
Distribute directly to: {{ bucket.distribution_agent }}
{% endif %} {% if bucket.bucket_rules.all %} {% for rule in bucket.bucket_rules.all %}
Rule for: {{ rule.event_type.name }} {% if user == value_equation.created_by or user.is_superuser %}
{% csrf_token %}
{% endif %} {% if agent %}
{% csrf_token %}
{% endif %}
Claim calculation: {{ rule.get_claim_rule_type_display }}, {{ rule.claim_creation_equation }}
Filter by: {{ rule.filter_rule_display_list }}
{% endfor %} {% endif %}
{% endfor %} {% endif %}
{% if test_results %} Recent events for {{ rpt_heading }} {% for tr in test_results %} {% endfor %}
{% trans "Event Date" %} {% trans "Contributor" %} {% trans "Quantity" %} {% trans "Value" %} {% trans "Claim Value" %}
{{ tr.event_date }} {{ tr.from_agent }} {% if tr.quantity > 0 %}{{ tr.quantity }} {{ tr.unit_of_quantity }}{% endif %} {% if tr.value > 0 %}{{ tr.value }} {{ tr.unit_of_value }}{% endif %} {{ tr.claim_amount }}
{% endif %}
{% endif %}
{% endblock %} {% block extra_script %} {% endblock %} {% block extra_body %} {{ block.super }} {% endblock %}