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

{% block content %}
<div class="row mb-3">
    <div class="col col-md-5">
        <div class="card">
            <h5 class="card-header">Prefix List Rule</h5>
            <div class="card-body">
                <table class="table table-hover attr-table">
                    <tr>
                        <th scope="row">Prefix List</th>
                        <td>
                            <a href="{{ object.prefix_list.get_absolute_url }}">{{ object.prefix_list }}</a>
                        </td>
                    </tr>
                    <tr>
                        <th scope="row">Index</th>
                        <td>{{ object.index }}</td>
                    </tr>
                    <tr>
                        <th scope="row">Action</th>
                        <td>{% badge object.get_action_display bg_color=object.get_action_color %}</td>
                    </tr>
                    <tr>
                        <th scope="row">Prefix</th>
                        {% if object.network.get_absolute_url %}
                        <td>
                            <a href="{{ object.network.get_absolute_url }}">{{ object.network }}</a>
                        </td>
                        {% else %}
                        <td>{{ object.network|placeholder }}</td>
                        {% endif %}
                    </tr>
                    {% if object.ge %}
                    <tr>
                        <th scope="row">Greater than or equal to</th>
                        <td>{{ object.ge|placeholder }}</td>
                    </tr>
                    {% endif %}
                    {% if object.le %}
                    <tr>
                        <th scope="row">Less than or equal to</th>
                        <td>{{ object.le|placeholder }}</td>
                    </tr>
                    {% endif %}
                </table>
            </div>
        </div>
        {% include 'inc/panels/custom_fields.html' %}
        {% include 'inc/panels/tags.html' %}
    </div>
</div>
{% endblock content %}