{% extends 'generic/object.html' %}
{% load render_table from django_tables2 %}

{% block content %}
<div class="row mb-3">
    <div class="col col-md-6">
        <div class="card">
            <h5 class="card-header">Threat Event</h5>
            <div class="card-body">
                <table class="table table-hover attr-table">
                    <tr>
                        <th scope="row">Name</th>
                        <td>{{ object.name }}</td>
                    </tr>
                    <tr>
                        <th scope="row">Threat Source</th>
                        <td>
                            {% if object.threat_source %}
                            {% if object.threat_source.get_absolute_url %}
                                <a href="{{ object.threat_source.get_absolute_url }}">{{ object.threat_source }}</a>
                            
                            {% endif %}
                            {% else %}
                                ---
                            {% endif %}
                        </td>
                    </tr>
                    <tr>
                        <th scope="row">Relevance</th>
                        <td>{{ object.relevance }}</td>
                    </tr>
                    <tr>
                        <th scope="row">Likelihood</th>
                        <td>{{ object.likelihood }}</td>
                    </tr>
                    <tr>
                        <th scope="row">Impact</th>
                        <td>{{ object.impact }}</td>
                    </tr>
                </table>
            </div>
        </div>
        {% include 'inc/panels/tags.html' %}
    </div>
    <div class="col col-md-6">        
        <div class="card">
          <h5 class="card-header">Notes</h5>
          <div class="card-body">
            {{ object.notes | markdown  }}
          </div>
        </div>
      </div>
</div>
{% endblock %}