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

@section('content')
    <div id="generic_wrapper">
        <h1>Tracked Visitors</h1>
        <div class="grid-btns-wrapper">
            <button type="button" data-toggle="tooltip" data-placement="right" class="btn btn-default command-export" title="Export to Excel">
                <span class="icon glyphicon glyphicon-export"></span>
            </button>
        </div>
        <div id="visitors">
            <table id="grid" class="table table-condensed table-hover table-striped">
                <thead>
                    <tr>
                        <th data-column-id="id" data-type="numeric" data-identifier="true" data-visible="false">ID</th>
                        <th data-column-id="created_at" data-order="desc">Reg. Date</th>
                        <th data-column-id="last_session" data-order="desc">Last Session</th>
                        <th data-column-id="first_name">First Name</th>
                        <th data-column-id="last_name">Last Name</th>
                        <th data-column-id="email">E-mail</th>
                        <th data-column-id="sessions_count"># Sessions</th>
                        <th data-column-id="views_count"># Page Views</th>
                        <th data-column-id="commands" data-formatter="commands" data-sortable="false">@lang('backend.actions')</th>
                    </tr>
                </thead>
            </table>
        </div>
    </div>
    <script>
        $(function() {
            var visitorsView = new Eae.View.VisitorsList({
                el : $('#generic_wrapper'),
                userId : "{{ Auth::guard('admin')->user()->id }}",
                path : "/list-visitors-cf"
            });
        });
    </script>
@stop
