<table id="tabla_terminos" class="table table-bordered text-right table-hover">
    <thead>
        <tr class="text-center" style="background-color:#eeeeee;">
            <th width=15%>Producto</th>
            <th class="d-none"></th>
            <th class="d-none"></th>
            <th width=70%>Texto</th>
            <th class="d-none"></th>
            <th width=5%>Estado</th>
            @if($visible == "1")
                <th width=5% class="no-sort"></th>
            @endif
            <th width=5% class="no-sort"></th>
        </tr>
    </thead>
    <tbody>

        @foreach ($terminos as $termino)
            <tr>

                <td class="plataforma text-left">{{$termino->nombre_plataforma}}</td>
                <td class="id_plataforma d-none">{{$termino->id_plataforma}}</td>
                <td class="id_terminos d-none">{{$termino->id_terminos}}</td>
                <td class="muestra text-left">{!! $termino->mostrar !!} ...</td>
                <td class="texto d-none">{!! str_replace("<BR>", "\n", str_replace("<br>", "\n", $termino->texto)) !!}</td>
                <td>{{$termino->estado}}</td>
                @if($termino->estado == "ACTIVO")
                    <td width=5%>
                        <button id="modificar_{{$termino->id_terminos}}" type="button" class="btn btn-fidelitas text-center"
                            data-bs-toggle="modal" data-bs-target="#modalTerminos">
                            Modificar
                        </button>
                    </td>
                    <td>
                        <form name="baja_terminos_{{$termino->id_terminos}}" class="baja_terminos_{{$termino->id_terminos}}">
                            <input type="hidden" name="id_terminos" value="{{$termino->id_terminos}}">
                            <input type="hidden" name="_token" id="token" value="{{ csrf_token() }}">
                            <button class="btn btn-danger text-center">Baja</button>
                        </form>
                    </td>
                @else
                    <td>
                        <form name="baja_terminos_{{$termino->id_terminos}}" class="baja_terminos_{{$termino->id_terminos}}">
                            <input type="hidden" name="id_terminos" value="{{$termino->id_terminos}}">
                            <input type="hidden" name="_token" id="token" value="{{ csrf_token() }}">
                            <button class="btn btn-fidelitas text-center">Activar</button>
                        </form>
                    </td>
                @endif
            </tr>
        @endforeach
    </tbody>

    <tfoot>
        <tr class="text-center" style="background-color:#eeeeee;">
            <th width=15%>Producto</th>
            <th class="d-none"></th>
            <th class="d-none"></th>
            <th width=70%>Texto</th>
            <th class="d-none"></th>
            <th width=5%>Estado</th>
            @if($visible == "1")
                <th width=5% class="no-sort"></th>
            @endif
            <th width=5% class="no-sort"></th>
        </tr>
    </tfoot>


</table>



<script>
    crearDataTable("#tabla_terminos");
</script>