Permalink
Browse files

Update as of 10/16/2012

* Introduced block arguments to the layout syntax:
  * Introduced the "object" block argument type to specify a grid data source
  * Introduced the "options" block argument type to accommodate key-value pairs
  * Introduced the "URL" block argument type to represent a URL with parameters
  * Introduced block argument updaters for the block arguments, which allow to customize the original grid arguments
  * Implemented extraction of translatable strings from block arguments in layout by the Translation Tool
* Declared the Customer Wishlist and Sales Order grids through the layout instead of the PHP classes
* Implemented the block `Mage_Backend_Block_Widget_Grid_Massaction` to encapsulate grid mass actions
* Moved grid columns and mass action management from the base grid `Mage_Backend_Block_Widget_Grid` to the `Mage_Backend_Block_Widget_Grid_Extended`
* Introduced the column set block `Mage_Backend_Block_Widget_Grid_ColumnSet` responsible for grouping columns in a grid
* Updated the grid rendering template to render a column set instead of rendering columns
* Eliminated dependency between the grid column block and parent blocks
* Denied the public access to the `pub/cron.php`
* Fixes:
  * Fixed the broken Billing Agreement View page
  * Fixed absence of the Default and Minimal attribute sets in the Manage Attribute Sets grid, if the total number of records is 22 and the view of 20 rows per page is chosen
  * Fixed typos on the Sales Order page
  * Fixed typos on the Sales Order's Packing Slips printed to PDF
  * Fixed preserving selected rows after searching in the Sales Order grid
  * Fixed "column not found" SQL error while sorting by the "Product Name" in the Catalog Pending Reviews grid
  • Loading branch information...
