@extends('layouts.layout-2')

@section('content')

    <div class="card">
        <h6 class="card-header">
            {{__('Länder')}}
        </h6>
        <div class="card-datatable table-responsive">
            <table class="datatables-style table table-striped table-bordered">
                <thead>
                <tr>
                    <th style="max-width: 60px;">&nbsp;</th>
                    <th>{{__('DE')}}</th>
                    <th>{{__('Code')}}</th>
                    <th>{{__('Phone')}}</th>
                    <th>{{__('Status')}}</th>
                </tr>
                </thead>
                <tbody>
                @foreach($values as $value)
                    <tr>
                        <td data-sort="{{ $value->id }}">
                            <a href="{{route('admin_country_edit', [$value->id])}}" class="btn icon-btn btn-sm btn-primary">
                                <span class="far fa-edit"></span>
                            </a>
                        </td>
                        <td>{{ $value->de }}</td>
                        <td>{{ $value->code }}</td>
                        <td>{{ $value->phone }}</td>
                        <td data-sort="{{ $value->active }}">@if($value->active) <span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>@else<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>@endif</td>
                    </tr>
                @endforeach
                </tbody>
            </table>
            <div class="mt-4 ml-4">
           <!--     <a href="{{route('admin_product_category_edit', ['new'])}}" class="btn btn-sm btn-primary">
                    {{__('Neue Kategorie erstellen')}}
                </a>

                -->
            </div>
        </div>
    </div>

    <script>
        $( document ).ready(function() {

            $('.datatables-style').dataTable({
                "bLengthChange": false,
                "iDisplayLength": 50,
                "order": [[ 0, "asc" ]],
                "aoColumns": [
                    { "sWidth": "8%" },
                    { "sWidth": "20%" },
                    { "sWidth": "10%" },
                    { "sWidth": "10%" },
                    { "sWidth": "8%" },
                ],
                "language": {
                    "url": "/js/German.json"
                }
            });
        });
    </script>
@endsection

