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

@section('content')
    <h1>Manage Backend Users</h1>
    <div id="backend_users">
        <div class="export-bar">
            <button type="button" data-toggle="tooltip" data-placement="right" class="btn btn-default command-export list-export-btn" title="Export to Excell">
                <span class="icon glyphicon glyphicon-export"></span>
            </button>
            <button type="button" data-toggle="tooltip" data-placement="right" class="btn btn-default command-add list-add-btn" title="@lang('backend.new_user')">
                <span class="icon glyphicon glyphicon-plus"></span>
            </button>
        </div>
        <table id="grid" class="table table-condensed table-hover table-striped">
            <thead>
                <tr>
                    <th data-column-id="id" data-order="desc" data-type="numeric" data-identifier="true">ID</th>
                    <th data-column-id="username">@lang('backend.username')</th>
                    <th data-column-id="name">@lang('backend.name')</th>
                    <th data-column-id="role" data-sortable="false">@lang('backend.role')</th>
                    <th data-column-id="commands" data-formatter="commands" data-sortable="false">@lang('backend.actions')</th>
                </tr>
            </thead>
        </table>
    </div>
    <script>
        $(function() {
            var manageUsersView = new Eae.View.BackendUsersList({
                el : $('#backend_users'),
                userId : "{{ Auth::guard('admin')->user()->id }}"
            });
        });
    </script>
@stop
