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

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

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

{% block content %}
{{ block.super }}
<div class="panel panel-default">
  <div class="panel-heading">Existing Datasheets</div>
  <div class="panel-body">
    {{ list_pager|safe }}
    <ul>
      {% for datasheet in datasheet_list %}
      <li>{{ datasheet.html_link|safe }}
        ({{  datasheet.part_set.all|join:", " }})
      </li>
      {% endfor %}
    </ul>
    {{ list_pager|safe }}
  </div>
</div>
{% endblock content %}
