{% extends 'rates/base.html' %} {% load custom_tags_and_filters %} {% block extrahead %} {% load static %} {% endblock %} {% block title %}Rate{% endblock %} {% block content %}

{% if item %} {{ item }} {% elif forms %} {{ forms.0.instance.type }} {% else %} Create {% endif %} rate


The rates for tool usage & training, area access and staff charges are to be expressed per hour.

{% if not forms %}
{% csrf_token %}
{% else %} {% regroup forms by instance.category.name as forms_by_category %} {% if forms_by_category|length > 1 %}
{% for rate_form_by_category in forms_by_category %} {% with cat_index=forloop.counter %}
{% for rate_form in rate_form_by_category.list %} {% if not forloop.first %} {% endif %} {% with index=cat_index|concat:"_"|concat:forloop.counter %} {% include "rates/rate_form_details.html" with rate_form=rate_form %} {% endwith %} {% endfor %}
{% endwith %} {% endfor %}
{% else %} {# No need for tabs here #} {% for rate_form in forms_by_category.0.list %} {% if not forloop.first %} {% endif %} {% with index=cat_index|concat:"_"|concat:forloop.counter %} {% include "rates/rate_form_details.html" with rate_form=rate_form %} {% endwith %} {% endfor %}
{% endif %} {% endif %} {% endblock %}