{% extends 'CmBundle:Z:baseDos.html.twig' %}

{% block stylesheet %}
{% endblock %}

{% block javascripts %}
{% endblock %}

{% block content %}
    <div class="row">
        <div class="form-horizontal col-lg-12 col-md-12 col-sm-12 col-xs-12">
            <h3 class="text-left">CARGAR ARCHIVO DE PAGOS</h3>
        </div>
        <div class="form-horizontal col-lg-12 col-md-12 col-sm-12 col-xs-12">
            <form class="form-horizontal" action="{{path('subir_archivo')}}" method="POST" enctype="multipart/form-data">
                <div class="form-group">
                    <label>Selecciona archivo</label>
                    <input type="file" name="archivo" id="archivo" accept=".csv">
                </div>
                <div class="form-group">
                    <input type="submit" class="btn btn-primary" value="Cargar">
                </div>
            </form>
        </div>
        <div class="form-horizontal col-lg-12 col-md-12 col-sm-12 col-xs-12 table-responsive" style="height: 500px;">
            <table class="table table-condensed table-bordered table-hover table-striped" style="font-size: smaller;">
                {% if datos is defined and datos != null %}
                    {% for dd in datos %}
                        {% if loop.index == 1 %}
                            <thead>
                                <tr>
                                    {% for d in dd %}
                                        <th>{{d}}</th>
                                        {% endfor %}
                                </tr>
                            </thead>
                        {% else %}
                            <tbody>
                                <tr>
                                    {% for d in dd %}
                                        <td>{{d}}</td>
                                    {% endfor %}
                                </tr>
                            </tbody>
                        {% endif %}
                    {% endfor %}
                {% endif %}
            </table>
        </div>
    </div>
{% endblock %}