1 parent a310c82 commit 784be09c74a339700c92f0f9bf2b806583cc7f29 @magento-team magento-team committed Oct 17, 2012
Showing with 10,055 additions and 2,253 deletions.
  1. +23 −0 CHANGELOG.markdown
  2. +0 −10 app/code/core/Mage/Adminhtml/Block/Cache/Grid.php
  3. +1 −1 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Grid.php
  4. +0 −286 app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Wishlist.php
  5. +2 −2 app/code/core/Mage/Adminhtml/Block/Review/Grid.php
  6. +10 −2 app/code/core/Mage/Adminhtml/Block/Sales/Order.php
  7. +1 −183 app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php
  8. +1 −1 app/code/core/Mage/Adminhtml/Block/Sales/Shipment/Grid.php
  9. +1 −1 app/code/core/Mage/Adminhtml/Block/Widget/Grid.php
  10. +1 −1 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction.php
  11. +1 −1 app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Abstract.php
  12. +10 −6 app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php
  13. +1 −4 app/code/core/Mage/Adminhtml/view/adminhtml/customer.xml
  14. +276 −46 app/code/core/Mage/Adminhtml/view/adminhtml/sales.xml
  15. +269 −1,077 app/code/core/Mage/Backend/Block/Widget/Grid.php
  16. +239 −146 app/code/core/Mage/Backend/Block/Widget/Grid/Column.php
  17. +61 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Multistore.php
  18. +1 −1 app/code/core/Mage/Backend/Block/Widget/Grid/Column/Renderer/Abstract.php
  19. +552 −0 app/code/core/Mage/Backend/Block/Widget/Grid/ColumnSet.php
  20. +13 −10 app/code/core/Mage/Backend/Block/Widget/Grid/Container.php
  21. +488 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Export.php
  22. +98 −0 app/code/core/Mage/Backend/Block/Widget/Grid/ExportInterface.php
  23. +1,252 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Extended.php
  24. +66 −15 app/code/core/Mage/Backend/Block/Widget/Grid/Massaction/Abstract.php
  25. +293 −0 app/code/core/Mage/Backend/Block/Widget/Grid/Massaction/Extended.php
  26. +2 −2 app/code/core/Mage/Backend/Block/Widget/Grid/Massaction/Item.php
  27. +96 −0 app/code/core/Mage/Backend/Model/Widget/Grid/Row/UrlGenerator.php
  28. +16 −96 app/code/core/Mage/Backend/view/adminhtml/widget/grid.phtml
  29. +113 −0 app/code/core/Mage/Backend/view/adminhtml/widget/grid/column_set.phtml
  30. +34 −0 app/code/core/Mage/Backend/view/adminhtml/widget/grid/export.phtml
  31. +232 −0 app/code/core/Mage/Backend/view/adminhtml/widget/grid/extended.phtml
  32. +4 −2 app/code/core/Mage/Backend/view/adminhtml/widget/grid/massaction.phtml
  33. +89 −0 app/code/core/Mage/Backend/view/adminhtml/widget/grid/massaction_extended.phtml
  34. +5 −1 app/code/core/Mage/Bundle/view/adminhtml/layout.xml
  35. +47 −9 app/code/core/Mage/Core/Block/Abstract.php
  36. +1 −1 app/code/core/Mage/Core/Block/Template.php
  37. +42 −0 app/code/core/Mage/Core/Model/Helper/Registry.php
  38. +213 −123 app/code/core/Mage/Core/Model/Layout.php
  39. +46 −0 app/code/core/Mage/Core/Model/Layout/Argument/Handler/Object.php
  40. +47 −0 app/code/core/Mage/Core/Model/Layout/Argument/Handler/ObjectFactory.php
  41. +51 −0 app/code/core/Mage/Core/Model/Layout/Argument/Handler/Options.php
  42. +47 −0 app/code/core/Mage/Core/Model/Layout/Argument/Handler/OptionsFactory.php
  43. +69 −0 app/code/core/Mage/Core/Model/Layout/Argument/Handler/Url.php
  44. +48 −0 app/code/core/Mage/Core/Model/Layout/Argument/Handler/UrlFactory.php
  45. +59 −0 app/code/core/Mage/Core/Model/Layout/Argument/HandlerAbstract.php
  46. +41 −0 app/code/core/Mage/Core/Model/Layout/Argument/HandlerFactoryInterface.php
  47. +42 −0 app/code/core/Mage/Core/Model/Layout/Argument/HandlerInterface.php
  48. +154 −0 app/code/core/Mage/Core/Model/Layout/Argument/Processor.php
  49. +88 −0 app/code/core/Mage/Core/Model/Layout/Argument/ProcessorConfig.php
  50. +75 −0 app/code/core/Mage/Core/Model/Layout/Argument/Updater.php
  51. +43 −0 app/code/core/Mage/Core/Model/Layout/Argument/UpdaterInterface.php
  52. +342 −0 app/code/core/Mage/Core/Model/Layout/ScheduledStructure.php
  53. +187 −0 app/code/core/Mage/Core/Model/Layout/Translator.php
  54. +41 −0 app/code/core/Mage/Core/Model/Option/ArrayInterface.php
  55. +5 −1 app/code/core/Mage/Downloadable/view/adminhtml/layout.xml
  56. +2 −2 app/code/core/Mage/ImportExport/Block/Adminhtml/Export/Filter.php
  57. +1 −0 app/code/core/Mage/Review/Model/Resource/Review/Product/Collection.php
  58. +2 −2 app/code/core/Mage/Sales/Block/Adminhtml/Billing/Agreement/View/Tab/Info.php
  59. +3 −45 app/code/core/Mage/Sales/Block/Adminhtml/Billing/Agreement/View/Tab/Orders.php
  60. +1 −1 app/code/core/Mage/Sales/Block/Adminhtml/Billing/Agreement/View/Tabs.php
  61. +2 −2 app/code/core/Mage/Sales/Block/Adminhtml/Customer/Edit/Tab/Agreement.php
  62. +74 −0 app/code/core/Mage/Sales/Model/Billing/Agreement/OrdersUpdater.php
  63. +57 −0 app/code/core/Mage/Sales/Model/Order/Grid/Massaction/ItemsUpdater.php
  64. +48 −0 app/code/core/Mage/Sales/Model/Order/Grid/Row/UrlGenerator.php
  65. +1 −1 app/code/core/Mage/Sales/Model/Order/Pdf/Shipment.php
  66. +46 −0 app/code/core/Mage/Sales/Model/Resource/Order/Grid/StatusesArray.php
  67. +3 −3 app/code/core/Mage/Sales/locale/de_DE/Mage_Sales.csv
  68. +3 −3 app/code/core/Mage/Sales/locale/en_US/Mage_Sales.csv
  69. +3 −3 app/code/core/Mage/Sales/locale/es_ES/Mage_Sales.csv
  70. +3 −3 app/code/core/Mage/Sales/locale/fr_FR/Mage_Sales.csv
  71. +3 −3 app/code/core/Mage/Sales/locale/nl_NL/Mage_Sales.csv
  72. +3 −3 app/code/core/Mage/Sales/locale/pt_BR/Mage_Sales.csv
  73. +3 −3 app/code/core/Mage/Sales/locale/zh_CN/Mage_Sales.csv
  74. +1 −1 app/code/core/Mage/User/Block/Role/Grid.php
  75. +1 −1 app/code/core/Mage/User/Block/Role/Grid/User.php
  76. +1 −1 app/code/core/Mage/User/Block/User/Edit/Tab/Roles.php
  77. +1 −1 app/code/core/Mage/User/Block/User/Grid.php
  78. +27 −21 app/code/core/Mage/Wishlist/Model/Resource/Item/Collection.php
  79. +101 −0 app/code/core/Mage/Wishlist/Model/Resource/Item/Collection/Grid.php
  80. +7 −0 app/code/core/Mage/Wishlist/etc/config.xml
  81. +3 −0 app/code/core/Mage/Wishlist/locale/pt_BR/Mage_Wishlist.csv
  82. +4 −3 ...ge/{Adminhtml/view/adminhtml/customer → Wishlist/view/adminhtml/customer/edit}/tab/wishlist.phtml
  83. +138 −0 app/code/core/Mage/Wishlist/view/adminhtml/layout.xml
  84. +64 −0 dev/tests/integration/testsuite/Mage/Backend/Block/Widget/Grid/ColumnSetTest.php
  85. +80 −0 dev/tests/integration/testsuite/Mage/Backend/Block/Widget/Grid/ExtendedTest.php
  86. +179 −0 dev/tests/integration/testsuite/Mage/Backend/Block/Widget/Grid/MassactionTest.php
  87. +70 −0 dev/tests/integration/testsuite/Mage/Backend/Block/Widget/GridTest.php
  88. +91 −0 ...gration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/Mage_Backend/layout.xml
  89. BIN ...estsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/skin/default/images/grid-cal.gif
  90. BIN ...ite/Mage/Backend/Block/_files/design/adminhtml/test/default/skin/default/images/grid_sort_asc.gif
  91. BIN ...te/Mage/Backend/Block/_files/design/adminhtml/test/default/skin/default/images/grid_sort_desc.gif
  92. BIN ...tsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/skin/default/images/grid_th_bg.gif
  93. BIN ...age/Backend/Block/_files/design/adminhtml/test/default/skin/default/images/grid_th_onclick_bg.gif
  94. BIN .../Mage/Backend/Block/_files/design/adminhtml/test/default/skin/default/images/pager_arrow_left.gif
  95. BIN ...e/Backend/Block/_files/design/adminhtml/test/default/skin/default/images/pager_arrow_left_off.gif
  96. BIN ...Mage/Backend/Block/_files/design/adminhtml/test/default/skin/default/images/pager_arrow_right.gif
  97. BIN .../Backend/Block/_files/design/adminhtml/test/default/skin/default/images/pager_arrow_right_off.gif
  98. +38 −0 dev/tests/integration/testsuite/Mage/Backend/Block/_files/design/adminhtml/test/default/theme.xml
  99. +1 −1 dev/tests/integration/testsuite/Mage/Catalog/_files/product_special_price.php
  100. +5 −4 dev/tests/integration/testsuite/Mage/Catalog/_files/products.php
  101. +62 −0 dev/tests/integration/testsuite/Mage/Checkout/_files/quote_with_bundle_product.php
  102. +7 −2 ...n/testsuite/Mage/Checkout/_files/{product_configurable.php → quote_with_configurable_product.php}
  103. +8 −1 ...n/testsuite/Mage/Checkout/_files/{product_downloadable.php → quote_with_downloadable_product.php}
  104. +7 −2 dev/tests/integration/testsuite/Mage/Checkout/_files/{product.php → quote_with_simple_product.php}
  105. +63 −0 dev/tests/integration/testsuite/Mage/Checkout/_files/quote_with_simple_product_and_custom_option.php
  106. +137 −48 dev/tests/integration/testsuite/Mage/Checkout/controllers/CartControllerTest.php
  107. +49 −0 dev/tests/integration/testsuite/Mage/Core/Model/LayoutArgumentObjectUpdater.php
  108. +44 −0 dev/tests/integration/testsuite/Mage/Core/Model/LayoutArgumentSimpleUpdater.php
  109. +98 −0 dev/tests/integration/testsuite/Mage/Core/Model/LayoutArgumentTest.php
  110. +16 −55 dev/tests/integration/testsuite/Mage/Core/Model/LayoutTest.php
  111. +61 −0 dev/tests/integration/testsuite/Mage/Core/Model/LayoutTestBase.php
  112. +129 −0 ...ts/integration/testsuite/Mage/Core/Model/_files/design/frontend/test/default/Mage_Core/layout.xml
  113. +1 −7 dev/tests/integration/testsuite/Mage/Review/Model/Resource/Review/Product/CollectionTest.php
  114. +4 −0 dev/tests/static/testsuite/Php/_files/whitelist/core.txt
  115. +1 −1 dev/tests/static/testsuite/Utility/Classes.php
  116. +57 −0 dev/tests/unit/testsuite/Mage/Backend/Block/Widget/Grid/Column/MultistoreTest.php
  117. +120 −0 dev/tests/unit/testsuite/Mage/Backend/Block/Widget/Grid/ColumnSetTest.php
  118. +363 −0 dev/tests/unit/testsuite/Mage/Backend/Block/Widget/Grid/ColumnTest.php
  119. +240 −0 dev/tests/unit/testsuite/Mage/Backend/Block/Widget/Grid/MassactionTest.php
  120. +58 −0 dev/tests/unit/testsuite/Mage/Backend/Model/Widget/Grid/Row/UrlGeneratorTest.php
  121. +61 −0 dev/tests/unit/testsuite/Mage/Core/Model/Layout/Argument/Handler/ObjectTest.php
  122. +80 −0 dev/tests/unit/testsuite/Mage/Core/Model/Layout/Argument/Handler/OptionsTest.php
  123. +103 −0 dev/tests/unit/testsuite/Mage/Core/Model/Layout/Argument/Handler/UrlTest.php
  124. +66 −0 dev/tests/unit/testsuite/Mage/Core/Model/Layout/Argument/HandlerAbstractTest.php
  125. +113 −0 dev/tests/unit/testsuite/Mage/Core/Model/Layout/Argument/ProcessorConfigTest.php
  126. +195 −0 dev/tests/unit/testsuite/Mage/Core/Model/Layout/Argument/ProcessorTest.php
  127. +109 −0 dev/tests/unit/testsuite/Mage/Core/Model/Layout/Argument/UpdaterTest.php
  128. +374 −0 dev/tests/unit/testsuite/Mage/Core/Model/Layout/ScheduledStructureTest.php
  129. +222 −0 dev/tests/unit/testsuite/Mage/Core/Model/Layout/TranslatorTest.php
  130. +118 −0 dev/tests/unit/testsuite/Mage/Sales/Model/Billing/Agreement/OrdersUpdaterTest.php
  131. +23 −0 dev/tests/unit/testsuite/Varien/Simplexml/ElementTest.php
  132. +43 −0 dev/tests/unit/testsuite/Varien/Simplexml/_files/mixed_data.xml
  133. +1 −1 lib/Magento/Acl/Config/Reader.php
  134. +6 −1 lib/Varien/Simplexml/Element.php
  135. +7 −0 pub/.htaccess
