
{% extends 'admin.html.twig' %}

{% block body %}

    <h2 class="my-4 text-primary">Planes existentes</h4>

    <div class="row">
        <div class="col-md-12">

            <div class="table-responsive">
                <table class="table table-striped table-bordered">
                    <thead class="thead-dark">
                        <tr class="text-center">
                            <th scope="col">Orden</th>
                            <th scope="col">Nombre</th>
                            <th scope="col">Descripcion</th>
                            <th scope="col">Costo anual</th>
                            <th scope="col">Estatus</th>
                            <th scope="col">Opciones</th>
                        </tr>
                    </thead>

                    <tbody>

                        {% if planes %}
                            {% for plan in planes %}
                                <tr>
                                    <th class="text-center">{{ plan.nivel }}</th>
                                    <td>{{ plan.nombre }}</td>
                                    <td>{{ plan.descripcion }}</td>
                                    <td class="text-primary text-center">
                                        <strong>
                                            ${{ plan.costo|number_format }}
                                        </strong>
                                    </td>
                                    <td class="text-center">

    {% include 'all/plan/_estatus.html.twig' with {'estatus':plan.estatus} %} 

                                    </td>
                                    <td class="text-center">
                                        <a class="not-decoration text-dark" href="{{ path('plan_editar', {id : plan.id}) }}" title="Modificar">
                                            <i class="fas fa-edit fa-lg"></i>
                                        </a>
                                        &nbsp;
                                        <a class="not-decoration text-dark" href="{{ path('plan_ver', {id : plan.id}) }}" title="Ver">
                                            <i class="fas fa-eye fa-lg"></i>
                                        </a>
                                    </td>
                                </tr>
                            {% endfor %}
                        {% else %}
                            <tr>
                                <th colspan="6" class="text-center">No existen Planes creados</th>
                            </tr>
                        {% endif %}

                    </tbody>
                </table>
            </div>

        </div>
    </div>

{% endblock %}