/
var
/
www
/
vhosts
/
ihelp.ro
/
httpdocs
/
templates
/
Dashboard
/
Products
/
/var/www/vhosts/ihelp.ro/httpdocs/templates/Dashboard/Products
mkdir
upload
Name
Size
Mode
Actions
add.php
7314
0644
edit
dl
rm
edit.php
7550
0644
edit
dl
rm
edit_gallery.php
3469
0644
edit
dl
rm
index.php
22893
0644
edit
dl
rm
Edit:
/var/www/vhosts/ihelp.ro/httpdocs/templates/Dashboard/Products/index.php
(22893B)
<?php $this->assign('title', __('Produse')); ?> <?php $this->Breadcrumbs->reset()->add(__('Produse'), null); $this->Breadcrumbs->prepend([ ['title' => __('Contul meu'), 'url' => ['controller' => 'Profiles', 'action' => 'view']], ]); $this->Breadcrumbs->prepend([ ['title' => __('Acasă'), 'url' => ['controller' => 'Pages', 'action' => 'home']], ]); ?> <div class="block__profile"> <div class="container"> <div class="block__breadcrumbs my-4"> <?php echo $this->Breadcrumbs->render() ?> </div> <div class="row"> <div class="col-12"> <h1> <?php echo __('Contul meu'); ?> </h1> </div> <aside class="col-lg-3"> <div class="side-nav profile-side-nav"> <?php echo $this->element('sidebar'); ?> </div> </aside> <div class="col-lg-9 pl-lg-0"> <div class="products index content profile-content"> <div class="d-flex mb-3"> <h3 class="my-auto"><?php echo __('Produse'); ?></h3> <?php echo $this->Html->link(__('Adaugă un produs'), ['prefix' => 'Dashboard', 'controller' => 'Products', 'action' => 'add'], ['class' => 'btn full primary size-xs ml-auto']); ?> </div> <div class="profile-content-wrapper py-0"> <?php if (!empty($products)) : ?> <div class="rows-striped"> <?php foreach ($products as $product) : ?> <div class="row"> <div class="col-12 col-md-6 col-lg-7 px-md-0 my-auto"> <div class="product-row"> <div class="image"> <?php $image = $this->Html->image($this->Custom->generateUrlHdy( [ 'model_name' => $product->model_name, 'uuid' => $product->uuid, 'image_name' => $product->featured_image['image_path'] ], true, 300, 200, true ), ['class' => 'img-fluid']) ?> <?php echo $this->Html->link($image, ['prefix' => false, 'controller' => 'Products', 'action' => 'view', $product->slug, $product->uuid], ['escape' => false]); ?> </div> <div class="details"> <h3 class="d-flex mb-0"> <span class="my-auto mr-2"> <?php echo $this->Html->link($product->name, ['prefix' => false, 'controller' => 'Products', 'action' => 'view', 'slug' => $product->slug, 'uuid' => $product->uuid], ['class' => 'link', 'escape' => false]) ?> </span> </h3> <h4 class="font-weight-bold mt-1"> <?php if (!empty($product->cause->name)) { echo $this->Html->link($product->cause->name, ['prefix' => false, 'controller' => 'Causes', 'action' => 'view', 'slug' => $product->cause->slug, 'uuid' => $product->cause->uuid], ['class' => 'link', 'escape' => false]); } ?> </h4> </div> </div> </div> <div class="col-12 col-md-6 col-lg-5 pr-md-0 actions text-right"> <?php if ($product->order_products) { ?> <?php echo $this->Html->link('Comenzi', 'javascript: void(0);', ['escape' => false, 'class' => 'btn outline secondary size-xs viewProductOrders']); ?> <?php } else { ?> <?php echo $this->Html->link('Comenzi', 'javascript: void(0);', ['escape' => false, 'class' => 'btn outline secondary size-xs disabled']); ?> <?php } ?> <?php echo $this->Html->link('Modifică', ['prefix' => 'Dashboard', 'controller' => 'Products', 'action' => 'edit', $product->uuid], ['escape' => false, 'class' => 'btn outline secondary size-xs']); ?> <?php echo $this->Form->postLink('Șterge', ['prefix' => 'Dashboard', 'controller' => 'Products', 'action' => 'changeStatus', $product->uuid], ['confirm' => __('Ești sigur că vrei să modifici starea # {0}?', $product->uuid), 'escape' => false, 'class' => 'btn outline primary size-xs']); ?> </div> <?php if ($product->order_products) : ?> <div class="col-12 order-products"> <?php foreach ($product->order_products as $order) : ?> <div class="row"> <div class="col-12 px-0"> <h4 class="d-flex"> <span class="my-auto mr-2"> <b><?php echo __('Nr. Comandă:') ?></b> </span> <button class="id-ellipsis-wrapper" data-tooltip="ID copiat: <?php echo getShortUUid($order->order->uuid); ?>"> <span class="id-ellipsis"><?php echo getShortUUid($order->order->uuid); ?></span> </button> </h4> <h4> <b><?php echo __('Status:') ?></b> <?php echo $order->order->order_status->name; ?> <?php echo $order->order->order_status_comment; ?> </h4> <div class="row"> <div class="col-3"> <h4> <b><?php echo __('Stoc:') ?></b> <?php echo $product->stock; ?> </h4> </div> <div class="col-3"> <h4> <b><?php echo __('Cantitate:') ?></b> <?php echo $order->qnt; ?> </h4> </div> <div class="col-3"> <h4> <b><?php echo __('Preț unitar:') ?></b> <?php echo $this->Number->format($order->price, ['precision' => 0, 'after' => ' Lei']); ?> </h4> </div> <div class="col-3 text-right"> <h4> <b><?php echo __('Preț total:') ?></b> <?php echo $this->Number->format($order->price * $order->qnt, ['precision' => 0, 'after' => ' Lei']); ?> </h4> </div> </div> </div> </div> <?php endforeach; ?> </div> <?php endif; ?> </div> <?php endforeach; ?> </div> <?php /* ?> <div class="table-responsive table-responsive-mobile"> <table class="table table-mobile table-striped table-bordered"> <thead> <tr> <th><?php echo $this->Paginator->sort('uuid', __('#ID')); ?></th> <th><?php echo $this->Paginator->sort('name', __('Produs')); ?></th> <th><?php echo $this->Paginator->sort('cause_id', __('Cauză')); ?></th> <th><?php echo $this->Paginator->sort('category_id', __('Categorie')); ?></th> <th><?php echo $this->Paginator->sort('tag_id', __('Etichete')); ?></th> <th class="text-center"><?php echo $this->Paginator->sort('stock', __('Stoc')); ?></th> <th class="text-nowrap text-center"><?php echo $this->Paginator->sort('price_min', __('Preț minim')); ?></th> <th class="text-center"><?php echo $this->Paginator->sort('price', __('Preț')); ?></th> <th class="text-nowrap text-center"><?php echo $this->Paginator->sort('is_price_fixed', __('Preț fix')); ?></th> <th class="text-center"><?php echo $this->Paginator->sort('is_active', __('Activ')); ?></th> <th class="text-center"><?php echo __('Actiuni'); ?></th> </tr> </thead> <tbody> <?php foreach ($products as $product) : ?> <tr> <td> <button class="id-ellipsis-wrapper" data-tooltip="ID copiat: <?php echo getShortUUid($product->uuid); ?>"> <span class="id-ellipsis"><?php echo getShortUUid($product->uuid); ?></span> </button> </td> <td> <?php echo $this->Html->link($product->name, ['prefix' => false, 'controller' => 'Products', 'action' => 'view', 'slug' => $product->slug, 'uuid' => $product->uuid], ['class' => 'link', 'escape' => false]) ?> </td> <td> <?php if (!empty($product->cause->name)) { echo $this->Html->link($product->cause->name, ['prefix' => false, 'controller' => 'Causes', 'action' => 'view', 'slug' => $product->cause->slug, 'uuid' => $product->cause->uuid], ['class' => 'link', 'escape' => false]); } ?> </td> <td> <?php echo $this->Html->link($product->category->name, ['prefix' => false, 'controller' => 'Categories', 'action' => 'view', 'slug' => $product->category->slug, 'uuid' => $product->category->uuid], ['class' => 'link', 'escape' => false]) ?> </td> <td> <?php if (!empty($product->tags)) : foreach ($product->tags as $tag) : ?> <span class="badge"><?php echo $tag->name; ?></span> <?php endforeach; endif; ?> </td> <td class="text-center"><?php echo h($product->stock); ?></td> <td class="text-nowrap text-center"><?php echo $this->Number->format($product->price_min, ['precision' => 0, 'after' => ' Lei']); ?></td> <td class="text-nowrap text-center"><?php echo $this->Number->format($product->price, ['precision' => 0, 'after' => ' Lei']); ?></td> <td class="text-center"> <div class="indicator text-center <?php echo ($product->is_price_fixed) ? 'text-success' : 'text-danger'; ?>"> <svg> <?php echo ($product->is_price_fixed) ? '<use xlink:href="#svg-circle-checked"></use>' : '<use xlink:href="#svg-circle-unchecked"></use>'; ?> </svg> </div> </td> <td class="text-center"> <div class="indicator text-center <?php echo ($product->is_active) ? 'text-success' : 'text-danger'; ?>"> <svg> <?php echo ($product->is_active) ? '<use xlink:href="#svg-circle-checked"></use>' : '<use xlink:href="#svg-circle-unchecked"></use>'; ?> </svg> </div> </td> <td class="actions text-center"> <?php echo $this->Html->link('<svg><use xlink:href="#svg-edit"></use></svg>', ['prefix' => 'Dashboard', 'controller' => 'Products', 'action' => 'edit', $product->uuid], ['escape' => false, 'class' => 'btn outline primary size-xs has-svg']); ?> <?php echo $this->Form->postLink('<svg><use xlink:href="#svg-trash"></use></svg>', ['prefix' => 'Dashboard', 'controller' => 'Products', 'action' => 'changeStatus', $product->uuid], ['confirm' => __('Ești sigur că vrei să modifici starea # {0}?', $product->uuid), 'escape' => false, 'class' => 'btn outline primary size-xs has-svg']); ?> </td> </tr> <?php if ($product->order_products) : ?> <tr class="orderProductsRow"> <td colspan="11"> <div class="table-responsive"> <table class="table table-striped table-bordered"> <thead> <tr> <th><?php echo __('#ID comanda'); ?></th> <th><?php echo __('Status'); ?></th> <th><?php echo __('Comentarii'); ?></th> <th><?php echo __('Cantitate'); ?></th> <th><?php echo __('Preț'); ?></th> <th><?php echo __('Total'); ?></th> <th><?php echo __('Activ'); ?></th> <th><?php echo __('AWB'); ?></th> </tr> </thead> <tbody> <?php foreach ($product->order_products as $order) : ?> <tr> <td> <button class="id-ellipsis-wrapper" data-tooltip="ID copiat: <?php echo getShortUUid($order->order->uuid); ?>"> <span class="id-ellipsis"><?php echo getShortUUid($order->order->uuid); ?></span> </button> </td> <td><?php echo $order->order->order_status->name; ?></td> <td><?php echo $order->order->order_status_comment; ?></td> <td><?php echo $order->qnt; ?></td> <td class="text-nowrap"><?php echo $this->Number->format($order->price, ['precision' => 0, 'after' => ' Lei']); ?></td> <td class="text-nowrap"><?php echo $this->Number->format($order->price * $order->qnt, ['precision' => 0, 'after' => ' Lei']); ?></td> <td> <div class="indicator text-center <?php echo ($product->is_active) ? 'text-success' : 'text-danger'; ?>"> <svg> <?php echo ($product->is_active) ? '<use xlink:href="#svg-circle-checked"></use>' : '<use xlink:href="#svg-circle-unchecked"></use>'; ?> </svg> </div> </td> <td><?php echo ($order->order->order_status->id == 4) ? __('Create AWB') : ''; ?></td> </tr> <?php endforeach; ?> </tbody> </table> </div> </td> </tr> <?php endif; ?> <?php endforeach; ?> </tbody> </table> </div> <?php */ ?> <?php echo $this->element('paginator'); ?> <?php else : ?> <?php echo __('Nu aveți produse'); ?> <?php endif; ?> </div> </div> </div> </div> </div> </div> <?php $this->start('script'); ?> <script> </script> <?php $this->end(); ?>
Save
cmd:
run