@if ($imagenes)
    <table class="table table-striped">
        <thead>
            <tr>
                <th>Posición</th>
                <th>Texto</th>
                <th>Imagen</th>
                <th>Acciones</th>
            </tr>
        </thead>
        <tbody>
            @foreach ($imagenes as $imagen)
                <tr id="tr_{{ $imagen->id_imagen }}" class="{{ ($imagen->visible == 0) ? 'tr_inactivo' : '' }}">
                    <td class="col-md-1">
                        <input type="hidden" name="{{ $imagen->src }}" value="{{ $imagen->src }}">
                        <input type="text" name="posicion-{{ $imagen->src }}" value="{{ $imagen->posicion }}" required />
                    </td>
                    <td class="col-md-8">
                        <input type="text" name="texto-{{ $imagen->src }}" class="imagen-texto" value="{{ $imagen->texto }}"
                            required />
                    </td>
                    <td class="col-md-2">
                        <img src="{{ ENV('RUTA_IMAGENES_FRONT_END') }}/{{ $imagen->src }}" class="img-responsive" />
                    </td>
                    <td class="col-md-1 text-center">
                        <input type="hidden" name="status-{{ $imagen->src }}" id="status-{{ $imagen->id_imagen }}"
                            value="{{ $imagen->visible }}">
                        <img src="{{ URL::asset('img') }}/{{($imagen->visible == 1) ? 'desactivar.png' : 'activar.png' }}"
                            class="img-responsive btn_imagen_status" data-id="{{ $imagen->id_imagen }}"
                            data-src="{{ $imagen->src }}" data-status="{{ $imagen->visible }}" />
                    </td>
                </tr>
            @endforeach
        </tbody>
    </table>
@endif