{% extends "admin/change_form.html" %}

{% block after_related_objects %}
  {% if original.pk %}  
  <h2>BN: {{ original.name }}</h2>
  <p>
    {% if original.image %}
      <img src="{{ original.image.url }}" />
    {% endif %}
  </p>
  {% if original.is_inferred %}
  <h2>Inference</h2>
  {% for node in original.nodes.all %}
    {% if node.image %}
      <p>
        <img src="{{ node.image.url }}" />
      </p>
    {% endif %}
  {% endfor %}
  {% endif %}
  <p>
    <h3>Actions</h3>
    <ul>
      <li><a href="{% url 'bn_run_inference' original.pk %}">Run inference on the network</a></li>
      <li><a href="{% url 'bn_reset_inference' original.pk %}">Reset inference on the network</a></li>
  </p>  
  {% endif %}
{% endblock %}
