1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-22 09:21:34 +02:00
invoiceninja/resources/views/portal/default/invoices/index.blade.php

126 lines
3.8 KiB
PHP
Raw Normal View History

2019-07-23 05:31:53 +02:00
@extends('portal.default.layouts.master')
@section('header')
@parent
2019-07-27 07:46:51 +02:00
<link href="//cdn.datatables.net/1.10.19/css/dataTables.bootstrap4.min.css" rel="stylesheet" type="text/css"/>
2019-07-23 05:31:53 +02:00
@stop
@section('body')
<main class="main">
<div class="container-fluid">
2019-07-27 07:46:51 +02:00
<div class="row" style="padding-top: 30px;">
2019-07-23 05:31:53 +02:00
2019-07-29 05:59:28 +02:00
<div class="col-lg-12" style="padding-bottom: 10px;">
2019-07-27 07:46:51 +02:00
2019-07-29 05:59:28 +02:00
<div class="pull-left">
2019-07-30 00:28:38 +02:00
{!! Former::dark_button(ctrans('texts.download'))->addClass('download_invoices') !!}
{!! Former::success_button(ctrans('texts.pay_now'))->addClass('pay_invoices') !!}
2019-07-29 05:59:28 +02:00
</div>
2019-07-27 07:46:51 +02:00
<!-- Filters / Buttons in here.-->
<div id="top_right_buttons" class="pull-right">
2019-07-29 05:59:28 +02:00
2019-07-30 00:28:38 +02:00
<input id="table_filter" type="text" style="width:180px;background-color: white !important"
2019-07-27 07:46:51 +02:00
class="form-control pull-left" placeholder="Filter" value=""/>
</div>
2019-07-25 06:51:00 +02:00
<div class="animated fadeIn">
<div class="col-md-12 card">
2019-07-30 00:28:38 +02:00
{!! $html->table(['class' => 'table table-hover table-striped', 'id' => 'datatable'], true) !!}
2019-07-25 06:51:00 +02:00
</div>
</div>
2019-07-23 05:31:53 +02:00
</div>
2019-07-29 05:59:28 +02:00
2019-07-23 05:31:53 +02:00
</div>
</div>
</main>
</body>
@endsection
2019-07-26 00:05:13 +02:00
@push('scripts')
<script src="//cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="//cdn.datatables.net/1.10.18/js/dataTables.bootstrap4.min.js"></script>
@endpush
2019-07-23 05:31:53 +02:00
2019-07-26 00:05:13 +02:00
@section('footer')
2019-07-27 07:46:51 +02:00
<script>
2019-07-30 00:28:38 +02:00
var data;
2019-07-27 07:46:51 +02:00
$(function() {
2019-07-30 00:28:38 +02:00
$('#datatable').DataTable({
2019-07-27 07:46:51 +02:00
processing: true,
serverSide: true,
searching: false,
bLengthChange: false,
language: {
processing: " {{ trans('texts.processing_request') }}",
search: "{{ trans('texts.search') }}:",
// info: "{{ trans('texts.info') }}",
infoPostFix: "",
loadingRecords: "{{ trans('texts.loading') }}",
zeroRecords: "{{ trans('texts.no_records_found') }}"
},
ajax: '{!! route('client.invoices.index') !!}',
2019-07-30 00:28:38 +02:00
drawCallback: function(settings){
data = this.api().ajax.json().data;
},
2019-07-27 07:46:51 +02:00
columns: [
2019-07-29 05:59:28 +02:00
{data: 'checkbox', name: 'checkbox', title: '<input type="checkbox" class="select_all">', searchable: false, orderable: false},
2019-07-27 07:46:51 +02:00
{data: 'invoice_number', name: 'invoice_number', title: '{{trans('texts.invoice_number')}}', visible: true},
{data: 'invoice_date', name: 'invoice_date', title: '{{trans('texts.invoice_date')}}', visible: true},
{data: 'amount', name: 'amount', title: '{{trans('texts.total')}}', visible: true},
{data: 'balance', name: 'balance', title: '{{trans('texts.balance')}}', visible: true},
{data: 'due_date', name: 'due_date', title: '{{trans('texts.due_date')}}', visible: true},
{data: 'status_id', name: 'status_id', title: '{{trans('texts.status')}}', visible: true},
{data: 'action', name: 'action', title: '', searchable: false, orderable: false},
]
});
});
2019-07-30 00:28:38 +02:00
</script>
2019-07-29 05:59:28 +02:00
<script>
2019-07-30 00:28:38 +02:00
$(document).ready(function() {
2019-07-29 05:59:28 +02:00
2019-07-30 00:28:38 +02:00
$("#datatable").on('change', 'input[type=checkbox]', function() {
var selected = [];
$.each($("input[name='hashed_ids[]']:checked"), function(){
selected.push($(this).val());
});
alert("Selected hashed_ids: " + selected.join(", "));
});
2019-07-29 05:59:28 +02:00
2019-07-30 00:28:38 +02:00
$('#table_filter').on('keyup', function(){
alert('filter');
});
2019-07-29 05:59:28 +02:00
$('.select_all').change(function() {
$(this).closest('table').find(':checkbox:not(:disabled)').prop('checked', this.checked);
});
2019-07-30 00:28:38 +02:00
$('.pay_invoices').click(function() {
alert('pay');
});
$('.download_invoices').click(function() {
alert('download');
});
2019-07-29 05:59:28 +02:00
});
2019-07-30 00:28:38 +02:00
2019-07-27 07:46:51 +02:00
</script>
@endsection