HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/vhost/disk-apps/teamdemo.sports-crowd.com/resources/views/coupons/coupons.blade.php
@extends('modules.head') @section('contenido')
<div class="box-header">
  <a class="auxiliar-black" href="{{url('/coupons/add')}}">
    <button class="btn btnAdd pull-right">
      <i style="margin-right:5px;" class="fa fa-plus"></i>{{ Lang::get('messages.screen_coupon_tag2')}}
    </button></a>
</div>

<!-- List Data -->
<div class="box">
  <div class="box-header with-border">
    <h3 class="box-title">{{ Lang::get('messages.screen_coupon_tag1')}}</h3>
  </div>

  <!-- /.box-header -->
  <div class="box-body table-responsive ">
    <table id="example2" class="stripe row-border order-column" style="width:100%" role="grid" aria-describedby="example2_info">
      <thead>
        <tr role="row">
          <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">{{ Lang::get('messages.screen_coupon_tag4')}}</th>
          <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">{{ Lang::get('messages.screen_coupon_tag5')}}</th>
          <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">{{ Lang::get('messages.screen_coupon_tag6')}}</th>
          <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">{{ Lang::get('messages.screen_coupon_tag7-1')}}</th>
          <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">{{ Lang::get('messages.screen_banners_tag23')}}</th>
          <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending">{{ Lang::get('messages.screen_coupon_tag8-1')}}</th>
          <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending">{{ Lang::get('messages.screen_coupon_tag8')}}</th>
          <th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending">{{ Lang::get('messages.screen_coupon_tag9')}}</th>
        </tr>
      </thead>
    </table>
  </div>
  <!-- /.box-body -->
</div>

@endsection

<script src="{{ asset('js/jQuery/jquery-2.2.3.min.js') }}"></script>
<script src="{{ asset('js/coupon.js') . '?v=' . time() }}"></script>
<script src="{{ asset('js/bootstrap/js/bootstrap.min.js') }}"></script>
<script type="text/javascript">
  $(document).ready(function() {
    var sort_col = $('#example2').find("th:contains(" + Lang.get('messages.business.title_18') + ")")[0].cellIndex;

    let fixedColumns = false;
    let isMobileDevice = /Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
    if (!isMobileDevice) {
      fixedColumns = {
        left: 1,
        right: 2
      };
    }

    _table = $('#example2').DataTable({
      responsive: true,
      processing: true,
      serverSide: true,
      order: [
        [sort_col, 'desc']
      ],
      language: {
        url: window.DATATABLES_LANGUAGE_URL,
      },
      scrollX: true,
      scrollCollapse: true,
      paging: true,
      fixedColumns: fixedColumns,
      ajax: '{{ route("coupons.table") }}',
      columns: [{
          data: 'name',
          name: 'name'
        },
        {
          data: 'coupon_image',
          name: 'coupon_image'
        },
        {
          data: 'code_coupon',
          name: 'code_coupon'
        },
        {
          data: 'link',
          name: 'link'
        },
        {
          data: 'segmentation',
          render: function(data, type, row) {
            let tags = '';
            if (row.segmentation) {
              let list = row.segmentation.split(',');
              let data = list.map(function(d) {
                return '<li>' + d + '</li>';
              });
              tags = data.join('');
            }
            return tags;
          },
          name: 'tags.name'
        },
        {
          data: 'created_at',
          name: 'created_at'
        },
        {
          data: 'active',
          name: 'active'
        },
        {
          data: 'actions',
          name: 'actions'
        },
      ]

    });

    var info = '<i class="fa  fa-info-circle"  id="btn-info-busqueda"></i><div class="dropdown-menu" id="menuBusqueda" style="left: 50%; padding: 5px; background-color: #f9fb8f;"><p data-toggle="modal">Busqueda por Nombre, Orden y Link</p></div>';

    $('#example2_filter').append(info);
    $('#btn-info-busqueda').on('click', function() {
      $('#menuBusqueda').toggle();
    });

  });
</script>