Viewing file: index.blade.php (4.64 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
@extends('layouts.customer')
@section('title', trans('customer.dlt_template_section',['index'=>'s']))
@section('extra-css') <link rel="stylesheet" href="{{asset('plugins/datatables-bs4/css/dataTables.bootstrap4.min.css')}}"> <link rel="stylesheet" href="{{asset('plugins/datatables-responsive/css/responsive.bootstrap4.min.css')}}"> @endsection
@section('content') <!-- Main content --> <section class="content"> <div class="row"> <div class="col-12"> <div class="card"> <div class="card-header"> <h2 class="card-title">@lang('customer.list')</h2> <div class="float-right"> <a class="btn btn-primary" href="{{route('customer.dlt.template.create')}}">@lang('New DLT Template')</a> <a id="import" class="btn btn-warning" href="#">@lang('Import DLT Template')</a> </div> </div> <!-- /.card-header --> <div class="card-body"> <table id="dlt-template" class="table table-striped table-bordered dt-responsive nowrap"> <thead> <tr> <th>@lang('customer.name')</th> <th>@lang('customer.status')</th> <th>@lang('customer.action')</th> </tr> </thead>
</table> </div> <!-- /.card-body --> </div> <!-- /.card --> </div> <!-- /.col --> </div> <!-- /.row --> </section> <div class="modal fade" id="import-template" tabindex="-1" role="dialog" aria-labelledby="importTemplateLabel" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="importTemplateLabel">Import Template</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <form action="{{route('customer.dlt.import.template.store')}}" role="form" method="post" enctype="multipart/form-data"> @csrf <div class="modal-body"> <div class="form-group"> <label for="import-file"></label> <input type="file" name="import_template" class="form-control" id="import-file"> </div> <div class="text-right"> <a target="_blank" href="{{route('customer.download.sample',['type'=>'template'])}}" class="text-muted"> @lang('customer.download_sample') </a> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> <button type="submit" class="btn btn-primary">Import</button> </div> </form> </div> </div> </div> <!-- /.content --> @endsection
@section('extra-scripts') <script src="{{asset('plugins/datatables/jquery.dataTables.min.js')}}"></script> <script src="{{asset('plugins/datatables-bs4/js/dataTables.bootstrap4.min.js')}}"></script> <script src="{{asset('plugins/datatables-responsive/js/dataTables.responsive.min.js')}}"></script> <script src="{{asset('plugins/datatables-responsive/js/responsive.bootstrap4.min.js')}}"></script> <script src="{{asset('js/readmore.min.js')}}"></script>
<script> "use strict"; $('#dlt-template').DataTable({ processing: true, serverSide: true, responsive:true, ajax:'{{route('customer.get.all.dlt.template')}}', columns: [ { "data": "name" }, { "data": "status" }, { "data": "action" }, ], fnInitComplete: function(oSettings, json) { $(".show-more").css('overflow', 'hidden').readmore({collapsedHeight: 20,moreLink: '<a href="#">More</a>',lessLink: '<a href="#">Less</a>'}); } });
</script> <script> $(document).on('click', '#import', function(e) { $('#import-template').modal('show'); }); </script> @endsection
|