<div ng-controller="Cases.BillingController">
    <div class="panel panel-success panel-grid">
        <div class="panel-heading">
            <div class="panel-title">
                <span translate>cases.comp.billing.title</span>
                <div class="pull-right">
                    <button type="button" class="btn btn-default btn-xs" ng-click="listInvoices()">
                        <span translate>cases.comp.billing.table.columns.buttons.listInvoices</span>
                    </button>
                    <button type="button" class="btn btn-default btn-xs" ng-click="emailInvoice()" ng-disabled="!isInvoiceGenerated">
                        <span translate>cases.comp.billing.table.columns.buttons.emailInvoice</span>
                    </button>
                    <button type="button" class="btn btn-default btn-xs" ng-click="generateInvoice()" ng-disabled="gridOptions.data.length <= 0">
                        <span translate>cases.comp.billing.table.columns.buttons.generateInvoice</span>
                    </button>
                    <button class="btn btn-default btn-xs" ng-click="addBillingItem()"
                            permission="createBillingItem" permission-object-type="CASE_FILE" permission-properties="objectInfo"
                            permission-action="enable">
                        <i class="fa fa-lg fa-plus"></i>
                    </button>
                    <button class="btn btn-default btn-xs" ng-click="refreshBillingTable()">
                        <i class="fa fa-lg fa-refresh"/>
                    </button>
                </div>
            </div>
        </div>
        <div class="panel-body">
            <div ui-grid="gridOptions" ui-grid-resize-columns ui-grid-auto-resize
                    adjust-table-height="gridOptions.data.length" class="grid"></div>
        </div>
    </div>
</div>
