@extends('admin.layouts.main', [
    'scripts' => [
        path_asset('path.backoffice.js_path') . '/view/business/business-list.js'
    ]
])

@section('content')
    <h1>Business Cards List</h1>
    <div id="business-cards">
        @if($canInsert)
            <button type="button" data-toggle="tooltip" data-placement="right" class="btn btn-default command-add list-add-btn" title="{{ Lang::get('backend.new_business_card') }}">
                <span class="icon glyphicon glyphicon-plus"></span>
            </button>
        @endif

        <table id="grid" class="table table-condensed table-hover table-striped">
            <thead>
                <tr>
                    <th data-column-id="id" data-type="numeric" data-identifier="true">ID</th>
                    <th data-column-id="name" data-order="asc">Name</th>
                    <th data-column-id="role" data-sortable="false">Role</th>
                    <th data-column-id="phone" data-sortable="false">Phone</th>
                    <th data-column-id="email" data-sortable="false">Email</th>
                    <th data-column-id="commands" data-formatter="commands" data-sortable="false">{{ trans('backend.actions') }}</th>
                </tr>
            </thead>
        </table>
    </div>
    <script>
        $(function() {
            var manageBusinessCardView = new Eae.View.BackendBusinessCardList({
                el : $('#business-cards'),
                userId : {{ $loggedUser->id }},
                canInsert: 'true'
            });
        });
    </script>
@stop
