diff --git a/admin-dev/themes/default/template/controllers/webservice/helpers/form/form.tpl b/admin-dev/themes/default/template/controllers/webservice/helpers/form/form.tpl index 6ce95838b..439faa3e4 100644 --- a/admin-dev/themes/default/template/controllers/webservice/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/controllers/webservice/helpers/form/form.tpl @@ -24,30 +24,23 @@ *} {extends file="helpers/form/form.tpl"} -{block name="description"} - {$smarty.block.parent} - {if $input.type == 'text' && $input.name == 'key'} - - {/if} -{/block} - {block name="input"} {if $input.type == 'resources'} -
{l s='Set the resource permissions for this key:'}
-| {l s='Resource'} | -- | {l s='View (GET)'} | -{l s='Modify (PUT)'} | -{l s='Add (POST)'} | -{l s='Delete (DELETE)'} | -{l s='Fast view (HEAD)'} | +{l s='Resource'} | ++ | {l s='View (GET)'} | +{l s='Modify (PUT)'} | +{l s='Add (POST)'} | +{l s='Delete (DELETE)'} | +{l s='Fast view (HEAD)'} |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -58,8 +51,8 @@ | |||||||||||||
| {$resource_name} | -+ | {$resource_name} | +diff --git a/controllers/admin/AdminStockManagementController.php b/controllers/admin/AdminStockManagementController.php index c5cdf23e9..bba5485b2 100644 --- a/controllers/admin/AdminStockManagementController.php +++ b/controllers/admin/AdminStockManagementController.php @@ -62,6 +62,8 @@ class AdminStockManagementControllerCore extends AdminController 'orderby' => false, 'filter' => false, 'search' => false, + 'class' => 'fixed-width-sm', + 'align' => 'center', 'hint' => $this->l('Quantitity total for all warehouses.') ), ); @@ -791,6 +793,54 @@ class AdminStockManagementControllerCore extends AdminController } } + public function renderView() + { + if (Tools::isSubmit('id')) + { + // override attributes + $this->identifier = 'id_product_attribute'; + $this->display = 'list'; + $this->lang = false; + + $this->addRowAction('addstock'); + $this->addRowAction('removestock'); + $this->addRowAction('transferstock'); + + // get current lang id + $lang_id = (int)$this->context->language->id; + + // Get product id + $product_id = (int)Tools::getValue('id'); + + // Load product attributes with sql override + $this->table = 'product_attribute'; + + $this->_select = 'a.id_product_attribute as id, a.id_product, a.reference, a.ean13, a.upc'; + + $this->_where = 'AND a.id_product = '.$product_id; + $this->_group = 'GROUP BY a.id_product_attribute'; + + // get list and force no limit clause in the request + $this->getList($this->context->language->id, null, null, 0, false); + + // Render list + $helper = new HelperList(); + $helper->bulk_actions = array(); + $helper->toolbar_scroll = $this->toolbar_scroll; + $helper->show_toolbar = false; + $helper->actions = $this->actions; + $helper->list_skip_actions = $this->list_skip_actions; + $helper->no_link = true; + $helper->shopLinkType = ''; + $helper->identifier = $this->identifier; + // Force render - no filter, form, js, sorting ... + $helper->simple_header = true; + $content = $helper->generateList($this->_list, $this->fields_list); + + return parent::renderView(); + } + } + /** * method call when ajax request is made with the details row action * @see AdminController::postProcess() |