/
var
/
www
/
vhosts
/
ihelp.ro
/
httpdocs
/
templates
/
Admin
/
Products
/
/var/www/vhosts/ihelp.ro/httpdocs/templates/Admin/Products
mkdir
upload
Name
Size
Mode
Actions
add.php
1777
0644
edit
dl
rm
edit.php
2021
0644
edit
dl
rm
index.php
9153
0644
edit
dl
rm
view.php
4491
0644
edit
dl
rm
Edit:
/var/www/vhosts/ihelp.ro/httpdocs/templates/Admin/Products/index.php
(9153B)
<!-- Content Header (Page header) --> <section class="content-header"> <div class="container-fluid"> <div class="row mb-2"> <div class="col-lg-12"> <h1> <?php echo __('Products'); ?></h1> </div> </div> </div><!-- /.container-fluid --> </section> <!-- Main content --> <section class="content"> <div class="container-fluid"> <div class="row"> <div class="col-lg-12"> <div class="card"> <div class="card-body"> <?php echo $this->form->create(null, ['class' => 'row', 'type' => 'get']); echo '<div class="col-lg-3">' . $this->Form->control('uuid', ['label' => __('Product #'), 'value' => isset($_GET['uuid']) ? trim($_GET['uuid']) : '']) . '</div>'; echo '<div class="col-lg-3">' . $this->Form->control('user_name', ['label' => __('User'), 'type' => 'text', 'value' => isset($_GET['user_name']) ? trim($_GET['user_name']) : '']) . '</div>'; echo '<div class="col-lg-3">' . $this->Form->control('cause_name', ['label' => __('Causes'), 'type' => 'text', 'value' => isset($_GET['cause_name']) ? trim($_GET['cause_name']) : '']) . '</div>'; echo '<div class="col-lg-3">' . $this->Form->control('product_name', ['label' => __('Product'), 'type' => 'text', 'value' => isset($_GET['product_name']) ? trim($_GET['product_name']) : '']) . '</div>'; echo '<div class="col-lg-3">' . '<div><label class="control-label">' . __('Price Range') . '</label></div> <div class="row"> <div class= "col-lg-5">' . $this->Form->control('price_start', ['class' => 'form-control', 'templates' => ['inputContainer' => '{{content}}'], 'label' => false, 'type' => 'text', 'value' => isset($_GET['price_start']) ? $_GET['price_start'] : '']) . '</div>' . '<span class="col-lg-2 text-center"> - </span>' . '<div class= "col-lg-5">' . $this->Form->control('price_end', ['class' => 'form-control', 'templates' => ['inputContainer' => '{{content}}'], 'label' => false, 'type' => 'text', 'value' => isset($_GET['price_end']) ? $_GET['price_end'] : '']) . '</div></div></div>'; echo '<div class="col-lg-3">' . '<div><label class="control-label">' . __('Stock Range') . '</label></div> <div class="row"> <div class= "col-lg-5">' . $this->Form->control('stock_start', ['class' => 'form-control', 'templates' => ['inputContainer' => '{{content}}'], 'label' => false, 'type' => 'text', 'value' => isset($_GET['stock_start']) ? $_GET['stock_start'] : '']) . '</div>' . '<span class="col-lg-2 text-center"> - </span> <div class= "col-lg-5">' . $this->Form->control('stock_end', ['class' => 'form-control', 'templates' => ['inputContainer' => '{{content}}'], 'label' => false, 'type' => 'text', 'value' => isset($_GET['stock_end']) ? $_GET['stock_end'] : '']) . '</div>' . '</div>' . '</div>'; echo '<div class="col-lg-3">' . $this->Form->control('is_active', ['class' => ['form-control', 'select-with-search'], 'type' => 'select', 'options' => ['1' => __('Yes'), '0' => __('No')], 'empty' => __('All'), 'value' => isset($_GET['is_active']) ? trim($_GET['is_active']) : '']) . '</div>'; echo '<div class="col-lg-12">'; echo $this->Form->button('Search'); echo $this->Html->link('Reset', ['prefix' => 'Admin', 'controller' => 'Products', 'action' => 'index'], ['class' => 'btn btn-danger float-right']); echo $this->Form->end() . '</div>'; ?> </div> </div> </div> <div class="col-lg-12"> <div class="card"> <!-- /.box-header --> <div class="card-body table-responsive p-0"> <table class="table table-hover text-nowrap"> <thead> <tr> <th scope="col"><?php echo $this->Paginator->sort('Products.uuid', ['label' => _('Product #')]); ?></th> <th scope="col" class="text-center"><?php echo $this->Paginator->sort('Products.user_id', ['label' => _('User')]); ?></th> <th scope="col" class="text-center"><?php echo $this->Paginator->sort('Products.cause_id', ['label' => _('Cause')]); ?></th> <th scope="col"><?php echo $this->Paginator->sort('Products.name', ['label' => _('Name')]); ?></th> <th scope="col" class="text-center"><?php echo $this->Paginator->sort('Products.price_min', ['label' => _('Price min')]); ?></th> <th scope="col" class="text-center"><?php echo $this->Paginator->sort('Products.price', ['label' => _('Price')]); ?></th> <th scope="col" class="text-center"><?php echo $this->Paginator->sort('Products.stock', ['label' => _('Stock')]); ?></th> <th scope="col" class="text-center"><?php echo $this->Paginator->sort('Products.tags', ['label' => _('Tags')]); ?></th> <th scope="col" class="text-center"><?php echo $this->Paginator->sort('Products.is_price_fixed', ['label' => _('Price fixed')]); ?></th> <th scope="col" class="text-center"><?php echo $this->Paginator->sort('Products.is_active', ['label' => _('Activ')]); ?></th> <th scope="col" class="text-center"><?php echo $this->Paginator->sort('Products.created', ['label' => _('Created')]); ?></th> <th scope="col" class="actions text-center"><?php echo __('Actions'); ?></th> </tr> </thead> <tbody> <?php foreach ($products as $product) : ?> <tr> <td><?php echo h($product->uuid) ?></td> <td class="text-center"> <a href="<?php echo $this->Url->build(['prefix' => 'Admin', 'controller' => 'Users', 'action' => 'view', $product->user->id]); ?>"> <span class="label label-default" title="<?php echo '#' . $product->user->id; ?>"><?php echo $product->user->name; ?></span> </a> </td> <td class="text-center"> <a href="<?php echo $this->Url->build(['prefix' => 'Admin', 'controller' => 'Causes', 'action' => 'view', $product->cause->id]); ?>"> <span class="label label-default" title="<?php echo '#' . $product->cause->id ?>"><?php echo h($product->cause->name); ?></span> </a> </td> <td><?php echo h($product->name) ?></td> <td class="text-center"><?php echo $this->Number->format($product->price_min, ['precision' => 0, 'after' => ' Lei']); ?></td> <td class="text-center"><?php echo $this->Number->format($product->price, ['precision' => 0, 'after' => ' Lei']); ?></td> <td class="text-center"><?php echo $this->Number->format($product->stock); ?></td> <td class="text-center"> <?php if (!empty($product->tags)) { foreach ($product->tags as $tag) { ?> <span class="right badge badge-info"><?php echo $tag->name; ?></span> <?php } } ?> </td> <td class="text-center"><i class="fa <?php echo ($product->is_price_fixed) ? 'fa-check-circle text-success ' : 'fa-times-circle text-danger'; ?>"></i></td> <td class="text-center"><i class="fa <?php echo ($product->is_active) ? 'fa-check-circle text-success ' : 'fa-times-circle text-danger'; ?>"></i></td> <td class="text-center"><?php echo h($product->created); ?></td> <td class="actions text-center"> <?php echo $this->Html->link(__('View'), ['prefix' => 'Admin', 'controller' => 'Products', 'action' => 'view', $product->id], ['class' => 'btn btn-info btn-xs']); ?> <?php echo $this->Html->link(__('Edit'), ['prefix' => 'Admin', 'controller' => 'Products', 'action' => 'edit', $product->id], ['class' => 'btn btn-warning btn-xs']); ?> <a class="<?php echo ($product->is_active) ? 'btn btn-danger btn-xs' : 'btn btn-success btn-xs'; ?>" title="<?php echo ($product->is_active) ? __('Dezactiveaza') : __('Activeaza'); ?>" href="<?php echo $this->Url->build(['prefix' => 'Admin', 'controller' => 'Products', 'action' => 'delete', $product->id]) ?>"><?php echo ($product->is_active) ? __('Disable') : __('Activate'); ?></a> </td> </tr> <?php endforeach; ?> </tbody> </table> </div> <!-- /.box-body --> </div> <!-- /.box --> </div> </div> <div class="row"> <div class="col-sm-12"> <?php echo $this->element('paginator'); ?> </div> </div> </section>
Save
cmd:
run