View
@@ -1,3 +1,26 @@
+Update as of 10/16/2012
+======================
+* Introduced block arguments to the layout syntax:
+ * Introduced the "object" block argument type to specify a grid data source
+ * Introduced the "options" block argument type to accommodate key-value pairs
+ * Introduced the "URL" block argument type to represent a URL with parameters
+ * Introduced block argument updaters for the block arguments, which allow to customize the original grid arguments
+ * Implemented extraction of translatable strings from block arguments in layout by the Translation Tool
+* Declared the Customer Wishlist and Sales Order grids through the layout instead of the PHP classes
+* Implemented the block `Mage_Backend_Block_Widget_Grid_Massaction` to encapsulate grid mass actions
+* Moved grid columns and mass action management from the base grid `Mage_Backend_Block_Widget_Grid` to the `Mage_Backend_Block_Widget_Grid_Extended`
+* Introduced the column set block `Mage_Backend_Block_Widget_Grid_ColumnSet` responsible for grouping columns in a grid
+* Updated the grid rendering template to render a column set instead of rendering columns
+* Eliminated dependency between the grid column block and parent blocks
+* Denied the public access to the `pub/cron.php`
+* Fixes:
+ * Fixed the broken Billing Agreement View page
+ * Fixed absence of the Default and Minimal attribute sets in the Manage Attribute Sets grid, if the total number of records is 22 and the view of 20 rows per page is chosen
+ * Fixed typos on the Sales Order page
+ * Fixed typos on the Sales Order's Packing Slips printed to PDF
+ * Fixed preserving selected rows after searching in the Sales Order grid
+ * Fixed "column not found" SQL error while sorting by the "Product Name" in the Catalog Pending Reviews grid
+
Update as of 10/11/2012
======================
* Removed unused `Mage_DesignEditor_Model_History_Compact_Diff` class
@@ -53,16 +53,6 @@ protected function _prepareCollection()
}
/**
- * Add name and description to collection elements
- */
- protected function _afterLoadCollection()
- {
- foreach ($this->_collection as $item) {
- }
- return $this;
- }
-
- /**
* Prepare grid columns
*/
protected function _prepareColumns()
@@ -38,7 +38,7 @@ public function __construct()
{
parent::__construct();
$this->setId('setGrid');
- $this->setDefaultSort('set_id');
+ $this->setDefaultSort('set_name');
$this->setDefaultDir('ASC');
$this->setSaveParametersInSession(true);
}
@@ -1,286 +0,0 @@
-<?php
-/**
- * Magento
- *
- * NOTICE OF LICENSE
- *
- * This source file is subject to the Open Software License (OSL 3.0)
- * that is bundled with this package in the file LICENSE.txt.
- * It is also available through the world-wide-web at this URL:
- * http://opensource.org/licenses/osl-3.0.php
- * If you did not receive a copy of the license and are unable to
- * obtain it through the world-wide-web, please send an email
- * to license@magentocommerce.com so we can send you a copy immediately.
- *
- * DISCLAIMER
- *
- * Do not edit or add to this file if you wish to upgrade Magento to newer
- * versions in the future. If you wish to customize Magento for your
- * needs please refer to http://www.magentocommerce.com for more information.
- *
- * @category Mage
- * @package Mage_Adminhtml
- * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- */
-
-
-/**
- * Adminhtml customer orders grid block
- *
- * @category Mage
- * @package Mage_Adminhtml
- * @author Magento Core Team <core@magentocommerce.com>
- */
-class Mage_Adminhtml_Block_Customer_Edit_Tab_Wishlist extends Mage_Adminhtml_Block_Widget_Grid
-{
- /**
- * Default sort field
- *
- * @var string
- */
-
- protected $_defaultSort = 'added_at';
-
- /**
- * Parent template name
- *
- * @var string
- */
- protected $_parentTemplate;
-
- /**
- * List of helpers to show options for product cells
- */
- protected $_productHelpers = array();
-
- /**
- * Initialize Grid
- *
- */
- public function __construct()
- {
- parent::__construct();
- $this->setId('wishlistGrid');
- $this->setUseAjax(true);
- $this->_parentTemplate = $this->getTemplate();
- $this->setTemplate('Mage_Adminhtml::customer/tab/wishlist.phtml');
- $this->setEmptyText(Mage::helper('Mage_Customer_Helper_Data')->__('No Items Found'));
- $this->addProductConfigurationHelper('default', 'Mage_Catalog_Helper_Product_Configuration');
- }
-
- /**
- * Retrieve current customer object
- *
- * @return Mage_Customer_Model_Customer
- */
- protected function _getCustomer()
- {
- return Mage::registry('current_customer');
- }
-
- /**
- * Create customer wishlist item collection
- *
- * @return Mage_Wishlist_Model_Resource_Item_Collection
- */
- protected function _createCollection()
- {
- return Mage::getModel('Mage_Wishlist_Model_Item')->getCollection();
- }
-
- /**
- * Prepare customer wishlist product collection
- *
- * @return Mage_Adminhtml_Block_Customer_Edit_Tab_Wishlist
- */
- protected function _prepareCollection()
- {
- $collection = $this->_createCollection()->addCustomerIdFilter($this->_getCustomer()->getId())
- ->resetSortOrder()
- ->addDaysInWishlist()
- ->addStoreData();
- $this->setCollection($collection);
-
- return parent::_prepareCollection();
- }
-
- /**
- * Prepare Grid columns
- *
- * @return Mage_Adminhtml_Block_Customer_Edit_Tab_Wishlist
- */
- protected function _prepareColumns()
- {
- $this->addColumn('product_name', array(
- 'header' => Mage::helper('Mage_Catalog_Helper_Data')->__('Product name'),
- 'index' => 'product_name',
- 'renderer' => 'Mage_Adminhtml_Block_Customer_Edit_Tab_View_Grid_Renderer_Item'
- ));
-
- $this->addColumn('description', array(
- 'header' => Mage::helper('Mage_Wishlist_Helper_Data')->__('User description'),
- 'index' => 'description',
- 'renderer' => 'Mage_Adminhtml_Block_Customer_Edit_Tab_Wishlist_Grid_Renderer_Description'
- ));
-
- $this->addColumn('qty', array(
- 'header' => Mage::helper('Mage_Catalog_Helper_Data')->__('Qty'),
- 'index' => 'qty',
- 'type' => 'number',
- 'width' => '60px'
- ));
-
- if (!Mage::app()->isSingleStoreMode()) {
- $this->addColumn('store', array(
- 'header' => Mage::helper('Mage_Wishlist_Helper_Data')->__('Added From'),
- 'index' => 'store_id',
- 'type' => 'store',
- 'width' => '160px'
- ));
- }
-
- $this->addColumn('added_at', array(
- 'header' => Mage::helper('Mage_Wishlist_Helper_Data')->__('Date Added'),
- 'index' => 'added_at',
- 'gmtoffset' => true,
- 'type' => 'date'
- ));
-
- $this->addColumn('days', array(
- 'header' => Mage::helper('Mage_Wishlist_Helper_Data')->__('Days in Wishlist'),
- 'index' => 'days_in_wishlist',
- 'type' => 'number'
- ));
-
- $this->addColumn('action', array(
- 'header' => Mage::helper('Mage_Customer_Helper_Data')->__('Action'),
- 'index' => 'wishlist_item_id',
- 'renderer' => 'Mage_Adminhtml_Block_Customer_Grid_Renderer_Multiaction',
- 'filter' => false,
- 'sortable' => false,
- 'actions' => array(
- array(
- 'caption' => Mage::helper('Mage_Customer_Helper_Data')->__('Configure'),
- 'url' => 'javascript:void(0)',
- 'process' => 'configurable',
- 'control_object' => 'wishlistControl'
- ),
- array(
- 'caption' => Mage::helper('Mage_Customer_Helper_Data')->__('Delete'),
- 'url' => '#',
- 'onclick' => 'return wishlistControl.removeItem($wishlist_item_id);'
- )
- )
- ));
-
- return parent::_prepareColumns();
- }
-
- /**
- * Retrieve Grid URL
- *
- * @return string
- */
- public function getGridUrl()
- {
- return $this->getUrl('*/*/wishlist', array('_current'=>true));
- }
-
- /**
- * Add column filter to collection
- *
- * @param Mage_Adminhtml_Block_Widget_Grid_Column $column
- * @return Mage_Adminhtml_Block_Customer_Edit_Tab_Wishlist
- */
- protected function _addColumnFilterToCollection($column)
- {
- /* @var $collection Mage_Wishlist_Model_Resource_Item_Collection */
- $collection = $this->getCollection();
- $value = $column->getFilter()->getValue();
- if ($collection && $value) {
- switch ($column->getId()) {
- case 'product_name':
- $collection->addProductNameFilter($value);
- break;
- case 'store':
- $collection->addStoreFilter($value);
- break;
- case 'days':
- $collection->addDaysFilter($value);
- break;
- default:
- $collection->addFieldToFilter($column->getIndex(), $column->getFilter()->getCondition());
- break;
- }
- }
- return $this;
- }
-
- /**
- * Sets sorting order by some column
- *
- * @param Mage_Adminhtml_Block_Widget_Grid_Column $column
- * @return Mage_Adminhtml_Block_Customer_Edit_Tab_Wishlist
- */
- protected function _setCollectionOrder($column)
- {
- $collection = $this->getCollection();
- if ($collection) {
- switch ($column->getId()) {
- case 'product_name':
- $collection->setOrderByProductName($column->getDir());
- break;
- default:
- parent::_setCollectionOrder($column);
- break;
- }
- }
- return $this;
- }
-
- /**
- * Retrieve Grid Parent Block HTML
- *
- * @return string
- */
- public function getGridParentHtml()
- {
- $templateName = Mage::getDesign()->getFilename($this->_parentTemplate, array('_relative' => true));
- return $this->fetchView($templateName);
- }
-
- /**
- * Retrieve Row click URL
- *
- * @return string
- */
- public function getRowUrl($row)
- {
- return $this->getUrl('*/catalog_product/edit', array('id' => $row->getProductId()));
- }
-
- /**
- * Adds product type helper depended on product type (used to show options in item cell)
- *
- * @param string $productType
- * @param string $helperName
- *
- * @return Mage_Adminhtml_Block_Customer_Edit_Tab_Wishlist
- */
- public function addProductConfigurationHelper($productType, $helperName)
- {
- $this->_productHelpers[$productType] = $helperName;
- return $this;
- }
-
- /**
- * Returns array of product configuration helpers
- *
- * @return array
- */
- public function getProductConfigurationHelpers()
- {
- return $this->_productHelpers;
- }
-}
@@ -37,7 +37,7 @@
* @package Mage_Adminhtml
* @author Magento Core Team <core@magentocommerce.com>
*/
-class Mage_Adminhtml_Block_Review_Grid extends Mage_Backend_Block_Widget_Grid
+class Mage_Adminhtml_Block_Review_Grid extends Mage_Backend_Block_Widget_Grid_Extended
{
/**
* Initialize grid
@@ -320,4 +320,4 @@ public function getGridUrl()
return $this->getCurrentUrl();
}
}
-}
+}
@@ -33,9 +33,12 @@
*/
class Mage_Adminhtml_Block_Sales_Order extends Mage_Adminhtml_Block_Widget_Grid_Container
{
-
- public function __construct()
+ /**
+ * @param array $data
+ */
+ public function __construct(array $data = array())
{
+
$this->_controller = 'sales_order';
$this->_headerText = Mage::helper('Mage_Sales_Helper_Data')->__('Orders');
$this->_addButtonLabel = Mage::helper('Mage_Sales_Helper_Data')->__('Create New Order');
@@ -45,6 +48,11 @@ public function __construct()
}
}
+ /**
+ * Retrieve url for order creation
+ *
+ * @return string
+ */
public function getCreateUrl()
{
return $this->getUrl('*/sales_order_create/start');
Oops, something went wrong.

0 comments on commit 784be09

Please sign in to comment.