// fix links in main menu,
// + moved tab AdminTracking.php to AdminTrackingController.php git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8894 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
1 parent
df9948c445
commit
940d412a0c
4 files changed
+31
-31
No files matched your search
@@ -195,7 +195,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
{foreach $tabs AS $t}
|
{foreach $tabs AS $t}
|
||||||
<li class="submenu_size {if $t.current}active{/if}" id="maintab{$t.id_tab}">
|
<li class="submenu_size {if $t.current}active{/if}" id="maintab{$t.id_tab}">
|
||||||
<a href="index.php?controller={$t.class_name}&token={$t.token}">
|
<a href="{$t.href}">
|
||||||
<img src="{$t.img}" alt="" /> {$t.name}
|
<img src="{$t.img}" alt="" /> {$t.name}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<h2 class="space">{l s='Catalog tracking'}</h2>
|
||||||
|
{$categories}
|
||||||
|
{$products_disabled}
|
||||||
|
{$products_nostock}
|
||||||
|
{$attributes_nostock}
|
||||||
@@ -681,7 +681,7 @@ class AdminControllerCore extends Controller
|
|||||||
// tab[class_name] does not contains the "Controller" suffix
|
// tab[class_name] does not contains the "Controller" suffix
|
||||||
$tabs[$index]['current'] = ($tab['class_name'].'Controller' == get_class($this)) || (Tab::getCurrentParentId() == $tab['id_tab']);
|
$tabs[$index]['current'] = ($tab['class_name'].'Controller' == get_class($this)) || (Tab::getCurrentParentId() == $tab['id_tab']);
|
||||||
$tabs[$index]['img'] = $img;
|
$tabs[$index]['img'] = $img;
|
||||||
$tabs[$index]['token'] = Tools::getAdminToken($tab['class_name'].(int)($tab['id_tab']).(int)$this->context->employee->id);
|
$tabs[$index]['href'] = $this->context->link->getAdminLink($tab['class_name']);
|
||||||
|
|
||||||
$sub_tabs = Tab::getTabs($this->context->language->id, $tab['id_tab']);
|
$sub_tabs = Tab::getTabs($this->context->language->id, $tab['id_tab']);
|
||||||
foreach ($sub_tabs AS $index2 => $sub_tab)
|
foreach ($sub_tabs AS $index2 => $sub_tab)
|
||||||
|
|||||||
@@ -25,27 +25,21 @@
|
|||||||
* International Registered Trademark & Property of PrestaShop SA
|
* International Registered Trademark & Property of PrestaShop SA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class AdminTracking extends AdminTab
|
class AdminTrackingController extends AdminController
|
||||||
{
|
{
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->table = 'none';
|
|
||||||
$this->className = 'none';
|
|
||||||
|
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display()
|
public function display()
|
||||||
{
|
{
|
||||||
echo '<h2 class="space">'.$this->l('Catalog tracking').'</h2>';
|
$tpl_vars['categories'] = $this->getObjects('categories_empty')->displayCategories();
|
||||||
$this->getObjects('categories_empty');
|
$tpl_vars['products_disabled'] = $this->getObjects('products_disabled')->displayProducts();
|
||||||
$this->displayCategories();
|
$tpl_vars['products_nostock'] = $this->getObjects('products_nostock')->displayProducts();
|
||||||
$this->getObjects('products_disabled');
|
$tpl_vars['attributes_nostock'] = $this->getObjects('attributes_nostock')->displayAttributes();
|
||||||
$this->displayProducts();
|
$this->context->smarty->assign($tpl_vars);
|
||||||
$this->getObjects('products_nostock');
|
parent::display();
|
||||||
$this->displayProducts();
|
|
||||||
$this->getObjects('attributes_nostock');
|
|
||||||
$this->displayAttributes();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getObjects($type)
|
public function getObjects($type)
|
||||||
@@ -106,6 +100,7 @@ class AdminTracking extends AdminTab
|
|||||||
break ;
|
break ;
|
||||||
}
|
}
|
||||||
$this->_list['obj'] = Db::getInstance()->ExecuteS($sql);
|
$this->_list['obj'] = Db::getInstance()->ExecuteS($sql);
|
||||||
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function displayCategories()
|
public function displayCategories()
|
||||||
@@ -113,15 +108,15 @@ class AdminTracking extends AdminTab
|
|||||||
if (isset($this->_list['obj']))
|
if (isset($this->_list['obj']))
|
||||||
{
|
{
|
||||||
$nbCategories = sizeof($this->_list['obj']);
|
$nbCategories = sizeof($this->_list['obj']);
|
||||||
echo '<h3>'.$this->_list['message'].' '.$nbCategories.' '.$this->l('found').'</h3>';
|
$this->content .= '<h3>'.$this->_list['message'].' '.$nbCategories.' '.$this->l('found').'</h3>';
|
||||||
if (!$nbCategories)
|
if (!$nbCategories)
|
||||||
return ;
|
return ;
|
||||||
echo '
|
$this->content .= '
|
||||||
<table cellspacing="0" cellpadding="0" class="table">';
|
<table cellspacing="0" cellpadding="0" class="table">';
|
||||||
$irow = 0;
|
$irow = 0;
|
||||||
foreach ($this->_list['obj'] AS $k => $category)
|
foreach ($this->_list['obj'] AS $k => $category)
|
||||||
echo '<tr class="'.($irow++ % 2 ? 'alt_row' : '').'"><td>'.rtrim(getPath('index.php?tab=AdminCatalog', $category['id_category']), ' >').'</td></tr>';
|
$this->content .= '<tr class="'.($irow++ % 2 ? 'alt_row' : '').'"><td>'.rtrim(getPath('index.php?tab=AdminCatalog', $category['id_category']), ' >').'</td></tr>';
|
||||||
echo '</table><br /><br />';
|
$this->content .= '</table><br /><br />';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -131,7 +126,7 @@ class AdminTracking extends AdminTab
|
|||||||
if (isset($this->_list['obj']))
|
if (isset($this->_list['obj']))
|
||||||
{
|
{
|
||||||
$nbProducts = sizeof($this->_list['obj']);
|
$nbProducts = sizeof($this->_list['obj']);
|
||||||
echo '<h3>'.$this->_list['message'].' '.$nbProducts.' '.$this->l('found').'</h3>';
|
$this->content .= '<h3>'.$this->_list['message'].' '.$nbProducts.' '.$this->l('found').'</h3>';
|
||||||
if (!$nbProducts)
|
if (!$nbProducts)
|
||||||
return ;
|
return ;
|
||||||
$this->fieldsDisplay = (array(
|
$this->fieldsDisplay = (array(
|
||||||
@@ -146,12 +141,12 @@ class AdminTracking extends AdminTab
|
|||||||
'status' => array('title' => $this->l('Status')),
|
'status' => array('title' => $this->l('Status')),
|
||||||
'action' => array('title' => $this->l('Actions'))
|
'action' => array('title' => $this->l('Actions'))
|
||||||
));
|
));
|
||||||
echo '
|
$this->content .= '
|
||||||
<table class="table" cellpadding="0" cellspacing="0">
|
<table class="table" cellpadding="0" cellspacing="0">
|
||||||
<tr>';
|
<tr>';
|
||||||
foreach ($this->fieldsDisplay AS $field)
|
foreach ($this->fieldsDisplay AS $field)
|
||||||
echo '<th'.(isset($field['width']) ? 'style="width: '.$field['width'].'"' : '').'>'.$field['title'].'</th>';
|
$this->content .= '<th'.(isset($field['width']) ? 'style="width: '.$field['width'].'"' : '').'>'.$field['title'].'</th>';
|
||||||
echo '
|
$this->content .= '
|
||||||
</tr>';
|
</tr>';
|
||||||
foreach ($this->_list['obj'] AS $k => $prod)
|
foreach ($this->_list['obj'] AS $k => $prod)
|
||||||
{
|
{
|
||||||
@@ -159,7 +154,7 @@ class AdminTracking extends AdminTab
|
|||||||
$product->name = $product->name[(int)$this->context->language->id];
|
$product->name = $product->name[(int)$this->context->language->id];
|
||||||
$taxrate = $product->getTaxesRate();
|
$taxrate = $product->getTaxesRate();
|
||||||
|
|
||||||
echo '
|
$this->content .= '
|
||||||
<tr>
|
<tr>
|
||||||
<td>'.$product->id.'</td>
|
<td>'.$product->id.'</td>
|
||||||
<td align="center">'.($product->manufacturer_name != NULL ? stripslashes($product->manufacturer_name) : '--').'</td>
|
<td align="center">'.($product->manufacturer_name != NULL ? stripslashes($product->manufacturer_name) : '--').'</td>
|
||||||
@@ -178,7 +173,7 @@ class AdminTracking extends AdminTab
|
|||||||
</td>
|
</td>
|
||||||
</tr>';
|
</tr>';
|
||||||
}
|
}
|
||||||
echo '</table><br /><br />';
|
$this->content .= '</table><br /><br />';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -188,7 +183,7 @@ class AdminTracking extends AdminTab
|
|||||||
if (isset($this->_list['obj']))
|
if (isset($this->_list['obj']))
|
||||||
{
|
{
|
||||||
$nbAttributes = sizeof($this->_list['obj']);
|
$nbAttributes = sizeof($this->_list['obj']);
|
||||||
echo '<h3>'.$this->_list['message'].' '.$nbAttributes.' '.$this->l('found').'</h3>';
|
$this->content .= '<h3>'.$this->_list['message'].' '.$nbAttributes.' '.$this->l('found').'</h3>';
|
||||||
if (!$nbAttributes)
|
if (!$nbAttributes)
|
||||||
return ;
|
return ;
|
||||||
$this->fieldsDisplay = (array(
|
$this->fieldsDisplay = (array(
|
||||||
@@ -204,12 +199,12 @@ class AdminTracking extends AdminTab
|
|||||||
'action' => array('title' => $this->l('Actions'))
|
'action' => array('title' => $this->l('Actions'))
|
||||||
));
|
));
|
||||||
|
|
||||||
echo '
|
$this->content .= '
|
||||||
<table class="table" cellpadding="0" cellspacing="0">
|
<table class="table" cellpadding="0" cellspacing="0">
|
||||||
<tr>';
|
<tr>';
|
||||||
foreach ($this->fieldsDisplay AS $field)
|
foreach ($this->fieldsDisplay AS $field)
|
||||||
echo '<th'.(isset($field['width']) ? 'style="width: '.$field['width'].'"' : '').'>'.$field['title'].'</th>';
|
$this->content .= '<th'.(isset($field['width']) ? 'style="width: '.$field['width'].'"' : '').'>'.$field['title'].'</th>';
|
||||||
echo '
|
$this->content .= '
|
||||||
</tr>';
|
</tr>';
|
||||||
|
|
||||||
$attributes = array();
|
$attributes = array();
|
||||||
@@ -231,7 +226,7 @@ class AdminTracking extends AdminTab
|
|||||||
$product = new Product((int)$prod['id_product'], false);
|
$product = new Product((int)$prod['id_product'], false);
|
||||||
$tax_rate = $product->getTaxesRate();
|
$tax_rate = $product->getTaxesRate();
|
||||||
|
|
||||||
echo '
|
$this->content .= '
|
||||||
<tr>
|
<tr>
|
||||||
<td>'.$prod['id_product'].'</td>
|
<td>'.$prod['id_product'].'</td>
|
||||||
<td align="center">'.($prod['manufacturer_name'] != NULL ? stripslashes($prod['manufacturer_name']) : '--').'</td>
|
<td align="center">'.($prod['manufacturer_name'] != NULL ? stripslashes($prod['manufacturer_name']) : '--').'</td>
|
||||||
@@ -250,7 +245,7 @@ class AdminTracking extends AdminTab
|
|||||||
</td>
|
</td>
|
||||||
</tr>';
|
</tr>';
|
||||||
}
|
}
|
||||||
echo '</table><br /><br />';
|
$this->content .= '</table><br /><br />';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user