@extends('layouts.layout-2')

@section('content')
    <h4 class="font-weight-bold py-3 mb-1">
        Programme
    </h4>

     <div class="card">
         <div class="card-datatable table-responsive">
             <table class="datatables-programms table table-striped table-bordered">
                 <thead>
                 <tr>
                     <th style="max-width: 60px;">&nbsp;</th>
                     <th>{{__('Programm')}}</th>
                     <th>{{__('Code')}}</th>
                     {{-- <th>{{__('Keywords')}}</th> --}}
                     <th>{{__('Vorlage')}}</th>
                     <th>{{__('Status')}}</th>
                 </tr>
                 </thead>
                 <tbody>
                 @foreach($travel_programs as $value)
                     <tr>
                         <td>
                             <a href="{{ route('travel_program_detail', [$value->id]) }}" class="btn icon-btn btn-sm btn-primary">
                                 <span class="fa fa-edit"></span>
                             </a>
                         </td>
                         <td> <a href="{{ route('travel_program_detail', [$value->id]) }}">{{ $value->title }}</a></td>
                         <td>
                             {{ $value->program_code }}
                         </td>
                        {{--
                         <td>
                             {{ $value->program_code }}
                         </td>
                         --}}
                         <td data-size="{{ $value->hasTravelProgramDrafts() }}">
                             @if($value->hasTravelProgramDrafts())
                                 <span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>
                             @else
                                 <span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>
                             @endif
                         <td data-sort="{{ $value->status }}">
                             @if($value->status)
                                 <span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>
                             @else
                                 <span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>
                             @endif
                         </td>
                     </tr>
                 @endforeach
                 </tbody>
             </table>
             <div class="mt-4 col">
             </div>
         </div>

         <script>
             $( document ).ready(function() {
                 $('.datatables-programms').dataTable({
                     "bLengthChange": false,
                     "iDisplayLength": 50,
                     "language": {
                         "url": "/js/German.json"
                     }
                 });
             });
         </script>
     </div>

  @endsection