{% extends 'generic/object.html' %}
{% load helpers %}
{% load plugins %}

{% block content %}
<div class="row mb-3">
    <div class="col col-md-6">
        <div class="card">
            <h5 class="card-header">Ticket</h5>
            <table class="table table-hover attr-table">
                <tr>
                    <th scope="row">RIR Config</th>
                    <td>{{ object.rir_config|linkify }}</td>
                </tr>
                <tr>
                    <th scope="row">Ticket Number</th>
                    <td>{{ object.ticket_number }}</td>
                </tr>
                <tr>
                    <th scope="row">Type</th>
                    <td>{{ object.get_ticket_type_display }}</td>
                </tr>
                <tr>
                    <th scope="row">Status</th>
                    <td>{{ object.get_status_display }}</td>
                </tr>
                <tr>
                    <th scope="row">Resolution</th>
                    <td>{{ object.get_resolution_display|default:""|placeholder }}</td>
                </tr>
                <tr>
                    <th scope="row">Network</th>
                    <td>{{ object.network|linkify|placeholder }}</td>
                </tr>
                <tr>
                    <th scope="row">Submitted By</th>
                    <td>{{ object.submitted_by|linkify|placeholder }}</td>
                </tr>
                <tr>
                    <th scope="row">Created Date</th>
                    <td>{{ object.created_date }}</td>
                </tr>
                <tr>
                    <th scope="row">Resolved Date</th>
                    <td>{{ object.resolved_date|placeholder }}</td>
                </tr>
            </table>
            <div class="card-footer text-end">
                <form method="post" action="{% url 'plugins:netbox_rir_manager:rirticket_refresh' object.pk %}" class="d-inline">
                    {% csrf_token %}
                    <button type="submit" class="btn btn-sm btn-primary">
                        <i class="mdi mdi-refresh"></i> Refresh Status
                    </button>
                </form>
            </div>
        </div>
        {% plugin_left_page object %}
    </div>
    <div class="col col-md-6">
        {% include 'inc/panels/tags.html' %}
        {% plugin_right_page object %}
    </div>
</div>
<div class="row">
    <div class="col col-md-12">
        {% plugin_full_width_page object %}
    </div>
</div>
{% endblock content %}
