{% extends "forms.html" %}


{% block title %}{{ title }}{% endblock %}


{% block breadcrumbs %}
<div class="breadcrumbs">
    <a href='{% url "index" %}'>Home</a>&nbsp;›
    <a href="{% url 'kg_project_list' %}">Projects</a>&nbsp;›
    <a href="{% url 'kg_project_detail' project.id %}">{{ project.pid }}</a>&nbsp;›
    {{ title }}
</div>
{% endblock %}



{% block content %}
<div class="module">
    <h2>{{ title }}</h2>
    <form method="post" action="." class="simple">{% csrf_token %}
        {{ form.as_p }}
        <input type="submit" value="Save" class="default" />
    {% ifequal mode 'edit' %}
        &nbsp;&nbsp;&nbsp;
        {% if record_type == 'grant'  %}
            <a class="deletelink" href={% url 'grant_delete' project.id record_id %}>Delete grant</a>
        {% elif record_type == 'allocation' %}
            <a class="deletelink" href={% url 'allocation_delete' project.id record_id %}>Delete allocation</a>
        {% endif %}
    {% endifequal %}
    </form>
</div>
{% endblock %}
