/home/mip/mip/app/Modules/Likod/Views/clients/index.blade.php
@extends('Likod::layouts')
@section('page-body')
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            <i class="fa fa-user-circle-o"></i> Clients Directory
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-cog"></i> Settings</a></li>
            <li class="active">Clients Directory</li>
        </ol>
    </section>
    <!-- Main content -->
    <section class="content">
        @include('Likod::message')
        <div class="callout callout-info" style="margin: 0 0 5px 0;">
        List of Clients
        </div>
        <div class="box box-primary">
            <div class="box-header with-border">
                <span class="pull-right">
                    <a href="{{ url(config('modules.likod').'/clients/create') }}" data-toggle="tooltip" data-placement="top" title="" data-original-title="Add Client"><button class="btn btn-primary btn-flat"><i class="fa fa-plus-circle"></i> Add Client</button></a>
                </span>
            </div>
            <div class="box-body">
                <table class="table table-condensed table-bordered table-striped table-hover" id="clients-table"width="100%">
                <thead>
                <tr>
                    <th>#</th>
                    <th>Client Name</th>
                    <th>Users</th>
                    <th>Email</th>
                    <th>Disk Space</th>
                    <th>Status</th>
                    <th>Action</th>
                </tr>
                </thead>
               </table>
            </div>                
        </div>
    </section>
@stop
@section('page-js')
<script type="text/javascript" src="{{ get_template('js/plugins/datatables/extensions/Pagination/input_old.js') }}"></script>
<script type="text/javascript">
$(function() {
    var clientTable = $('#clients-table').DataTable({
    processing: true,
    serverSide: true,
    "pagingType": "input",
    ajax:{
        url: '{!! url(config('modules.likod').'/clients/get-clients-data') !!}',
        method: 'POST'
    } ,
        columns: [
            {
                width:'10px', searchable: false, orderable: false,
                render: function (data, type, row, meta) {
                    return meta.row + meta.settings._iDisplayStart + 1;
                }
            },
            { data: 'client_name', name: 'client_name' },
            { data: 'number_of_users', name: 'number_of_users', searchable: false, orderable: false },
            { data: 'monthly_mail_quota', name: 'monthly_mail_quota', searchable: false, orderable: false},
            { data: 'disk_size', name: 'disk_size', searchable: false, orderable: false},
            { data: 'status', name: 'status', searchable: false, orderable: false},
            { data: 'action', name: 'action', orderable: false, searchable: false, width:'70px', className:'text-center'},
        ],
        fnDrawCallback: function ( oSettings ) {
            $('[data-toggle="tooltip"]').tooltip();
        },
        "order": [[1, "asc"]],
    });
});
</script>
@include('Likod::notify')
@stop