<?php echo csrf_field(); ?>
<div class='row'>
  <div class="col-md-12 col-sm-12  ">
    <div class="x_panel">
      <!--<div class="x_title">
        <h2>subtitulo</h2>
        <ul class="nav navbar-right panel_toolbox">
          <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
          </li>
          <li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-wrench"></i></a>
            <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
                <a class="dropdown-item" href="#">Settings 1</a>
                <a class="dropdown-item" href="#">Settings 2</a>
              </div>
          </li>
          <li><a class="close-link"><i class="fa fa-close"></i></a>
          </li>
        </ul>
        <div class="clearfix"></div>
      </div>-->
      <div class="x_content">
        
        <nav class="navbar navbar-expand-lg navbar-dark bg-dark-blue" id="nav_filtros">
          <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo01" aria-controls="navbarTogglerDemo01" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
          </button>
          <div class="collapse navbar-collapse" id="navbarTogglerDemo01">
            
            <form class="form-horizontal" style="width: 100%;" action="javascript:proveedor_listado_filtro(null);" id='filtro_proveedor' name='filtro_proveedor'>
              <div class="row">
                
                <div class="col-md-2 col-sm-12"></div>
                <div class="col-md-4 col-sm-12">
                  <input type="text" class="form-control form-control-sm" id='filtro_nombre' name="filtro_nombre" placeholder="Nombre">
                </div>
                
                <div class="col-md-4 col-sm-12">
                  <input type="text" class="form-control form-control-sm" id='filtro_rfc' name="filtro_rfc" placeholder="R.F.C.">
                </div>

                <div class="col-md-2 col-sm-12">
                  <button class="btn btn-outline-info btn-sm" type="submit" data-toggle="tooltip" data-placement="left" title="Buscar"><span class="fa fa-search"></span></button>
                  <button class="btn btn-outline-light btn-sm" type="reset"><span class="fa fa-undo" data-toggle="tooltip" data-placement="left" title="Limpiar"></span></button>
                </div>

              </div>
            </form>
          </div>
        </nav>

        <div class="table mt-3" id='div_listado'>
            <div class="row encabezado">
              <div class="col-md-1 col-sm-1 d-none d-sm-block">ID</div>
              <div class="col-md-3 col-sm-3 d-none d-sm-block">Nombre</div>
              <div class="col-md-2 col-sm-2 d-none d-sm-block">RFC</div>
              <div class="col-md-2 col-sm-2 d-none d-sm-block">Correo</div>
              <div class="col-md-2 col-sm-2 d-none d-sm-block">Teléfono</div>
              <div class="col-md-2 col-sm-2 d-none d-sm-block">Acciones</div>
            </div>
            <div class="row contenido-500">
              <div class="col-md-12">
                @foreach ($proveedores as $p)
                  <div class="row cuerpo">
                    <div class="col-6 d-block d-sm-none bg-dark-blue text-white text-center">ID</div>
                    <div class="col-md-1 col-sm-1 col-6 d-block d-sm-none bg-dark-blue text-white text-center">{{ $p->id }}</div>
                    <div class="col-md-1 col-sm-1 col-6 d-none d-sm-block text-center">{{ $p->id }}</div>
                    
                    <div class="col-6 d-block d-sm-none text-center">Nombre</div>
                    <div class="col-md-3 col-sm-3 col-6">{{ $p->nombre }}</div>

                    <div class="col-6 d-block d-sm-none text-center">RFC</div>
                    <div class="col-md-2 col-sm-2 col-6">{{ $p->rfc }}</div>

                    <div class="col-6 d-block d-sm-none text-center">Correo</div>
                    <div class="col-md-2 col-sm-2 col-6">{{ $p->correo }}</div>

                    <div class="col-6 d-block d-sm-none text-center">Teléfono</div>
                    <div class="col-md-2 col-sm-1 col-6">{{ $p->telefono_1 }}</div>
                    

                    <div class="col-6 d-block d-sm-none text-center">Acciones</div>
                    <div class="col-md-2 col-sm-2 col-6 text-center" >
                      <div class="btn-group btn-group-xs" role="group" aria-label="...">
                        <!--respetar los colores y botones para consultar, modificar y eliminar -->
                        
                        <button class="btn btn-outline-warning" type="button" data-toggle="popover" data-trigger="hover" data-placement="left" data-content="Consultar" onclick="javascript:proveedor_consultar('{{ $p->id }}')"><i class="fa fa-folder-open-o"></i></button>
                        <button class="btn btn-outline-info"    type="button" data-toggle="popover" data-trigger="hover" data-placement="left" data-content="Modificar" onclick="javascript:proveedor_editar('{{ $p->id }}')"><i class="fa fa-pencil"></i></button>
                        
                        @if($p->seleccion!="")
                          <button class="btn btn-outline-success" type="button" data-toggle="popover" data-trigger="hover" data-placement="left" data-content="Selección" onclick="javascript:seleccion_consultar('{{ $p->id }}')"><i class="fa fa-file-o"></i></button>
                          <a class="btn btn-outline-secondary" data-toggle="popover" data-trigger="hover" data-placement="left" data-content="Exportar Selección" href="/proveedorSeleccion/exportar/{{ $p->id }}"><i class="fa fa-cloud-download"></i></a>
                        @endif
                        <button class="btn btn-outline-danger"  type="button" data-toggle="popover" data-trigger="hover" data-placement="left" data-content="Eliminar" onclick="javascript:eliminar_firma('Proveedor - Eliminar', 'proveedor_eliminar({{ $p->id }})')"><i class="fa fa-trash-o"></i></button>
                      </div>
                    </div>
                    

                    
                  </div>
                @endforeach
              </div>
            </div>



        </div>

        <div id="show_datos"></div>
        
      </div>
    </div>
  </div>
</div>


