<?php defined('SYSPATH') or die('No direct script access.'); /** * @var $request object object of request - Request::get() * @var $total_items int total items * @var $is_nested bool is nested items * @var $obj object object ORM Model * @var $pag object object Pagination * @var $module string current module name */ ?> <?php echo TB::btns_top([Route::url($request->routename, ['action' => 'add']) => __('static.page_add'), Route::url($request->routename, ['action' => 'order']) => $total_items > 1 ? __('settings.change_order') : '', Route::url($request->routename, ['action' => 'list']) => __('settings.sort_reset')]); ?> <?php if ($total_items > 0) { ?> <table class="table table-striped table-hover"> <?php echo TB_Table::head(['title' => __('settings.title'), 'enabled' => __('settings.status'), '_actions' => __('settings.actions')], true); ?> <?php foreach ($obj as $o) { ?> <tr> <td><?php echo TB::act($request->routename, ['action' => 'edit', 'id' => $o->id], $o->title);
<?php defined('SYSPATH') or die('No direct script access.'); /** * @var $request object object of request - Request::get() * @var $total_items int total items * @var $is_nested bool is nested items * @var $obj object object ORM Model * @var $pag object object Pagination * @var $module string current module name */ ?> <?php echo TB::btns_top([Route::url($request->routename, ['controller' => $request->controller, 'action' => 'add']) => __('shop.category_add'), Route::url($request->routename, ['controller' => $request->controller, 'action' => 'order']) => $total_items > 1 ? __('settings.change_order') : '', Route::url($request->routename, ['controller' => $request->controller, 'action' => 'list']) => __('settings.sort_reset')]); ?> <?php if ($total_items > 0) { ?> <table class="table table-striped table-hover"> <?php echo TB_Table::head(['title' => __('settings.title'), '_actions' => __('settings.actions')], true); ?> <?php foreach ($obj as $o) { ?> <tr> <td> <?php
<?php defined('SYSPATH') or die('No direct script access.'); /** * @var $request object object of request - Request::get() * @var $total_items int total items * @var $is_nested bool is nested items * @var $obj object object ORM Model * @var $pag object object Pagination * @var $module string current module name */ ?> <?php echo TB::btns_top([Route::url($request->routename, ['controller' => $request->controller, 'action' => 'add']) => __('shop.product_add'), Route::url($request->routename, ['controller' => $request->controller, 'action' => 'list']) => __('shop.product_manager')]); ?> <?php if ($total_items > 0) { ?> <table class="table table-striped table-hover"> <?php echo TB_Table::head(['title' => __('settings.title'), 'price' => __('shop.product_price'), 'status' => __('shop.product_status'), 'enabled' => __('shop.product_enabled'), '_actions' => __('settings.actions')], true); ?> <?php foreach ($obj as $o) { ?> <tr> <td> <?php
defined('SYSPATH') or die('No direct script access.'); ?> <label class="col-sm-1 control-label"><?php echo __('shop.product'); ?> :</label> <label class="col-sm-11 control-label"><?php echo $o_product->title; ?> </label> <?php echo TB::btns_top([Route::url($request->routename, ['controller' => $request->controller, 'action' => 'edit', 'id' => $o_product->id]) => __('shop.product_edit')]); ?> <?php if (count($o_images) > 0) { ?> <p class="comments">Drag & drop images to change the order:</p> <ul id="sortable_images" class="ui-sortable list-group pull-left"> <?php foreach ($o_images as $o) { ?> <li class="ui-state-default list-group-item" id="image_<?php echo $o->id; ?>
?> <?php echo __('shop.product_enabled'); ?> </label> </div> </div> </div> <?php echo View::factory('backend/v_fileuploads', ['config_img' => 'product_images', 'module' => 'shop', 'controller' => 'product', 'obj' => ['id' => $obj->id, 'is_edit' => TRUE], 'actions' => ['upload' => 'image_mupload', 'delete' => 'image_mdelete', 'rotate' => 'image_mrotate', 'crop' => 'image_crop']]); ?> <?php echo count($obj->images->find_all()) > 1 ? '<div class="col-sm-10 col-xs-12 pull-right">' . TB::btns_top([Route::url($request->routename, ['controller' => $request->controller, 'action' => 'order', 'id' => $obj->id]) => __('shop.order_images')]) . '</div>' : ''; ?> </div> <div class="tab-pane fade" id="tab_seo"> <?php echo View::factory('backend/v_seo', ['s' => [$obj->slug, __('shop.product_slug_h')], 't' => [$obj->meta_t, __('shop.product_meta_t_h')], 'd' => [$obj->meta_d, __('shop.product_meta_d_h')], 'k' => [$obj->meta_k, __('shop.product_meta_k_h')]])->bind('errors', $errors); ?> </div> </div> <?php echo TB_Form::btns_save(); ?>
<?php defined('SYSPATH') or die('No direct script access.'); /** * @var $request object object of request - Request::get() * @var $total_items int total items * @var $is_nested bool is nested items * @var $obj object object ORM Model * @var $pag object object Pagination * @var $module string current module name */ ?> <?php echo TB::btns_top([Route::url($request->routename, ['controller' => $request->controller, 'action' => 'add']) => __('shop.product_add'), Route::url($request->routename, ['controller' => $request->controller, 'action' => 'list']) => __('settings.sort_reset'), Route::url($request->routename, ['controller' => $request->controller, 'action' => 'filter']) => __('settings.filter_reset')]); ?> <div class="pull-right"> <form action="" method="post" id="filter_by" accept-charset="utf-8" class="form-inline"> <div class="form-group"> <label class="control-label"><?php echo HTML::chars(__('shop.category_filter')); ?> :</label> <?php echo $sel_category; ?> </div> <?php echo HTML::anchor(Route::url('b_shop', ['controller' => $request->controller, 'action' => 'deleted']), '<i class="fa fa-trash-o fa-fw"></i>', ['data-toggle' => 'tooltip', 'title' => __('shop.product_deleted_filter'), 'class' => 'btn btn-default']); ?>
<?php defined('SYSPATH') or die('No direct script access.'); if ($total_items > 0) { $table_body = []; foreach ($obj as $o) { $table_body[] = [HTML::anchor('http://novaposhta.ua/office/list?city=' . $o->DescriptionRu, $o->DescriptionRu, ['target' => '_blank', 'data-toggle' => 'tooltip', 'data-original-title' => 'Отделения в населенном пункте'])]; } echo '<div class="btns-top">'; // echo TB_Button::link(ADMIN . '/novaposhta/npupdate', ' Обновить базу для Новой Почты', ['class' => 'btn-small'])->with_icon('refresh'); echo TB::btns_top([Route::url($request->routename, ['controller' => $request->controller, 'action' => 'npupdate']) => __('shop.novaposhta_update')]); echo '</div>'; // Create table echo TB_Table::open(); echo TB_Table::headers_sorter(['title' => ['string', __('Населенный пункт')]]); echo TB_Table::body($table_body); echo TB_Table::close(); echo '<span class="badge badge-info">Всего населенных пунктов: ' . $total_items . '</span>'; if (isset($pg)) { echo $pg; } }