
    <input type="hidden" name="tabletoimport" value=""/>
    <table class="table table-striped table-bordered">
        <tr>
            <th>Données</th>
            <th>Emplacement du fichier</th>
            <th>Séparateur</th>
            <th>Date de la dernière importation</th>
            <th>Nb Lignes importées</th>
            <th>Etat de l'importation</th>
            <th>Action</th>
        </tr>
        
        @foreach($t_tables as $table)
            <?php
                $msg="";
                $class="";$style="";
                $result_import=false;
                if(isset($t_msg[$table]) && ($t_msg[$table]!="") ) {
                    $result_import=true;
                    $class='';
                    $style="background-color:lightgreen;font-family:courier;font-weight:bold";
                }
            ?>
            <tr>
                <td style="font-weight:bold">{!! strtoupper($table) !!}</td>
                <td align="" class="{!! $class !!}"  style="{!! $style !!}">
                    @if($result_import)
                        {!! $t_msg[$table] !!}
                    @else
                        {!! html()->text('table', $table)->attributes(['type' => 'file', 'class' => 'form-control']) !!}

                    @endif
                    <label class="text-info" style="padding:0px" >
                        {!! isset($t_info[$table]["coldef"])?$t_info[$table]["coldef"]:"" !!}</label>
                </td>
                <td style="font-weight:bold">
                    {!! html()->select('separateur_'.$table)->options( array(","=>",", ";"=>";", "\t"=>"\t"))->value(",")
                        ->placeholder('A définir')
                        ->attributes(['class' => 'form-control'])  !!}
                </td>
                <td align="center">{!! isset($t_info[$table]["date"])?$t_info[$table]["date"]:"-" !!} </td>
                <td align="center">{!! isset($t_info[$table]["nb_lignes"])?$t_info[$table]["nb_lignes"]:"-" !!}</td>
                <td align="center" style="font-size:30px;">
                    @if(isset($t_info[$table]["statut"]))
                        <span 
                        style='{!! ($t_info[$table]["statut"]=="OK")?"color:green":"color:red" !!}'
                        class='fa {!! ($t_info[$table]["statut"]=="OK")?"fa-thumbs-o-up":"fa-thumbs-o-down" !!}'></span>  
                    @else
                        <span>-</span>        
                    @endif
                </td>
                <td>
                    @if(!$result_import)
                        <a href="#" id="tabletoimport" name="{{ $table }}" class="btn btn-success">
                                    <span class='ti-download'></span></a>   
                     @endif
                </td>
            </tr>
        @endforeach
        
    </table>
