Skip to content

Commit

Permalink
Fixed active menu (#4209)
Browse files Browse the repository at this point in the history
Co-authored-by: Ng Kiat Siong <kiatsiong.ng@gmail.com>
  • Loading branch information
sreichel and kiatng committed Sep 19, 2024
1 parent bdcfba4 commit 3d193ed
Show file tree
Hide file tree
Showing 29 changed files with 49 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function preDispatch()
protected function _initAction()
{
$this->loadLayout();
$this->_setActiveMenu('system/services/roles');
$this->_setActiveMenu('system/api/roles');
$this->_addBreadcrumb($this->__('Web services'), $this->__('Web services'));
$this->_addBreadcrumb($this->__('Permissions'), $this->__('Permissions'));
$this->_addBreadcrumb($this->__('Roles'), $this->__('Roles'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function preDispatch()
protected function _initAction()
{
$this->loadLayout()
->_setActiveMenu('system/services/users')
->_setActiveMenu('system/api/users')
->_addBreadcrumb($this->__('Web Services'), $this->__('Web Services'))
->_addBreadcrumb($this->__('Permissions'), $this->__('Permissions'))
->_addBreadcrumb($this->__('Users'), $this->__('Users'))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public function editAction()
/**
* Set active menu item
*/
$this->_setActiveMenu('customer/new');
$this->_setActiveMenu('customer/manage');

$this->renderLayout();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function indexAction()
$this->_title($this->__('System'))->_title($this->__('Notifications'));

$this->loadLayout()
->_setActiveMenu('system/notification')
->_setActiveMenu('system/adminnotification')
->_addBreadcrumb(Mage::helper('adminnotification')->__('Messages Inbox'), Mage::helper('adminhtml')->__('Messages Inbox'))
->_addContent($this->getLayout()->createBlock('adminhtml/notification_inbox'))
->renderLayout();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Mage_Adminhtml_Permissions_BlockController extends Mage_Adminhtml_Controll
protected function _initAction()
{
$this->loadLayout()
->_setActiveMenu('system/acl')
->_setActiveMenu('system/acl/blocks')
->_addBreadcrumb($this->__('System'), $this->__('System'))
->_addBreadcrumb($this->__('Permissions'), $this->__('Permissions'))
->_addBreadcrumb($this->__('Blocks'), $this->__('Blocks'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Mage_Adminhtml_Permissions_OrphanedResourceController extends Mage_Adminht
protected function _initAction()
{
$this->loadLayout()
->_setActiveMenu('system/acl')
->_setActiveMenu('system/acl/orphaned_resources')
->_addBreadcrumb($this->__('System'), $this->__('System'))
->_addBreadcrumb($this->__('Permissions'), $this->__('Permissions'))
->_addBreadcrumb($this->__('Orphaned Resources'), $this->__('Orphaned Role Resources'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function preDispatch()
protected function _initAction()
{
$this->loadLayout();
$this->_setActiveMenu('system/acl');
$this->_setActiveMenu('system/acl/roles');
$this->_addBreadcrumb($this->__('System'), $this->__('System'));
$this->_addBreadcrumb($this->__('Permissions'), $this->__('Permissions'));
$this->_addBreadcrumb($this->__('Roles'), $this->__('Roles'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function preDispatch()
protected function _initAction()
{
$this->loadLayout()
->_setActiveMenu('system/acl')
->_setActiveMenu('system/acl/users')
->_addBreadcrumb($this->__('System'), $this->__('System'))
->_addBreadcrumb($this->__('Permissions'), $this->__('Permissions'))
->_addBreadcrumb($this->__('Users'), $this->__('Users'))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Mage_Adminhtml_Permissions_VariableController extends Mage_Adminhtml_Contr
protected function _initAction()
{
$this->loadLayout()
->_setActiveMenu('system/acl')
->_setActiveMenu('system/acl/variables')
->_addBreadcrumb($this->__('System'), $this->__('System'))
->_addBreadcrumb($this->__('Permissions'), $this->__('Permissions'))
->_addBreadcrumb($this->__('Variables'), $this->__('Variables'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function accountsAction()
->_title($this->__('New Accounts'));

$this->_initAction()
->_setActiveMenu('report/customer/accounts')
->_setActiveMenu('report/customers/accounts')
->_addBreadcrumb(Mage::helper('adminhtml')->__('New Accounts'), Mage::helper('adminhtml')->__('New Accounts'))
->_addContent($this->getLayout()->createBlock('adminhtml/report_customer_accounts'))
->renderLayout();
Expand Down Expand Up @@ -79,7 +79,7 @@ public function ordersAction()
->_title($this->__('Customers by Number of Orders'));

$this->_initAction()
->_setActiveMenu('report/customer/orders')
->_setActiveMenu('report/customers/orders')
->_addBreadcrumb(
Mage::helper('reports')->__('Customers by Number of Orders'),
Mage::helper('reports')->__('Customers by Number of Orders')
Expand Down Expand Up @@ -119,7 +119,7 @@ public function totalsAction()
->_title($this->__('Customers by Orders Total'));

$this->_initAction()
->_setActiveMenu('report/customer/totals')
->_setActiveMenu('report/customers/totals')
->_addBreadcrumb(
Mage::helper('reports')->__('Customers by Orders Total'),
Mage::helper('reports')->__('Customers by Orders Total')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function soldAction()
->_title($this->__('Products Ordered'));

$this->_initAction()
->_setActiveMenu('report/product/sold')
->_setActiveMenu('report/products/sold')
->_addBreadcrumb(Mage::helper('reports')->__('Products Ordered'), Mage::helper('reports')->__('Products Ordered'))
->_addContent($this->getLayout()->createBlock('adminhtml/report_product_sold'))
->renderLayout();
Expand Down Expand Up @@ -161,7 +161,7 @@ public function lowstockAction()
->_title($this->__('Low Stock'));

$this->_initAction()
->_setActiveMenu('report/product/lowstock')
->_setActiveMenu('report/products/lowstock')
->_addBreadcrumb(Mage::helper('reports')->__('Low Stock'), Mage::helper('reports')->__('Low Stock'))
->_addContent($this->getLayout()->createBlock('adminhtml/report_product_lowstock'))
->renderLayout();
Expand Down Expand Up @@ -203,7 +203,7 @@ public function downloadsAction()
->_title($this->__('Downloads'));

$this->_initAction()
->_setActiveMenu('report/product/downloads')
->_setActiveMenu('report/products/downloads')
->_addBreadcrumb(Mage::helper('reports')->__('Downloads'), Mage::helper('reports')->__('Downloads'))
->_addContent($this->getLayout()->createBlock('adminhtml/report_product_downloads'))
->renderLayout();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function salesAction()
$this->_showLastExecutionTime(Mage_Reports_Model_Flag::REPORT_ORDER_FLAG_CODE, 'sales');

$this->_initAction()
->_setActiveMenu('report/sales/sales')
->_setActiveMenu('report/salesroot/sales')
->_addBreadcrumb(Mage::helper('adminhtml')->__('Sales Report'), Mage::helper('adminhtml')->__('Sales Report'));

$gridBlock = $this->getLayout()->getBlock('report_sales_sales.grid');
Expand Down Expand Up @@ -159,7 +159,7 @@ public function taxAction()
$this->_showLastExecutionTime(Mage_Reports_Model_Flag::REPORT_TAX_FLAG_CODE, 'tax');

$this->_initAction()
->_setActiveMenu('report/sales/tax')
->_setActiveMenu('report/salesroot/tax')
->_addBreadcrumb(Mage::helper('adminhtml')->__('Tax'), Mage::helper('adminhtml')->__('Tax'));

$gridBlock = $this->getLayout()->getBlock('report_sales_tax.grid');
Expand Down Expand Up @@ -202,7 +202,7 @@ public function shippingAction()
$this->_showLastExecutionTime(Mage_Reports_Model_Flag::REPORT_SHIPPING_FLAG_CODE, 'shipping');

$this->_initAction()
->_setActiveMenu('report/sales/shipping')
->_setActiveMenu('report/salesroot/shipping')
->_addBreadcrumb(Mage::helper('adminhtml')->__('Shipping'), Mage::helper('adminhtml')->__('Shipping'));

$gridBlock = $this->getLayout()->getBlock('report_sales_shipping.grid');
Expand Down Expand Up @@ -245,7 +245,7 @@ public function invoicedAction()
$this->_showLastExecutionTime(Mage_Reports_Model_Flag::REPORT_INVOICE_FLAG_CODE, 'invoiced');

$this->_initAction()
->_setActiveMenu('report/sales/invoiced')
->_setActiveMenu('report/salesroot/invoiced')
->_addBreadcrumb(Mage::helper('adminhtml')->__('Total Invoiced'), Mage::helper('adminhtml')->__('Total Invoiced'));

$gridBlock = $this->getLayout()->getBlock('report_sales_invoiced.grid');
Expand Down Expand Up @@ -288,7 +288,7 @@ public function refundedAction()
$this->_showLastExecutionTime(Mage_Reports_Model_Flag::REPORT_REFUNDED_FLAG_CODE, 'refunded');

$this->_initAction()
->_setActiveMenu('report/sales/refunded')
->_setActiveMenu('report/salesroot/refunded')
->_addBreadcrumb(Mage::helper('adminhtml')->__('Total Refunded'), Mage::helper('adminhtml')->__('Total Refunded'));

$gridBlock = $this->getLayout()->getBlock('report_sales_refunded.grid');
Expand Down Expand Up @@ -331,7 +331,7 @@ public function couponsAction()
$this->_showLastExecutionTime(Mage_Reports_Model_Flag::REPORT_COUPONS_FLAG_CODE, 'coupons');

$this->_initAction()
->_setActiveMenu('report/sales/coupons')
->_setActiveMenu('report/salesroot/coupons')
->_addBreadcrumb(Mage::helper('adminhtml')->__('Coupons'), Mage::helper('adminhtml')->__('Coupons'));

$gridBlock = $this->getLayout()->getBlock('report_sales_coupons.grid');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ protected function _initStatus()
public function indexAction()
{
$this->_title($this->__('Sales'))->_title($this->__('Order Statuses'));
$this->loadLayout()->_setActiveMenu('system')->renderLayout();
$this->loadLayout()->_setActiveMenu('system/order_statuses')->renderLayout();
}

/**
Expand All @@ -73,6 +73,7 @@ public function newAction()
}
$this->_title($this->__('Sales'))->_title($this->__('Create New Order Status'));
$this->loadLayout()
->_setActiveMenu('system/order_statuses')
->renderLayout();
}

Expand All @@ -86,6 +87,7 @@ public function editAction()
Mage::register('current_status', $status);
$this->_title($this->__('Sales'))->_title($this->__('Edit Order Status'));
$this->loadLayout()
->_setActiveMenu('system/order_statuses')
->renderLayout();
} else {
$this->_getSession()->addError(
Expand Down Expand Up @@ -161,6 +163,7 @@ public function assignAction()
{
$this->_title($this->__('Sales'))->_title($this->__('Assign Order Status to State'));
$this->loadLayout()
->_setActiveMenu('system/order_statuses')
->renderLayout();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function indexAction()
$this->_title($this->__('System'))->_title($this->__('My Account'));

$this->loadLayout();
$this->_setActiveMenu('system/account');
$this->_setActiveMenu('system/myaccount');
$this->_addContent($this->getLayout()->createBlock('adminhtml/system_account_edit'));
$this->renderLayout();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function indexAction()
/**
* Set active menu item
*/
$this->_setActiveMenu('system/convert');
$this->_setActiveMenu('system/convert/gui');

/**
* Append profiles block to content
Expand Down Expand Up @@ -89,7 +89,7 @@ public function editAction()

$this->_title($profile->getId() ? $profile->getName() : $this->__('New Profile'));

$this->_setActiveMenu('system/convert');
$this->_setActiveMenu('system/convert/gui');

$this->_addContent(
$this->getLayout()->createBlock('adminhtml/system_convert_gui_edit')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function indexAction()
/**
* Set active menu item
*/
$this->_setActiveMenu('system/convert');
$this->_setActiveMenu('system/convert/profiles');

/**
* Append profiles block to content
Expand Down Expand Up @@ -121,7 +121,7 @@ public function editAction()

$this->_title($profile->getId() ? $profile->getName() : $this->__('New Profile'));

$this->_setActiveMenu('system/convert');
$this->_setActiveMenu('system/convert/profiles');

$this->_addContent(
$this->getLayout()->createBlock('adminhtml/system_convert_profile_edit')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function indexAction()
$this->_title($this->__('System'))->_title($this->__('Manage Currency Rates'));

$this->loadLayout();
$this->_setActiveMenu('system/currency');
$this->_setActiveMenu('system/currency/rates');
$this->_addContent($this->getLayout()->createBlock('adminhtml/system_currency'));
$this->renderLayout();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function indexAction()
$this->_title($this->__('System'))->_title($this->__('Design'));

$this->loadLayout();
$this->_setActiveMenu('system');
$this->_setActiveMenu('system/design');
$this->_addContent($this->getLayout()->createBlock('adminhtml/system_design'));
$this->renderLayout();
}
Expand All @@ -61,7 +61,7 @@ public function editAction()
$this->_title($this->__('System'))->_title($this->__('Design'));

$this->loadLayout();
$this->_setActiveMenu('system');
$this->_setActiveMenu('system/design');
$this->getLayout()->getBlock('head')->setCanLoadExtJs(true);

$id = (int) $this->getRequest()->getParam('id');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function indexAction()
->_title($this->__('Web Services'))
->_title($this->__('REST Attributes'));

$this->loadLayout()->_setActiveMenu('system/services/attributes');
$this->loadLayout()->_setActiveMenu('system/api/rest_attributes');

$this->_addBreadcrumb($this->__('Web services'), $this->__('Web services'))
->_addBreadcrumb($this->__('REST Attributes'), $this->__('REST Attributes'))
Expand All @@ -62,7 +62,7 @@ public function indexAction()
public function editAction()
{
$this->loadLayout()
->_setActiveMenu('system/services/attributes');
->_setActiveMenu('system/api/rest_attributes');

$type = $this->getRequest()->getParam('type');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function indexAction()
->_title($this->__('Web Services'))
->_title($this->__('REST Roles'));

$this->loadLayout()->_setActiveMenu('system/services/roles');
$this->loadLayout()->_setActiveMenu('system/api/rest_roles');
$this->_addBreadcrumb($this->__('Web services'), $this->__('Web services'));
$this->_addBreadcrumb($this->__('REST Roles'), $this->__('REST Roles'));
$this->_addBreadcrumb($this->__('Roles'), $this->__('Roles'));
Expand Down Expand Up @@ -82,7 +82,7 @@ public function newAction()
->_title($this->__('Web Services'))
->_title($this->__('Rest Roles'));

$this->loadLayout()->_setActiveMenu('system/services/roles');
$this->loadLayout()->_setActiveMenu('system/api/rest_roles');
$this->_addBreadcrumb($this->__('Web services'), $this->__('Web services'));
$this->_addBreadcrumb($this->__('REST Roles'), $this->__('REST Roles'));
$this->_addBreadcrumb($this->__('Roles'), $this->__('Roles'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function indexAction()
{
// set active menu and breadcrumbs
$this->loadLayout()
->_setActiveMenu('system/currency')
->_setActiveMenu('system/currency/symbols')
->_addBreadcrumb(
Mage::helper('currencysymbol')->__('System'),
Mage::helper('currencysymbol')->__('System')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protected function _initAction()
{
$this->_title($this->__('Import/Export'))
->loadLayout()
->_setActiveMenu('system/importexport');
->_setActiveMenu('system/convert/export');

return $this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protected function _initAction()
{
$this->_title($this->__('Import/Export'))
->loadLayout()
->_setActiveMenu('system/importexport');
->_setActiveMenu('system/convert/import');

return $this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public function editAction()

Mage::register('current_index_process', $process);
$this->loadLayout();
$this->_setActiveMenu('system/index');
$this->renderLayout();
} else {
$this->_getSession()->addError(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public function preDispatch()
public function indexAction()
{
$this->loadLayout();
$this->_setActiveMenu('system/api/oauth_admin_token');
$this->renderLayout();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ public function preDispatch()
*/
public function indexAction()
{
$this->loadLayout()->_setActiveMenu('system/oauth');
$this->loadLayout();
$this->_setActiveMenu('system/api/oauth_authorized_tokens');
$this->renderLayout();
}

Expand Down
Loading

0 comments on commit 3d193ed

Please sign in to comment.