
{% extends BASE_TEMPLATE %}

{% load staticfiles %}
{% load materializecss %}

{% block head-title %}{{ title }}{% endblock %}

{% block main %}
<link rel="stylesheet" type="text/css" href="{% static 'bom/style.css' %}" />
{% endblock %}

{% block menu %}
<li><a href="{% url 'bom:part-info' part_id=part.id %}">Cancel</a></li>
{% endblock%}

{% if profile.role == 'A' %}
{% block content %}
<div class="row">
    <form action="{% url 'bom:part-revision-edit' part_id=part.id part_revision_id=part_revision.id %}" method="post" class="col s12">
        {% csrf_token %}
        {{ part_form.non_field_errors }}
        <div class="row">
            <div class="col s12">
                <i>Edit this revision's properties below, or click <a href="{% url 'bom:part-manage-bom' part_id=part.id part_revision_id=part_revision.id %}">here</a> 
if you want to manage this revision's bill of materials.</i>
            </div>
        </div>
        
        {% include 'bom/part-revision-display.html' with part_revision_form=form %}
        		
		<div class="row">
	        <div class="col s6">
                <a href="javascript:history.back()" class="waves-effect waves-light btn-flat grey-text lighten-1" style="margin-left: -16px;">Cancel</a>
            </div>
            <div class="col s6 right-align">
	        	<button class="waves-effect waves-light btn green lighten-1" type="submit" name="action">Save</button>
	    	</div>
    	</div>
    </form>
</div>
{% endblock %}
{% endif %}