<a href="{% url 'assigned_opportunity_connection_add' opportunity_results.opportunity_id 'customer' %}">Connect Customer</a><br/>
<a href="{% url 'assigned_opportunity_connection_add' opportunity_results.opportunity_id 'organisation' %}">Connect Organisation</a><br/>
{% if customer_connection_results %}
    <div class="mt-4">
        <strong>Customer Connections</strong>
        <table class="table table-striped table-hover">
            <thead>
                <tr>
                    <td>Customer First Name</td>
                    <td>Customer Last Name</td>
                    <td>Organisation</td>
                    {% if opportunity_permission == 4 %}
                        <td></td>
                    {% endif %}
                </tr>
            </thead>
            {% for row in customer_connection_results %}
                <tr>
                    <td><a href="{% url 'customer_information' row.customer_id %}">{{ row.customer_first_name }}</a></td>
                    <td>{{ row.customer_last_name }}</td>
                    <td>{{ row.organisation_id }}</td>
                    {% if opportunity_permission == 4 %}
                        <td>
                            <a href="javascript:void(0)" onclick="delete_connection({{ row.customer_id }}, 'customer')">Delete</a>
                        </td>
                    {% endif %}
                </tr>
            {% endfor %}
        </table>
    </div>
{% endif %}
{% if organisation_connection_results %}
    <div class="mt-4">
        <strong>Organisation Connections</strong>
        <table class="table table-striped table-hover">
            <thead>
                <tr>
                    <td>Organisation Name</td>
                    <td>Organisation Website</td>
                    <td>Organisation Email</td>
                    {% if opportunity_permission == 4 %}
                        <td></td>
                    {% endif %}
                </tr>
            </thead>
            {% for row in organisation_connection_results %}
                <tr>
                    <td><a href="{% url 'organisation_information' row.organisation_id %}">{{ row.organisation_name }}</a></td>
                    <td>{{ row.organisation_website }}</td>
                    <td>{{ row.organisation_email }}</td>
                    {% if opportunity_permission == 4 %}
                        <td>
                            <a href="javascript:void(0)" onclick="delete_connection({{ row.organisation_id }}, 'organisation')">Delete</a>
                        </td>
                    {% endif %}
                </tr>
            {% endfor %}
        </table>
    </div>
{% endif %}