@extends('adminlte::page')
@section('title','Kuponi')

@section('content_header')
<h1 class="m-0 text-dark">Preseti</h1>
<a href="{{ URL::route('admin\add-set') }}" class="btn btn-default">{{ Lang::get('Dodaj novi preset') }}</a>
@stop

@section('content')
<table id="data-table" class="display" cellspacing="0" width="100%">
    <thead>
        <tr>
            <th>{!! Lang::get('common.id') !!}</th>
            <th>{!! Lang::get('common.name') !!}</th>
        </tr>
    </thead>

    <tbody>
        @foreach($presets as $item)
        <tr>
            <td>{!! $item->id !!}</td>
            <td><a href="{{route('admin\set-view',['id'=>$item->id])}}">{!! $item->name !!}</a></td>
        </tr>
        @endforeach
    </tbody>
</table>
@endsection
@section('js')
@section('plugins.Datatables', true)
<script>
    $(document).ready(function() {

            $('#data-table').DataTable({
                "paging": false,
                "lengthChange": false,
                "searching": true,
                "ordering": true,
                "info": false,
                "autoWidth": false
            });
    } );
</script>
@endsection
