{% extends "epic/base_layout.html" %}

{% block buttons %}
  <a class="btn btn-default"
     href="{% url 'epic:epic_index' %}">
    Up <i class="glyphicon glyphicon-chevron-up"></i>
  </a>

  <a href="{% url 'epic:part_add' %}" class="btn btn-default">
    Add New Part <i class="glyphicon glyphicon-plus"></i></a>
{% endblock buttons %}

{% block content %}
{{ block.super }}
<div class="panel panel-default">
  <div class="panel-heading">Existing Parts</div>
  <div class="panel-body">
    {{ list_pager|safe }}
    <ul>
      {% for part in part_list %}
      <li>{{ part.html_link|safe }}:
	{% if part.val %}
	{{ part.val }}
	{% else %}
	{{ part.descr }}
	{% endif %}
	({{ part.mfg }} {{ part.mfg_pn }},
	<span
	   class="epic_{% if part.is_orderable %}ok{% else %}alert{% endif %}">
	  {{ part.strstatus }})
	</span>
      </li>
      {% endfor %}
    </ul>
    {{ list_pager|safe }}
  </div>
</div>
{% endblock content %}
