{% extends 'buybacks2/base.html' %}
{% load i18n %}
{% load humanize %}

{% block details %}
    <div class="table-responsive">
        <table style="width: 100%; margin: auto;" class="table table-striped table-condensed">
            <thead>
            <tr>
                <th style="width: 45%;">{% trans "Buyback Program Name" %}</th>
                <th style="width: 20%;">{% trans "Corporation" %}</th>
                <th class="text-center" style="width: 35%;">{% trans "Actions" %}</th>
            </tr>
            </thead>
            <tbody>
            {% for program in programs %}
                <tr>
                    <td style="line-height: 35px;">{{ program.name }}</td>
                    <td style="line-height: 35px;">{{ program.corporation.corporation }}</td>
                    <td class="text-center">
                        <a class="btn btn-success btn-sm" href="{% url 'buybacks2:program_calculate' program_pk=program.id %}">
                            Use
                        </a>
                        <a class="btn btn-primary btn-sm" href="{% url 'buybacks2:program' program_pk=program.id %}">
                            View
                        </a>
                        {% if perms.buybacks.manage_programs %}
                            <a class="btn btn-info btn-sm" href="{% url 'buybacks2:program_notifications' program_pk=program.id %}">
                                Notifications
                            </a>
                            <a class="btn btn-warning btn-sm" href="{% url 'buybacks2:program_stats' program_pk=program.id %}">
                                Stats
                            </a>
                            <a class="btn btn-danger btn-sm" href="{% url 'buybacks2:program_remove' program_pk=program.id %}">
                                Delete
                            </a>
                        {% endif %}
                    </td>
                </tr>
            {% endfor %}
            </tbody>
        </table>
    </div>
{% endblock %}

{% block extra_javascript %}
{% endblock %}

{% block extra_css %}
{% endblock %}

{% block extra_script %}
{% endblock %}
