/
var
/
www
/
vhosts
/
ihelp.ro
/
httpdocs
/
templates
/
Admin
/
Orders
/
/var/www/vhosts/ihelp.ro/httpdocs/templates/Admin/Orders
mkdir
upload
Name
Size
Mode
Actions
add.php
1916
0644
edit
dl
rm
index.php
14953
0644
edit
dl
rm
view.php
4424
0644
edit
dl
rm
Edit:
/var/www/vhosts/ihelp.ro/httpdocs/templates/Admin/Orders/index.php
(14953B)
<!-- Content Header (Page header) --> <section class="content-header"> <div class="container-fluid"> <div class="row mb-2"> <div class="col-md-12"> <h1><?php echo __('Orders'); ?></h1> </div> </div> </div><!-- /.container-fluid --> </section> <!-- Main content --> <section class="content"> <div class="container-fluid"> <div class="row"> <div class="col-md-12"> <div class="card"> <div class="card-body"> <?php echo $this->form->create(null, ['class' => 'row', 'type' => 'get']); echo '<div class="col-md-4">' . $this->Form->control('uuid', ['label' => __('Order #'), 'value' => $_GET['uuid'] ?? '']) . '</div>'; echo '<div class="col-md-4">' . $this->Form->control('user_name', ['label' => __('User'), 'type' => 'text', 'value' => $_GET['user_name'] ?? '']) . '</div>'; echo '<div class="col-md-4">' . $this->Form->control('payment_method_id', ['label' => __('Payment Method'), 'value' => $_GET['payment_method_id'] ?? '', 'class' => 'form-control select-with-search', 'option' => $paymentMethods, 'empty' => __('All')]) . '</div>'; echo '<div class="col-md-4">' . $this->Form->control('ip', ['label' => __('IP'), 'type' => 'text', 'value' => $_GET['ip'] ?? '']) . '</div>'; echo '<div class="col-md-4">' . $this->Form->control('email', ['label' => __('Email'), 'type' => 'text', 'value' => $_GET['email'] ?? '']) . '</div>'; ?> <!-- Date range --> <div class="col-md-3"> <div class="form-group"> <label><?php echo __('Date range'); ?>: </label> <div class="input-group"> <div class="input-group-prepend"> <div class="input-group-text"> <i class="far fa-calendar-alt"></i> </div> </div> <?php echo $this->Form->control('order_status_date', ['templates' => ['inputContainer' => '<div >{{content}}</div>'], 'value' => ' ', 'label' => false, 'class' => ['datepicker-range-filter', 'form-control', 'float-right'], 'id' => ['reservation'], 'type' => 'text']); ?> </div> <!-- /.input group --> </div> <!-- /.form group --> </div> <?php echo '<div class="col-md-1">' . $this->Form->control('is_active', ['class' => 'form-control select-with-search', 'type' => 'select', 'options' => ['1' => __('Yes'), '0' => __('No')], 'empty' => __('All'), 'value' => $_GET['is_active'] ?? '']) . '</div>'; echo '<div class="col-md-4">' . $this->Form->control('order_status_id', ['class' => 'filter-status-order form-control select-with-search', 'empty' => __('All'), 'label' => __('Order status'), 'options' => $orderStatuses, 'value' => $_GET['order_status_id'] ?? '']) . '</div>'; echo '<div class="col-md-12">'; echo $this->Form->button('Search', ['class' => 'btn btn-success']); echo $this->Html->link('Reset', ['prefix' => 'Admin', 'controller' => 'Orders', 'action' => 'index'], ['class' => 'btn btn-danger float-right']); echo $this->Form->end() . '</div>'; ?> </div> </div> </div> <div class="col-md-12"> <p><a class="btn btn-danger btn-xs btn-change-status-order" data-toggle="modal" data-target="#changeStatusOrder" href="#"><?php echo __('Change status'); ?></a></p> <div class="card"> <div class="card-body table-responsive p-0"> <table class="table table-hover text-nowrap"> <thead> <tr> <th><input type="checkbox" class="flat-red" id="checkAll"></th> <th scope="col"> <?php echo $this->Paginator->sort('Orders.uuid', ['label' => _('Order #')]); ?></th> <th class="text-center" scope="col"> <?php echo $this->Paginator->sort('Orders.user_id', ['label' => _('User')]); ?></th> <th class="text-center" scope="col"> <?php echo $this->Paginator->sort('Orders.notes', ['label' => _('Notes')]); ?></th> <th class="text-center" scope="col"> <?php echo $this->Paginator->sort('Orders.payment_method_id', ['label' => _('Payment method')]); ?> </th> <th class="text-center" scope="col"> <?php echo $this->Paginator->sort('Orders.order_status_id', ['label' => _('Status')]); ?> </th> <th class="text-center" scope="col"> <?php echo $this->Paginator->sort('Orders.order_status_date', ['label' => _('Status Date')]); ?> </th> <th class="text-center" scope="col"> <?php echo $this->Paginator->sort('Orders.order_status_comment', ['label' => _('Status Comment')]); ?> </th> <th class="text-center" scope="col"> <?php echo $this->Paginator->sort('Orders.email', ['label' => _('Email')]); ?></th> <th class="text-center" scope="col"> <?php echo $this->Paginator->sort('Orders.total', ['label' => _('Total')]); ?></th> <th class="text-center" scope="col"> <?php echo $this->Paginator->sort('Orders.email_sent', ['label' => _('Email sent')]); ?> </th> <th class="text-center" scope="col"> <?php echo $this->Paginator->sort('Orders.is_active', ['label' => _('Active')]); ?> </th> <th class="text-center" scope="col"> <?php echo $this->Paginator->sort('Orders.ip', ['label' => _('IP')]); ?></th> <th class="text-center" scope="col"> <?php echo $this->Paginator->sort('Orders.created', ['label' => _('Created')]); ?> </th> <th class="actions" scope="col"><?php echo __('Actions'); ?></th> </tr> </thead> <tbody> <?php foreach ($orders as $order) : ?> <tr> <td> <input type="checkbox" class="flat-red checkbox-order" data-orderId="<?php echo $order->id; ?>"> </td> <td><?php echo h($order->uuid); ?></td> <td class="text-center"> <a href="<?php echo $this->Url->build(['prefix' => 'Admin', 'controller' => 'Users', 'action' => 'view', $order->user->id]); ?>"> <span class="label label-default" title="<?php echo '#' . $order->user->id; ?>"><?php echo $order->user->name; ?></span> </a> </td> <td class="text-center"> <button class="btn btn-copy" data-original-title="" title="" data-clipboard-text="<?php echo h($order->notes); ?>"> <i class="fa fa-commenting" title="<?php echo h($order->notes); ?>"></i> </button> </td> <td class="text-center"> <?php switch ($order->payment_method_id) { case 1: echo '<i class="fa fa-credit-card" title="' . ('#' . $order->payment_method->id . ': ' . $order->payment_method->name) . '"></i>'; break; case 2: echo '<i class="fa fa-file-invoice" title="' . ('#' . $order->payment_method->id . ': ' . $order->payment_method->name) . '"></i>'; break; case 3: echo '<i class="fa fa-money" title="' . ('#' . $order->payment_method->id . ': ' . $order->payment_method->name) . '"></i>'; break; } ?> </td> <td class="text-center"><?php echo h($order->order_status->name); ?></td> <td class="text-center"><?php echo h($order->order_status_date); ?></td> <td class="text-center"> <button class="btn btn-copy" data-original-title="" title="" data-clipboard-text="<?php echo h($order->order_status_comment); ?>"> <i class="fa fa-commenting" title="<?php echo h($order->order_status_comment); ?>"></i> </button> </td> <td class="text-center"> <button class="btn btn-copy" data-original-title="" title="" data-clipboard-text="<?php echo h($order->email); ?>"> <i class="fa fa-envelope" title="<?php echo h($order->email); ?>"></i> </button> </td> <td class="text-center"><?php echo $this->Number->format($order->total, ['precision' => 0, 'after' => ' Lei']); ?></td> <td class="text-center"> <?php echo $order->email_sent ? '<i class="fa fa-envelope text-success" title="Yes"></i>' : '<i class="fa fa-envelope text-danger" title="No"></i>'; ?> </td> <td class="text-center"> <?php echo $order->is_active ? '<i class="fa fa-check-circle text-success" title="Active"></i>' : '<i class="fa fa-times-circle text-danger" title="Inactive"></i>'; ?> </td> <td class="text-center"> <button class="btn btn-copy" data-original-title="" title="" data-clipboard-text="<?php echo h($order->ip); ?>"> <i class="fa fa-sitemap" title="<?php echo h($order->ip); ?>"></i> </button> </td> <td class="text-center"><?php echo h($order->created); ?></td> <td class="actions text-center"> <?php echo $this->Html->link(__('View'), ['prefix' => 'Admin', 'controller' => 'Orders', 'action' => 'view', $order->id], ['class' => 'btn btn-info btn-xs']); ?> <?php //echo $this->Html->link(__('Edit'), ['prefix' => 'Admin', 'controller' => 'Orders', 'action' => 'edit', $order->id], ['class' => 'btn btn-warning btn-xs']); ?> </td> </tr> <?php endforeach; ?> </tbody> </table> </div> </div> </div> </div> <div class="row"> <div class="col-sm-12"> <?php echo $this->element('paginator'); ?> </div> </div> </div> </section> <!-- bootstrap datepicker --> <?php echo $this->element('change-status-order'); ?> <?php $this->append('script'); ?> <script> $(document).ready(function() { // filter status order $('.filter-status-order').on('change', function() { this.form.submit(); }) // update status order $('.btn-change-status-order').click(function() { var ordersChecked = []; $('.checkbox-order').each(function() { if ($(this).is(':checked')) { var id = $(this).attr('data-orderId'); ordersChecked.push(id); } }); $('#changeStatusOrder').on('show.bs.modal', function(e) { if (ordersChecked.length > 0) { $('#idsOrder').val(ordersChecked); $('.list-order-id').text(ordersChecked) $('.btn-change-status').removeAttr('disabled') } else { $('.list-order-id').text('Pleas select orders') $('.btn-change-status').attr('disabled', 'disabled') } }) }) // check all checkbox $("#checkAll").click(function() { $('input:checkbox').not(this).prop('checked', this.checked); }); }) </script> <?php $this->end(); ?>
Save
cmd:
run