From d8753a7d8652bba914d407253536d4dfec13490b Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 20 Sep 2016 00:46:24 -0700 Subject: [PATCH] Use Ajax for activity report --- resources/views/reports/activity.blade.php | 94 ++++++++-------------- 1 file changed, 32 insertions(+), 62 deletions(-) diff --git a/resources/views/reports/activity.blade.php b/resources/views/reports/activity.blade.php index c0f9e6e9ac..6b17df0619 100644 --- a/resources/views/reports/activity.blade.php +++ b/resources/views/reports/activity.blade.php @@ -17,67 +17,28 @@
-
- - +
- - - - - - - - - - - @foreach ($log_actions as $log_action) - - - - - - - - + + + + + + + - @endforeach - -
{{ trans('general.admin') }}{{ trans('general.action') }}{{ trans('general.type') }}{{ trans('general.item') }}{{ trans('general.user') }}{{ trans('general.date') }}
- @if($log_action->user) - {{ $log_action->user->fullName() }} - @endif - {{ $log_action->action_type }} - {{ title_case($log_action->itemType()) }} - - - @if ($item = $log_action->item) - @if ($log_action->itemType()=="asset") - {{ $item->showAssetName() }} - @else - {{ $item->name }} - @endif - @else - {{ trans('general.bad_data') }} - @endif - - @if ($log_action->target) - @if ($log_action->target instanceof \App\Models\User) - {{ $log_action->target->fullName() }} - @elseif ($log_action->target instanceof \App\Models\Asset) - {{ $log_action->target->showAssetName() }} - @endif - - @endif - {{ $log_action->created_at }}{{ trans('general.admin') }}{{ trans('general.action') }}{{ trans('general.type') }}{{ trans('general.item') }}To{{ trans('general.date') }}{{ trans('general.notes') }}
+ + + +
@@ -99,30 +60,39 @@ iconsPrefix: 'fa', showRefresh: true, search: true, - pageSize: {{ \App\Models\Setting::getSettings()->per_page }}, + pageSize: 100, pagination: true, - sidePagination: 'client', + sidePagination: 'server', sortable: true, + showMultiSort: true, cookie: true, + cookieExpire: '2y', mobileResponsive: true, showExport: true, showColumns: true, exportDataType: 'all', - exportTypes: ['csv', 'txt','json', 'xml'], + exportTypes: ['csv', 'excel', 'txt','json', 'xml'], maintainSelected: true, paginationFirstText: "{{ trans('general.first') }}", paginationLastText: "{{ trans('general.last') }}", paginationPreText: "{{ trans('general.previous') }}", paginationNextText: "{{ trans('general.next') }}", - pageList: ['10','25','50','100','150','200'], + pageList: ['10','25','50','100','150','200','500','1000'], + exportOptions: { + fileName: 'assets-export-' + (new Date()).toISOString().slice(0,10), + }, icons: { paginationSwitchDown: 'fa-caret-square-o-down', paginationSwitchUp: 'fa-caret-square-o-up', + sort: 'fa fa-sort-amount-desc', + plus: 'fa fa-plus', + minus: 'fa fa-minus', columns: 'fa-columns', refresh: 'fa-refresh' }, }); + @stop