Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

2.0.0.0-dev37

* Refactored a variety of grids in backend (admin) to make them configurable through layout, rather than hard-coded. The following classes were affected (converted): `Mage_User_Block_User_Grid`, `Mage_User_Block_Role_Grid`, `Mage_Adminhtml_Block_System_Design_Grid`, `Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Grid`, `Mage_Adminhtml_Block_Newsletter_Problem_Grid`, `Mage_Adminhtml_Block_Backup_Grid`, `Mage_Adminhtml_Block_Tax_Rate_Grid`, `Mage_Adminhtml_Block_System_Store_Grid`, `Mage_Adminhtml_Block_System_Email_Template_Grid`, `Mage_Adminhtml_Block_Sitemap_Grid`, `Mage_Adminhtml_Block_Catalog_Search_Grid`, `Mage_Adminhtml_Block_Urlrewrite_Grid`, `Mage_Adminhtml_Block_System_Variable_Grid`, `Mage_Adminhtml_Block_Report_Review_Customer_Grid`, `Mage_Adminhtml_Block_Report_Review_Product_Grid`
* Modified behavior of configuration merging. Each config file can be separately validated against DOM schema.
* Moved `Mage_Adminhtml_Utility_Controller` to `Backend` and changed all child classes
* Changes in Profiler system:
  * Created separate component for handling Profiler Driver selection logic
  * Extended `Magento_Profiler::start()` calls with tags as second argument
* Bug fix - Added additional validation into `Mage_Adminhtml_Catalog_CategoryController` to prevent saving new category with any id using firebug
  • Loading branch information...
commit fee89fecad93a1f182550c1df5946eea16338f11 1 parent ca25f65
@mage2-team mage2-team authored
Showing with 3,913 additions and 2,113 deletions.
  1. +10 −0 CHANGELOG.markdown
  2. +2 −2 app/Mage.php
  3. +15 −17 app/bootstrap.php
  4. +1 −1  app/code/community/Phoenix/Moneybookers/etc/adminhtml/system.xml
  5. +0 −1  app/code/core/Mage/Adminhtml/Block/Backup.php
  6. +0 −142 app/code/core/Mage/Adminhtml/Block/Backup/Grid.php
  7. +0 −78 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Grid.php
  8. +0 −178 app/code/core/Mage/Adminhtml/Block/Catalog/Search/Grid.php
  9. +0 −4 app/code/core/Mage/Adminhtml/Block/Newsletter/Problem.php
  10. +0 −102 app/code/core/Mage/Adminhtml/Block/Newsletter/Problem/Grid.php
  11. +0 −92 app/code/core/Mage/Adminhtml/Block/Report/Review/Customer/Grid.php
  12. +0 −119 app/code/core/Mage/Adminhtml/Block/Report/Review/Product/Grid.php
  13. +0 −114 app/code/core/Mage/Adminhtml/Block/Sitemap/Grid.php
  14. +0 −4 app/code/core/Mage/Adminhtml/Block/System/Design.php
  15. +0 −127 app/code/core/Mage/Adminhtml/Block/System/Design/Grid.php
  16. +1 −4 app/code/core/Mage/Adminhtml/Block/System/Email/Template.php
  17. +0 −125 app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid.php
  18. +0 −84 app/code/core/Mage/Adminhtml/Block/System/Store/Grid.php
  19. +0 −97 app/code/core/Mage/Adminhtml/Block/System/Variable/Grid.php
  20. +0 −104 app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid.php
  21. +0 −125 app/code/core/Mage/Adminhtml/Block/Urlrewrite/Grid.php
  22. +60 −0 app/code/core/Mage/Adminhtml/Model/UrlRewriteOptions.php
  23. +3 −0  app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php
  24. +4 −12 app/code/core/Mage/Adminhtml/controllers/Catalog/Product/SetController.php
  25. +3 −4 app/code/core/Mage/Adminhtml/controllers/Catalog/SearchController.php
  26. +2 −6 app/code/core/Mage/Adminhtml/controllers/Newsletter/ProblemController.php
  27. +34 −31 app/code/core/Mage/Adminhtml/controllers/Report/ReviewController.php
  28. +2 −4 app/code/core/Mage/Adminhtml/controllers/SitemapController.php
  29. +2 −3 app/code/core/Mage/Adminhtml/controllers/System/BackupController.php
  30. +2 −5 app/code/core/Mage/Adminhtml/controllers/System/DesignController.php
  31. +2 −5 app/code/core/Mage/Adminhtml/controllers/System/Email/TemplateController.php
  32. +0 −1  app/code/core/Mage/Adminhtml/controllers/System/StoreController.php
  33. +2 −3 app/code/core/Mage/Adminhtml/controllers/System/VariableController.php
  34. +9 −19 app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php
  35. +0 −3  app/code/core/Mage/Adminhtml/controllers/UrlrewriteController.php
  36. +18 −3 app/code/core/Mage/Adminhtml/etc/config.xml
  37. +139 −0 app/code/core/Mage/Adminhtml/view/adminhtml/backup.xml
  38. +1 −0  app/code/core/Mage/Adminhtml/view/adminhtml/backup/list.phtml
  39. +40 −0 app/code/core/Mage/Adminhtml/view/adminhtml/catalog.xml
  40. +3 −0  app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/set/toolbar/main.phtml
  41. +83 −0 app/code/core/Mage/Adminhtml/view/adminhtml/newsletter.xml
  42. +107 −0 app/code/core/Mage/Adminhtml/view/adminhtml/system/design/design.xml
  43. +123 −0 app/code/core/Mage/Adminhtml/view/adminhtml/system/email/template.xml
  44. +80 −0 app/code/core/Mage/Adminhtml/view/adminhtml/system/store/store.xml
  45. +105 −0 app/code/core/Mage/Adminhtml/view/adminhtml/tax.xml
  46. +2 −1  app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/rate/add.phtml
  47. +138 −0 app/code/core/Mage/Adminhtml/view/adminhtml/urlrewrite.xml
  48. +78 −0 app/code/core/Mage/Adminhtml/view/adminhtml/variable.xml
  49. +2 −2 app/code/core/Mage/Backend/etc/adminhtml/system.xml
  50. +54 −0 app/code/core/Mage/Backup/Block/Adminhtml/Grid/Column/Renderer/Download.php
  51. +45 −0 app/code/core/Mage/Backup/Block/Adminhtml/Grid/Column/Rollback.php
  52. +58 −0 app/code/core/Mage/Backup/Model/Grid/Options.php
  53. +2 −2 app/code/core/Mage/Captcha/etc/adminhtml/system.xml
  54. +2 −2 app/code/core/Mage/Catalog/Model/Category.php
  55. +3 −3 app/code/core/Mage/Catalog/Model/Product/Type/Configurable.php
  56. +4 −4 app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php
  57. +1 −1  app/code/core/Mage/Catalog/etc/adminhtml/system.xml
  58. +1 −1  app/code/core/Mage/CatalogInventory/etc/adminhtml/system.xml
  59. +62 −0 app/code/core/Mage/CatalogSearch/Model/Terms/Grid/OptionsArray.php
  60. +7 −0 app/code/core/Mage/CatalogSearch/etc/config.xml
  61. +158 −0 app/code/core/Mage/CatalogSearch/view/adminhtml/layout.xml
  62. +2 −1  app/code/core/Mage/Core/Block/Template.php
  63. +1 −1  app/code/core/Mage/Core/Model/App.php
  64. +2 −1  app/code/core/Mage/Core/Model/App/Area.php
  65. +3 −2 app/code/core/Mage/Core/Model/Config.php
  66. +3 −4 app/code/core/Mage/Core/Model/Layout/Argument/Handler/Url.php
  67. +11 −4 app/code/core/Mage/Core/Model/Resource/Website/Collection.php
  68. +47 −0 app/code/core/Mage/Core/Model/Resource/Website/Grid/Collection.php
  69. +1 −1  app/code/core/Mage/CurrencySymbol/Model/System/Currencysymbol.php
  70. +2 −2 app/code/core/Mage/Customer/etc/adminhtml/system.xml
  71. +4 −4 app/code/core/Mage/Directory/Block/Data.php
  72. +1 −1  app/code/core/Mage/Directory/Helper/Data.php
  73. +1 −1  app/code/core/Mage/Directory/etc/adminhtml/system.xml
  74. +6 −5 app/code/core/Mage/Eav/Model/Config.php
  75. +64 −0 app/code/core/Mage/Eav/Model/Resource/Entity/Attribute/Grid/Collection.php
  76. +2 −2 app/code/core/Mage/GoogleCheckout/etc/adminhtml/system.xml
  77. +49 −0 app/code/core/Mage/Newsletter/Model/Resource/Grid/Collection.php
  78. +21 −21 app/code/core/Mage/Ogone/etc/adminhtml/system.xml
  79. +1 −1  app/code/core/Mage/Paygate/etc/adminhtml/system.xml
  80. +1 −1  app/code/core/Mage/Payment/view/adminhtml/form/cashondelivery.phtml
  81. +1 −1  app/code/core/Mage/Payment/view/frontend/form/cashondelivery.phtml
  82. +27 −27 app/code/core/Mage/Paypal/etc/adminhtml/system.xml
  83. +13 −1 app/code/core/Mage/Reports/Model/Resource/Review/Customer/Collection.php
  84. +12 −1 app/code/core/Mage/Reports/Model/Resource/Review/Product/Collection.php
  85. +206 −0 app/code/core/Mage/Reports/view/adminhtml/layout.xml
  86. +1 −1  app/code/core/Mage/Sales/Model/Resource/Quote/Item/Collection.php
  87. +2 −2 app/code/core/Mage/Sales/etc/adminhtml/system.xml
  88. +7 −0 app/code/core/Mage/Sitemap/etc/config.xml
  89. +109 −0 app/code/core/Mage/Sitemap/view/adminhtml/layout.xml
  90. +48 −0 app/code/core/Mage/Tax/Model/Resource/Calculation/Grid/Collection.php
  91. +1 −1  app/code/core/Mage/Theme/Block/Adminhtml/System/Design/Theme/Grid.php
  92. +0 −82 app/code/core/Mage/User/Block/Role/Grid.php
  93. +0 −107 app/code/core/Mage/User/Block/User/Grid.php
  94. +48 −0 app/code/core/Mage/User/Model/Resource/Role/Grid/Collection.php
  95. +14 −21 .../Mage/User/Block/Role/GridTest.php → app/code/core/Mage/User/Model/Resource/User/Locked/Collection.php
  96. +62 −0 app/code/core/Mage/User/Model/Statuses.php
  97. +1 −1  app/code/core/Mage/User/controllers/Adminhtml/User/RoleController.php
  98. +1 −1  app/code/core/Mage/User/controllers/Adminhtml/UserController.php
  99. +134 −8 app/code/core/Mage/User/view/adminhtml/layout.xml
  100. +1 −1  app/code/core/Mage/Wishlist/Model/Resource/Item/Collection.php
  101. +1 −0  dev/build/build.properties
  102. +1 −0  dev/build/build.xml
  103. +3 −0  dev/build/publication/extruder/common.txt
  104. +1 −0  dev/build/publication/sanity/ce.xml
  105. +1 −0  dev/build/publication/sanity/ee.xml
  106. +4 −12 dev/tests/integration/framework/Magento/Test/Profiler/OutputBamboo.php
  107. +9 −7 dev/tests/integration/framework/bootstrap.php
  108. +4 −4 dev/tests/integration/framework/tests/unit/testsuite/Magento/Test/Profiler/OutputBambooTest.php
  109. +1 −1  dev/tests/integration/testsuite/Mage/Adminhtml/DashboardControllerTest.php
  110. +22 −1 dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/CategoryControllerTest.php
  111. +1 −1  dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/Product/Action/AttributeControllerTest.php
  112. +1 −1  dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/Product/AttributeControllerTest.php
  113. +1 −1  dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/Product/ReviewControllerTest.php
  114. +1 −1  dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Catalog/ProductControllerTest.php
  115. +1 −1  dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Customer/GroupControllerTest.php
  116. +1 −1  dev/tests/integration/testsuite/Mage/Adminhtml/controllers/CustomerControllerTest.php
  117. +1 −1  dev/tests/integration/testsuite/Mage/Adminhtml/controllers/IndexControllerTest.php
  118. +1 −1  dev/tests/integration/testsuite/Mage/Adminhtml/controllers/NewsletterQueueControllerTest.php
  119. +1 −1  dev/tests/integration/testsuite/Mage/Adminhtml/controllers/NewsletterTemplateControllerTest.php
  120. +1 −1  dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Sales/Order/CreateControllerTest.php
  121. +1 −1  dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Sales/Order/CreditmemoControllerTest.php
  122. +1 −1  dev/tests/integration/testsuite/Mage/Adminhtml/controllers/Sales/OrderControllerTest.php
  123. +1 −1  dev/tests/integration/testsuite/Mage/Adminhtml/controllers/System/DesignControllerTest.php
  124. +1 −1  dev/tests/integration/testsuite/Mage/Adminhtml/controllers/System/VariableControllerTest.php
  125. +1 −1  dev/tests/integration/testsuite/Mage/Backend/Controller/ActionAbstractTest.php
  126. +1 −1  dev/tests/integration/testsuite/Mage/Backend/Model/Config/Source/Admin/PageTest.php
  127. +3 −3 dev/tests/integration/testsuite/Mage/{Adminhtml → Backend}/Utility/Controller.php
  128. +1 −1  dev/tests/integration/testsuite/Mage/Backend/controllers/Adminhtml/System/ConfigControllerTest.php
  129. +1 −1  dev/tests/integration/testsuite/Mage/Centinel/CreateOrderTest.php
  130. +1 −1  dev/tests/integration/testsuite/Mage/Connect/controllers/Adminhtml/Extension/LocalControllerTest.php
  131. +1 −1  dev/tests/integration/testsuite/Mage/DesignEditor/controllers/Adminhtml/System/Design/EditorControllerTest.php
  132. +1 −1  dev/tests/integration/testsuite/Mage/DesignEditor/controllers/PageControllerTest.php
  133. +1 −1  ...ests/integration/testsuite/Mage/GoogleShopping/controllers/Adminhtml/GoogleShopping/ItemsControllerTest.php
  134. +1 −1  dev/tests/integration/testsuite/Mage/ImportExport/controllers/Adminhtml/ExportControllerTest.php
  135. +1 −1  dev/tests/integration/testsuite/Mage/ImportExport/controllers/Adminhtml/ImportControllerTest.php
  136. +1 −1  dev/tests/integration/testsuite/Mage/User/controllers/Adminhtml/User/RoleControllerTest.php
  137. +1 −1  dev/tests/integration/testsuite/Mage/User/controllers/Adminhtml/UserControllerTest.php
  138. +1 −1  dev/tests/integration/testsuite/Mage/Widget/controllers/Adminhtml/Widget/InstanceControllerTest.php
  139. +1 −1  dev/tests/integration/testsuite/Mage/Widget/controllers/Adminhtml/WidgetControllerTest.php
  140. +5 −3 dev/tests/integration/testsuite/Magento/Profiler/Driver/Standard/Output/CsvfileTest.php
  141. +141 −0 dev/tests/integration/testsuite/Magento/ProfilerTest.php
  142. +15 −0 dev/tests/static/testsuite/Legacy/_files/obsolete_classes.php
  143. +15 −0 dev/tests/unit/testsuite/Mage/Core/Model/Layout/Argument/Handler/UrlTest.php
  144. +0 −3  dev/tests/unit/testsuite/Magento/Config/DomTest.php
  145. +3 −1 dev/tests/unit/testsuite/Magento/Config/ViewTest.php
  146. +1 −1  dev/tests/unit/testsuite/Magento/Config/XsdTest.php
  147. +1 −4 dev/tests/unit/testsuite/Magento/Config/_files/view_invalid.xml
  148. +128 −0 dev/tests/unit/testsuite/Magento/Profiler/Driver/FactoryTest.php
  149. +68 −0 dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/Output/CsvfileTest.php
  150. +131 −0 dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/Output/FactoryTest.php
  151. +53 −0 dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/Output/FirebugTest.php
  152. +116 −5 dev/tests/unit/testsuite/Magento/Profiler/Driver/Standard/OutputAbstractTest.php
  153. +81 −24 dev/tests/unit/testsuite/Magento/Profiler/Driver/StandardTest.php
  154. +133 −3 dev/tests/unit/testsuite/Magento/ProfilerTest.php
  155. +53 −9 lib/Magento/Config/Dom.php
  156. +14 −16 .../core/Mage/Adminhtml/view/adminhtml/catalogsearch.xml → lib/Magento/Config/Dom/ValidationException.php
  157. +14 −24 lib/Magento/Config/XmlAbstract.php
  158. +111 −1 lib/Magento/Profiler.php
  159. +82 −0 lib/Magento/Profiler/Driver/Factory.php
  160. +105 −7 lib/Magento/Profiler/Driver/Standard.php
  161. +30 −11 lib/Magento/Profiler/Driver/Standard/Output/Csvfile.php
  162. +85 −0 lib/Magento/Profiler/Driver/Standard/Output/Factory.php
  163. +33 −3 lib/Magento/Profiler/Driver/Standard/Output/Firebug.php
  164. +37 −0 lib/Magento/Profiler/Driver/Standard/OutputAbstract.php
View
10 CHANGELOG.markdown
@@ -1,3 +1,13 @@
+2.0.0.0-dev37
+=============
+* Refactored a variety of grids in backend (admin) to make them configurable through layout, rather than hard-coded. The following classes were affected (converted): `Mage_User_Block_User_Grid`, `Mage_User_Block_Role_Grid`, `Mage_Adminhtml_Block_System_Design_Grid`, `Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Grid`, `Mage_Adminhtml_Block_Newsletter_Problem_Grid`, `Mage_Adminhtml_Block_Backup_Grid`, `Mage_Adminhtml_Block_Tax_Rate_Grid`, `Mage_Adminhtml_Block_System_Store_Grid`, `Mage_Adminhtml_Block_System_Email_Template_Grid`, `Mage_Adminhtml_Block_Sitemap_Grid`, `Mage_Adminhtml_Block_Catalog_Search_Grid`, `Mage_Adminhtml_Block_Urlrewrite_Grid`, `Mage_Adminhtml_Block_System_Variable_Grid`, `Mage_Adminhtml_Block_Report_Review_Customer_Grid`, `Mage_Adminhtml_Block_Report_Review_Product_Grid`
+* Modified behavior of configuration merging. Each config file can be separately validated against DOM schema.
+* Moved `Mage_Adminhtml_Utility_Controller` to `Backend` and changed all child classes
+* Changes in Profiler system:
+ * Created separate component for handling Profiler Driver selection logic
+ * Extended `Magento_Profiler::start()` calls with tags as second argument
+* Bug fix - Added additional validation into `Mage_Adminhtml_Catalog_CategoryController` to prevent saving new category with any id using firebug
+
2.0.0.0-dev36
=============
* Visual design editor refactored
View
4 app/Mage.php
@@ -170,7 +170,7 @@ public static function getVersionInfo()
'revision' => '0',
'patch' => '0',
'stability' => 'dev',
- 'number' => '36',
+ 'number' => '37',
);
}
@@ -466,7 +466,7 @@ public static function addObserver($eventName, $callback, $data = array(), $obse
*/
public static function dispatchEvent($name, array $data = array())
{
- Magento_Profiler::start('EVENT:' . $name);
+ Magento_Profiler::start('EVENT:' . $name, array('group' => 'EVENT', 'name' => $name));
$result = self::app()->dispatchEvent($name, $data);
Magento_Profiler::stop('EVENT:'.$name);
return $result;
View
32 app/bootstrap.php
@@ -96,22 +96,20 @@
Mage::initializeObjectManager($definitionsFile);
}
-$output = null;
-if (isset($_SERVER['MAGE_PROFILER'])) {
- switch ($_SERVER['MAGE_PROFILER']) {
- case 'firebug':
- $output = new Magento_Profiler_Driver_Standard_Output_Firebug();
- break;
- case 'csv':
- $output = new Magento_Profiler_Driver_Standard_Output_Csvfile(__DIR__ . '/../var/log/profiler.csv');
- break;
- default:
- $output = new Magento_Profiler_Driver_Standard_Output_Html();
- }
-}
+if (!empty($_SERVER['MAGE_PROFILER'])) {
+ $profilerConfigData = $_SERVER['MAGE_PROFILER'];
-if ($output) {
- $driver = new Magento_Profiler_Driver_Standard();
- $driver->registerOutput($output);
- Magento_Profiler::add($driver);
+ $profilerConfig = array(
+ 'baseDir' => dirname(__DIR__),
+ 'tagFilters' => array()
+ );
+
+ if (is_scalar($profilerConfigData)) {
+ $profilerConfig['driver'] = array(
+ 'output' => is_numeric($profilerConfigData) ? 'html' : $profilerConfigData
+ );
+ } elseif (is_array($profilerConfigData)) {
+ $profilerConfig = array_merge($profilerConfig, $profilerConfigData);
+ }
+ Magento_Profiler::applyConfig($profilerConfig);
}
View
2  app/code/community/Phoenix/Moneybookers/etc/adminhtml/system.xml
@@ -37,7 +37,7 @@
<label>Email Address of Your Moneybookers Account</label>
<comment>
<![CDATA[To have access to the international payment network of Moneybookers please register <a href="http://www.moneybookers.com/partners/magento/" target="_blank">here</a> for a free account if you don't have one yet.]]>
-</comment>
+ </comment>
</field>
<field id="customer_id" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Customer ID</label>
View
1  app/code/core/Mage/Adminhtml/Block/Backup.php
@@ -58,7 +58,6 @@ protected function _prepareLayout()
'onclick' => "return backup.backup('" . Mage_Backup_Helper_Data::TYPE_MEDIA . "')",
'class' => ''
));
- $this->addChild('backupsGrid', 'Mage_Adminhtml_Block_Backup_Grid');
$this->addChild('dialogs', 'Mage_Adminhtml_Block_Backup_Dialogs');
}
View
142 app/code/core/Mage/Adminhtml/Block/Backup/Grid.php
@@ -1,142 +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 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- */
-
-/**
- * Adminhtml backups grid block
- *
- * @category Mage
- * @package Mage_Adminhtml
- * @author Magento Core Team <core@magentocommerce.com>
- */
-class Mage_Adminhtml_Block_Backup_Grid extends Mage_Adminhtml_Block_Widget_Grid
-{
-
- protected function _construct()
- {
- $this->setSaveParametersInSession(true);
- $this->setId('backupsGrid');
- $this->setDefaultSort('time', 'desc');
- }
-
- /**
- * Init backups collection
- */
- protected function _prepareCollection()
- {
- $collection = Mage::getSingleton('Mage_Backup_Model_Fs_Collection');
- $this->setCollection($collection);
- return parent::_prepareCollection();
- }
-
- /**
- * Prepare mass action controls
- *
- * @return Mage_Adminhtml_Block_Backup_Grid
- */
- protected function _prepareMassaction()
- {
- $this->setMassactionIdField('id');
- $this->getMassactionBlock()->setFormFieldName('ids');
-
- $this->getMassactionBlock()->addItem('delete', array(
- 'label'=> Mage::helper('Mage_Adminhtml_Helper_Data')->__('Delete'),
- 'url' => $this->getUrl('*/*/massDelete'),
- 'confirm' => Mage::helper('Mage_Backup_Helper_Data')->__('Are you sure you want to delete the selected backup(s)?')
- ));
-
- return $this;
- }
-
- /**
- * Configuration of grid
- *
- * @return Mage_Adminhtml_Block_Backup_Grid
- */
- protected function _prepareColumns()
- {
- $url7zip = Mage::helper('Mage_Adminhtml_Helper_Data')->__('The archive can be uncompressed with <a href="%s">%s</a> on Windows systems', 'http://www.7-zip.org/', '7-Zip');
-
- $this->addColumn('time', array(
- 'header' => Mage::helper('Mage_Backup_Helper_Data')->__('Time'),
- 'index' => 'date_object',
- 'type' => 'datetime',
- 'width' => 200
- ));
-
- $this->addColumn('display_name', array(
- 'header' => Mage::helper('Mage_Backup_Helper_Data')->__('Name'),
- 'index' => 'display_name',
- 'filter' => false,
- 'sortable' => true,
- 'width' => 350
- ));
-
- $this->addColumn('size', array(
- 'header' => Mage::helper('Mage_Backup_Helper_Data')->__('Size, Bytes'),
- 'index' => 'size',
- 'type' => 'number',
- 'sortable' => true,
- 'filter' => false
- ));
-
- $this->addColumn('type', array(
- 'header' => Mage::helper('Mage_Backup_Helper_Data')->__('Type'),
- 'type' => 'options',
- 'options' => Mage::helper('Mage_Backup_Helper_Data')->getBackupTypes(),
- 'index' => 'type',
- 'width' => 300
- ));
-
- $this->addColumn('download', array(
- 'header' => Mage::helper('Mage_Backup_Helper_Data')->__('Download'),
- 'format' => '<a href="' . $this->getUrl('*/*/download', array('time' => '$time', 'type' => '$type'))
- . '">$extension</a> &nbsp; <small>('.$url7zip.')</small>',
- 'index' => 'type',
- 'sortable' => false,
- 'filter' => false
- ));
-
- if (Mage::helper('Mage_Backup_Helper_Data')->isRollbackAllowed()){
- $this->addColumn('action', array(
- 'header' => Mage::helper('Mage_Backup_Helper_Data')->__('Action'),
- 'type' => 'action',
- 'width' => '80px',
- 'filter' => false,
- 'sortable' => false,
- 'actions' => array(array(
- 'url' => '#',
- 'caption' => Mage::helper('Mage_Backup_Helper_Data')->__('Rollback'),
- 'onclick' => 'return backup.rollback(\'$type\', \'$time\');'
- )),
- 'index' => 'type',
- 'sortable' => false
- ));
- }
-
- return $this;
- }
-
-}
View
78 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Grid.php
@@ -1,78 +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 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- */
-
-/**
- * description
- *
- * @category Mage
- * @package Mage_Adminhtml
- * @author Magento Core Team <core@magentocommerce.com>
- */
-class Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Grid extends Mage_Adminhtml_Block_Widget_Grid
-{
-
- protected function _construct()
- {
- parent::_construct();
- $this->setId('setGrid');
- $this->setDefaultSort('set_name');
- $this->setDefaultDir('ASC');
- $this->setSaveParametersInSession(true);
- }
-
- protected function _prepareCollection()
- {
- $collection = Mage::getResourceModel('Mage_Eav_Model_Resource_Entity_Attribute_Set_Collection')
- ->setEntityTypeFilter(Mage::registry('entityType'));
-
- $this->setCollection($collection);
- return parent::_prepareCollection();
- }
-
- protected function _prepareColumns()
- {
- /*$this->addColumn('set_id', array(
- 'header' => Mage::helper('Mage_Catalog_Helper_Data')->__('ID'),
- 'align' => 'right',
- 'sortable' => true,
- 'width' => '50px',
- 'index' => 'attribute_set_id',
- ));*/
-
- $this->addColumn('set_name', array(
- 'header' => Mage::helper('Mage_Catalog_Helper_Data')->__('Set Name'),
- 'align' => 'left',
- 'sortable' => true,
- 'index' => 'attribute_set_name',
- ));
- }
-
- public function getRowUrl($row)
- {
- return $this->getUrl('*/*/edit', array('id'=>$row->getAttributeSetId()));
- }
-
-}
View
178 app/code/core/Mage/Adminhtml/Block/Catalog/Search/Grid.php
@@ -1,178 +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 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- */
-
-/**
- * description
- *
- * @category Mage
- * @category Mage
- * @package Mage_Adminhtml
- * @author Magento Core Team <core@magentocommerce.com>
- */
-class Mage_Adminhtml_Block_Catalog_Search_Grid extends Mage_Adminhtml_Block_Widget_Grid
-{
- /**
- * Init Grid default properties
- *
- */
- protected function _construct()
- {
- parent::_construct();
- $this->setId('catalog_search_grid');
- $this->setDefaultSort('name');
- $this->setDefaultDir('ASC');
- $this->setSaveParametersInSession(true);
- }
-
- /**
- * Prepare collection for Grid
- *
- * @return Mage_Adminhtml_Block_Catalog_Search_Grid
- */
- protected function _prepareCollection()
- {
- $collection = Mage::getModel('Mage_CatalogSearch_Model_Query')
- ->getResourceCollection();
- $this->setCollection($collection);
- return parent::_prepareCollection();
- }
-
- /**
- * Prepare Grid columns
- *
- * @return Mage_Adminhtml_Block_Catalog_Search_Grid
- */
- protected function _prepareColumns()
- {
- /*$this->addColumn('query_id', array(
- 'header' => Mage::helper('Mage_Catalog_Helper_Data')->__('ID'),
- 'width' => '50px',
- 'index' => 'query_id',
- ));*/
-
- $this->addColumn('search_query', array(
- 'header' => Mage::helper('Mage_Catalog_Helper_Data')->__('Search Query'),
- 'index' => 'query_text',
- ));
-
- if (!Mage::app()->isSingleStoreMode()) {
- $this->addColumn('store_id', array(
- 'header' => Mage::helper('Mage_Catalog_Helper_Data')->__('Store'),
- 'index' => 'store_id',
- 'type' => 'store',
- 'store_view' => true,
- 'sortable' => false
- ));
- }
-
- $this->addColumn('num_results', array(
- 'header' => Mage::helper('Mage_Catalog_Helper_Data')->__('Results'),
- 'index' => 'num_results',
- 'type' => 'number'
- ));
-
- $this->addColumn('popularity', array(
- 'header' => Mage::helper('Mage_Catalog_Helper_Data')->__('Number of Uses'),
- 'index' => 'popularity',
- 'type' => 'number'
- ));
-
- $this->addColumn('synonym_for', array(
- 'header' => Mage::helper('Mage_Catalog_Helper_Data')->__('Synonym For'),
- 'align' => 'left',
- 'index' => 'synonym_for',
- 'width' => '160px'
- ));
-
- $this->addColumn('redirect', array(
- 'header' => Mage::helper('Mage_Catalog_Helper_Data')->__('Redirect'),
- 'align' => 'left',
- 'index' => 'redirect',
- 'width' => '200px'
- ));
-
- $this->addColumn('display_in_terms', array(
- 'header'=>Mage::helper('Mage_Catalog_Helper_Data')->__('Display in Suggested Terms'),
- 'sortable'=>true,
- 'index'=>'display_in_terms',
- 'type' => 'options',
- 'width' => '100px',
- 'options' => array(
- '1' => Mage::helper('Mage_Catalog_Helper_Data')->__('Yes'),
- '0' => Mage::helper('Mage_Catalog_Helper_Data')->__('No'),
- ),
- 'align' => 'left',
- ));
- $this->addColumn('action',
- array(
- 'header' => Mage::helper('Mage_Catalog_Helper_Data')->__('Action'),
- 'width' => '100px',
- 'type' => 'action',
- 'getter' => 'getId',
- 'actions' => array(array(
- 'caption' => Mage::helper('Mage_Catalog_Helper_Data')->__('Edit'),
- 'url' => array(
- 'base'=>'*/*/edit'
- ),
- 'field' => 'id'
- )),
- 'filter' => false,
- 'sortable' => false,
- 'index' => 'catalog',
- ));
- return parent::_prepareColumns();
- }
-
- /**
- * Prepare grid massaction actions
- *
- * @return Mage_Adminhtml_Block_Catalog_Search_Grid
- */
- protected function _prepareMassaction()
- {
- $this->setMassactionIdField('query_id');
- $this->getMassactionBlock()->setFormFieldName('search');
-
- $this->getMassactionBlock()->addItem('delete', array(
- 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Delete'),
- 'url' => $this->getUrl('*/*/massDelete'),
- 'confirm' => Mage::helper('Mage_Catalog_Helper_Data')->__('Are you sure?')
- ));
-
- return parent::_prepareMassaction();
- }
-
- /**
- * Retrieve Row Click callback URL
- *
- * @return string
- */
- public function getRowUrl($row)
- {
- return $this->getUrl('*/*/edit', array('id' => $row->getId()));
- }
-
-}
View
4 app/code/core/Mage/Adminhtml/Block/Newsletter/Problem.php
@@ -49,10 +49,6 @@ protected function _construct()
protected function _prepareLayout()
{
- $this->setChild('grid',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Newsletter_Problem_Grid','newsletter.problem.grid')
- );
-
$this->setChild('deleteButton',
$this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button','del.button')
->setData(
View
102 app/code/core/Mage/Adminhtml/Block/Newsletter/Problem/Grid.php
@@ -1,102 +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 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- */
-
-/**
- * Adminhtml newsletter problem grid block
- *
- * @category Mage
- * @package Mage_Adminhtml
- * @author Magento Core Team <core@magentocommerce.com>
- */
-class Mage_Adminhtml_Block_Newsletter_Problem_Grid extends Mage_Adminhtml_Block_Widget_Grid
-{
- protected function _construct()
- {
- parent::_construct();
- $this->setId('problemGrid');
- $this->setSaveParametersInSession(true);
- $this->setMessageBlockVisibility(true);
- $this->setUseAjax(true);
- $this->setEmptyText(Mage::helper('Mage_Newsletter_Helper_Data')->__('No problems found.'));
- }
-
- protected function _prepareCollection()
- {
- $collection = Mage::getResourceModel('Mage_Newsletter_Model_Resource_Problem_Collection')
- ->addSubscriberInfo()
- ->addQueueInfo();
-
- $this->setCollection($collection);
-
- return parent::_prepareCollection();
- }
-
- protected function _prepareColumns()
- {
- $this->addColumn('checkbox', array(
- 'sortable' => false,
- 'filter' => 'Mage_Adminhtml_Block_Newsletter_Problem_Grid_Filter_Checkbox',
- 'renderer' => 'Mage_Adminhtml_Block_Newsletter_Problem_Grid_Renderer_Checkbox',
- 'width' => '20px'
- ));
-
- $this->addColumn('problem_id', array(
- 'header' => Mage::helper('Mage_Newsletter_Helper_Data')->__('ID'),
- 'index' => 'problem_id',
- 'width' => '50px'
- ));
-
- $this->addColumn('subscriber', array(
- 'header' => Mage::helper('Mage_Newsletter_Helper_Data')->__('Subscriber'),
- 'index' => 'subscriber_id',
- 'format' => '#$subscriber_id $customer_name ($subscriber_email)'
- ));
-
- $this->addColumn('queue_start', array(
- 'header' => Mage::helper('Mage_Newsletter_Helper_Data')->__('Queue Date Start'),
- 'index' => 'queue_start_at',
- 'gmtoffset' => true,
- 'type' => 'datetime'
- ));
-
- $this->addColumn('queue', array(
- 'header' => Mage::helper('Mage_Newsletter_Helper_Data')->__('Queue Subject'),
- 'index' => 'template_subject'
- ));
-
- $this->addColumn('problem_code', array(
- 'header' => Mage::helper('Mage_Newsletter_Helper_Data')->__('Error Code'),
- 'index' => 'problem_error_code',
- 'type' => 'number'
- ));
-
- $this->addColumn('problem_text', array(
- 'header' => Mage::helper('Mage_Newsletter_Helper_Data')->__('Error Text'),
- 'index' => 'problem_error_text'
- ));
- return parent::_prepareColumns();
- }
-}// Class Mage_Adminhtml_Block_Newsletter_Problem_Grid END
View
92 app/code/core/Mage/Adminhtml/Block/Report/Review/Customer/Grid.php
@@ -1,92 +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 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- */
-
-/**
- * Adminhtml reviews by customers report grid block
- *
- * @category Mage
- * @package Mage_Adminhtml
- * @author Magento Core Team <core@magentocommerce.com>
- */
-class Mage_Adminhtml_Block_Report_Review_Customer_Grid extends Mage_Adminhtml_Block_Widget_Grid
-{
-
- protected function _construct()
- {
- parent::_construct();
- $this->setId('customers_grid');
- $this->setDefaultSort('review_cnt');
- $this->setDefaultDir('desc');
- }
-
- protected function _prepareCollection()
- {
- $collection = Mage::getResourceModel('Mage_Reports_Model_Resource_Review_Customer_Collection')
- ->joinCustomers();
-
- $this->setCollection($collection);
-
- return parent::_prepareCollection();
- }
-
- protected function _prepareColumns()
- {
- $this->addColumn('customer_name', array(
- 'header' => Mage::helper('Mage_Reports_Helper_Data')->__('Customer Name'),
- 'index' => 'customer_name',
- 'default' => Mage::helper('Mage_Reports_Helper_Data')->__('Guest'),
- ));
-
- $this->addColumn('review_cnt', array(
- 'header' => Mage::helper('Mage_Reports_Helper_Data')->__('Number Of Reviews'),
- 'width' => '40px',
- 'align' => 'right',
- 'index' => 'review_cnt'
- ));
-
- $this->addColumn('action', array(
- 'header' => Mage::helper('Mage_Reports_Helper_Data')->__('Action'),
- 'width' => '100px',
- 'align' => 'center',
- 'filter' => false,
- 'sortable' => false,
- 'renderer' => 'Mage_Adminhtml_Block_Report_Grid_Column_Renderer_Customer',
- 'is_system' => true
- ));
-
- $this->setFilterVisibility(false);
-
- $this->addExportType('*/*/exportCustomerCsv', Mage::helper('Mage_Reports_Helper_Data')->__('CSV'));
- $this->addExportType('*/*/exportCustomerExcel', Mage::helper('Mage_Reports_Helper_Data')->__('Excel XML'));
-
- return parent::_prepareColumns();
- }
-
- public function getRowUrl($row)
- {
- return $this->getUrl('*/catalog_product_review', array('customerId' => $row->getCustomerId()));
- }
-}
View
119 app/code/core/Mage/Adminhtml/Block/Report/Review/Product/Grid.php
@@ -1,119 +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 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- */
-
-/**
- * Adminhtml reviews by products report grid block
- *
- * @category Mage
- * @package Mage_Adminhtml
- * @author Magento Core Team <core@magentocommerce.com>
- */
-class Mage_Adminhtml_Block_Report_Review_Product_Grid extends Mage_Adminhtml_Block_Widget_Grid
-{
-
- protected function _construct()
- {
- parent::_construct();
- $this->setId('gridProducts');
- $this->setDefaultSort('review_cnt');
- $this->setDefaultDir('desc');
- }
-
- protected function _prepareCollection()
- {
- $collection = Mage::getResourceModel('Mage_Reports_Model_Resource_Review_Product_Collection')
- ->joinReview();
-
- $this->setCollection($collection);
-
- return parent::_prepareCollection();
- }
-
- protected function _prepareColumns()
- {
-
- $this->addColumn('entity_id', array(
- 'header' =>Mage::helper('Mage_Reports_Helper_Data')->__('ID'),
- 'width' =>'50px',
- 'index' =>'entity_id'
- ));
-
- $this->addColumn('name', array(
- 'header' => Mage::helper('Mage_Reports_Helper_Data')->__('Product Name'),
- 'index' => 'name'
- ));
-
- $this->addColumn('review_cnt', array(
- 'header' =>Mage::helper('Mage_Reports_Helper_Data')->__('Number of Reviews'),
- 'width' =>'50px',
- 'align' =>'right',
- 'index' =>'review_cnt'
- ));
-
- $this->addColumn('avg_rating', array(
- 'header' =>Mage::helper('Mage_Reports_Helper_Data')->__('Avg. Rating'),
- 'width' =>'50px',
- 'align' =>'right',
- 'index' =>'avg_rating'
- ));
-
- $this->addColumn('avg_rating_approved', array(
- 'header' =>Mage::helper('Mage_Reports_Helper_Data')->__('Avg. Approved Rating'),
- 'width' =>'50px',
- 'align' =>'right',
- 'index' =>'avg_rating_approved'
- ));
-
- $this->addColumn('last_created', array(
- 'header' =>Mage::helper('Mage_Reports_Helper_Data')->__('Last Review'),
- 'width' =>'150px',
- 'index' =>'last_created',
- 'type' =>'datetime'
- ));
-
- $this->addColumn('action', array(
- 'header' => Mage::helper('Mage_Reports_Helper_Data')->__('Action'),
- 'width' => '100px',
- 'align' => 'center',
- 'filter' => false,
- 'sortable' => false,
- 'renderer' => 'Mage_Adminhtml_Block_Report_Grid_Column_Renderer_Product',
- 'is_system' => true
- ));
-
- $this->setFilterVisibility(false);
-
- $this->addExportType('*/*/exportProductCsv', Mage::helper('Mage_Reports_Helper_Data')->__('CSV'));
- $this->addExportType('*/*/exportProductExcel', Mage::helper('Mage_Reports_Helper_Data')->__('Excel XML'));
-
- return parent::_prepareColumns();
- }
-
- public function getRowUrl($row)
- {
- return $this->getUrl('*/catalog_product_review/', array('productId' => $row->getId()));
- }
-}
View
114 app/code/core/Mage/Adminhtml/Block/Sitemap/Grid.php
@@ -1,114 +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 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- */
-
-
-/**
- * Sitemaps grid
- *
- * @category Mage
- * @package Mage_Adminhtml
- */
-class Mage_Adminhtml_Block_Sitemap_Grid extends Mage_Adminhtml_Block_Widget_Grid
-{
-
- protected function _construct()
- {
- parent::_construct();
- $this->setId('sitemapGrid');
- $this->setDefaultSort('sitemap_id');
-
- }
-
- protected function _prepareCollection()
- {
- $collection = Mage::getModel('Mage_Sitemap_Model_Sitemap')->getCollection();
- /* @var $collection Mage_Sitemap_Model_Resource_Sitemap_Collection */
- $this->setCollection($collection);
- return parent::_prepareCollection();
- }
-
- protected function _prepareColumns()
- {
- $this->addColumn('sitemap_id', array(
- 'header' => Mage::helper('Mage_Sitemap_Helper_Data')->__('ID'),
- 'width' => '50px',
- 'index' => 'sitemap_id'
- ));
-
- $this->addColumn('sitemap_filename', array(
- 'header' => Mage::helper('Mage_Sitemap_Helper_Data')->__('Filename'),
- 'index' => 'sitemap_filename'
- ));
-
- $this->addColumn('sitemap_path', array(
- 'header' => Mage::helper('Mage_Sitemap_Helper_Data')->__('Path'),
- 'index' => 'sitemap_path'
- ));
-
- $this->addColumn('link', array(
- 'header' => Mage::helper('Mage_Sitemap_Helper_Data')->__('Link for Google'),
- 'index' => 'concat(sitemap_path, sitemap_filename)',
- 'renderer' => 'Mage_Adminhtml_Block_Sitemap_Grid_Renderer_Link',
- ));
-
- $this->addColumn('sitemap_time', array(
- 'header' => Mage::helper('Mage_Sitemap_Helper_Data')->__('Last Time Generated'),
- 'width' => '150px',
- 'index' => 'sitemap_time',
- 'type' => 'datetime',
- ));
-
-
- if (!Mage::app()->isSingleStoreMode()) {
- $this->addColumn('store_id', array(
- 'header' => Mage::helper('Mage_Sitemap_Helper_Data')->__('Store View'),
- 'index' => 'store_id',
- 'type' => 'store',
- ));
- }
-
- $this->addColumn('action', array(
- 'header' => Mage::helper('Mage_Sitemap_Helper_Data')->__('Action'),
- 'filter' => false,
- 'sortable' => false,
- 'width' => '100',
- 'renderer' => 'Mage_Adminhtml_Block_Sitemap_Grid_Renderer_Action'
- ));
-
- return parent::_prepareColumns();
- }
-
- /**
- * Row click url
- *
- * @return string
- */
- public function getRowUrl($row)
- {
- return $this->getUrl('*/*/edit', array('sitemap_id' => $row->getId()));
- }
-
-}
View
4 app/code/core/Mage/Adminhtml/Block/System/Design.php
@@ -37,10 +37,6 @@ protected function _prepareLayout()
'class' => 'add'
));
- $this->setChild('grid', $this->getLayout()->createBlock(
- 'Mage_Adminhtml_Block_System_Design_Grid',
- 'design.grid'
- ));
return parent::_prepareLayout();
}
}
View
127 app/code/core/Mage/Adminhtml/Block/System/Design/Grid.php
@@ -1,127 +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 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- */
-
-/**
- * Design changes grid
- *
- * @category Mage
- * @package Mage_Adminhtml
- * @author Magento Core Team <core@magentocommerce.com>
- */
-class Mage_Adminhtml_Block_System_Design_Grid extends Mage_Adminhtml_Block_Widget_Grid
-{
-
- /**
- * Class constructor
- */
- protected function _construct()
- {
- parent::_construct();
- $this->setId('designGrid');
- $this->setSaveParametersInSession(true);
- $this->setUseAjax(true);
- }
-
- /**
- * Prepare grid data collection
- *
- * @return Mage_Adminhtml_Block_System_Design_Grid
- */
- protected function _prepareCollection()
- {
- $storeId = (int) $this->getRequest()->getParam('store', 0);
-
- $collection = Mage::getResourceModel('Mage_Core_Model_Resource_Design_Collection');
-
- $this->setCollection($collection);
- parent::_prepareCollection();
- return $this;
- }
-
- /**
- * Define grid columns
- *
- * @return Mage_Adminhtml_Block_System_Design_Grid
- */
- protected function _prepareColumns()
- {
- if (!Mage::app()->isSingleStoreMode()) {
- $this->addColumn('store_id', array(
- 'header' => Mage::helper('Mage_Catalog_Helper_Data')->__('Store'),
- 'width' => '100px',
- 'type' => 'store',
- 'store_view' => true,
- 'sortable' => false,
- 'index' => 'store_id',
- ));
- }
-
- $this->addColumn('package', array(
- 'header' => Mage::helper('Mage_Catalog_Helper_Data')->__('Design'),
- 'width' => '150px',
- 'index' => 'design',
- ));
- $this->addColumn('date_from', array(
- 'header' => Mage::helper('Mage_CatalogRule_Helper_Data')->__('Date From'),
- 'align' => 'left',
- 'width' => '100px',
- 'type' => 'date',
- 'index' => 'date_from',
- ));
-
- $this->addColumn('date_to', array(
- 'header' => Mage::helper('Mage_CatalogRule_Helper_Data')->__('Date To'),
- 'align' => 'left',
- 'width' => '100px',
- 'type' => 'date',
- 'index' => 'date_to',
- ));
-
- return parent::_prepareColumns();
- }
-
- /**
- * Prepare row click url
- *
- * @param Varien_Object $row
- * @return string
- */
- public function getRowUrl($row)
- {
- return $this->getUrl('*/*/edit', array('id' => $row->getId()));
- }
-
- /**
- * Prepare grid url
- *
- * @return string
- */
- public function getGridUrl()
- {
- return $this->getUrl('*/*/grid', array('_current' => true));
- }
-
-}
View
5 app/code/core/Mage/Adminhtml/Block/System/Email/Template.php
@@ -49,10 +49,7 @@ protected function _prepareLayout()
'onclick' => "window.location='" . $this->getCreateUrl() . "'",
'class' => 'add'
));
- $this->setChild(
- 'grid',
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_System_Email_Template_Grid', 'email.template.grid')
- );
+
return parent::_prepareLayout();
}
View
125 app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid.php
@@ -1,125 +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 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- */
-
-/**
- * Adminhtml system templates grid block
- *
- * @category Mage
- * @package Mage_Adminhtml
- * @author Magento Core Team <core@magentocommerce.com>
- */
-class Mage_Adminhtml_Block_System_Email_Template_Grid extends Mage_Adminhtml_Block_Widget_Grid
-{
-
- protected function _construct()
- {
- parent::_construct();
- $this->setEmptyText(Mage::helper('Mage_Adminhtml_Helper_Data')->__('No Templates Found'));
- $this->setId('systemEmailTemplateGrid');
- $this->setUseAjax(true);
- $this->setSaveParametersInSession(true);
- }
-
- protected function _prepareCollection()
- {
- $collection = Mage::getResourceSingleton('Mage_Core_Model_Resource_Email_Template_Collection');
-
- $this->setCollection($collection);
-
- return parent::_prepareCollection();
- }
-
- protected function _prepareColumns()
- {
- $this->addColumn('template_id',
- array(
- 'header'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('ID'),
- 'index'=>'template_id'
- )
- );
-
- $this->addColumn('code',
- array(
- 'header'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Template Name'),
- 'index'=>'template_code'
- ));
-
- $this->addColumn('added_at',
- array(
- 'header'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Date Added'),
- 'index'=>'added_at',
- 'gmtoffset' => true,
- 'type'=>'datetime'
- ));
-
- $this->addColumn('modified_at',
- array(
- 'header'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Date Updated'),
- 'index'=>'modified_at',
- 'gmtoffset' => true,
- 'type'=>'datetime'
- ));
-
- $this->addColumn('subject',
- array(
- 'header'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Subject'),
- 'index'=>'template_subject'
- ));
- /*
- $this->addColumn('sender',
- array(
- 'header'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Sender'),
- 'index'=>'template_sender_email',
- 'renderer' => 'Mage_Adminhtml_Block_System_Email_Template_Grid_Renderer_Sender'
- ));
- */
- $this->addColumn('type',
- array(
- 'header'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__('Template Type'),
- 'index'=>'template_type',
- 'filter' => 'Mage_Adminhtml_Block_System_Email_Template_Grid_Filter_Type',
- 'renderer' => 'Mage_Adminhtml_Block_System_Email_Template_Grid_Renderer_Type'
- ));
-
- $this->addColumn('action',
- array(
- 'header' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Action'),
- 'index' => 'template_id',
- 'sortable' => false,
- 'filter' => false,
- 'width' => '100px',
- 'renderer' => 'Mage_Adminhtml_Block_System_Email_Template_Grid_Renderer_Action'
- ));
- return $this;
- }
-
- public function getRowUrl($row)
- {
- return $this->getUrl('*/*/edit', array('id'=>$row->getId()));
- }
-
-}
-
View
84 app/code/core/Mage/Adminhtml/Block/System/Store/Grid.php
@@ -1,84 +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 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- */
-
-
-/**
- * Adminhtml store grid
- *
- * @category Mage
- * @package Mage_Adminhtml
- * @author Magento Core Team <core@magentocommerce.com>
- */
-class Mage_Adminhtml_Block_System_Store_Grid extends Mage_Adminhtml_Block_Widget_Grid
-{
-
- protected function _construct()
- {
- parent::_construct();
- $this->setId('storeGrid');
- $this->setSaveParametersInSession(true);
- }
-
- protected function _prepareCollection()
- {
- $collection = Mage::getModel('Mage_Core_Model_Website')
- ->getCollection()
- ->joinGroupAndStore();
- $this->setCollection($collection);
- parent::_prepareCollection();
- return $this;
- }
-
- protected function _prepareColumns()
- {
- $this->addColumn('website_title', array(
- 'header' => Mage::helper('Mage_Core_Helper_Data')->__('Website Name'),
- 'align' =>'left',
- 'index' => 'name',
- 'filter_index' => 'main_table.name',
- 'renderer' => 'Mage_Adminhtml_Block_System_Store_Grid_Render_Website'
- ));
-
- $this->addColumn('group_title', array(
- 'header' => Mage::helper('Mage_Core_Helper_Data')->__('Store Name'),
- 'align' =>'left',
- 'index' => 'group_title',
- 'filter_index' => 'group_table.name',
- 'renderer' => 'Mage_Adminhtml_Block_System_Store_Grid_Render_Group'
- ));
-
- $this->addColumn('store_title', array(
- 'header' => Mage::helper('Mage_Core_Helper_Data')->__('Store View Name'),
- 'align' =>'left',
- 'index' => 'store_title',
- 'filter_index' => 'store_table.name',
- 'renderer' => 'Mage_Adminhtml_Block_System_Store_Grid_Render_Store'
- ));
-
- return parent::_prepareColumns();
- }
-
-}
View
97 app/code/core/Mage/Adminhtml/Block/System/Variable/Grid.php
@@ -1,97 +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 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- */
-
-/**
- * Custom Variable Grid Container
- *
- * @category Mage
- * @package Mage_Adminhtml
- * @author Magento Core Team <core@magentocommerce.com>
- */
-
-class Mage_Adminhtml_Block_System_Variable_Grid extends Mage_Adminhtml_Block_Widget_Grid
-{
- /**
- * Internal constructor
- *
- */
- protected function _construct()
- {
- parent::_construct();
- $this->setId('customVariablesGrid');
- $this->setDefaultSort('variable_id');
- $this->setDefaultDir('ASC');
- }
-
- /**
- * Prepare grid collection object
- *
- * @return Mage_Adminhtml_Block_System_Variable_Grid
- */
- protected function _prepareCollection()
- {
- /* @var $collection Mage_Core_Model_Resource_Variable_Collection */
- $collection = Mage::getModel('Mage_Core_Model_Variable')->getCollection();
- $this->setCollection($collection);
- return parent::_prepareCollection();
- }
-
- /**
- * Prepare grid columns
- *
- * @return Mage_Adminhtml_Block_System_Variable_Grid
- */
- protected function _prepareColumns()
- {
- $this->addColumn('variable_id', array(
- 'header' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Variable ID'),
- 'width' => '1',
- 'index' => 'variable_id',
- ));
-
- $this->addColumn('code', array(
- 'header' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Variable Code'),
- 'index' => 'code',
- ));
-
- $this->addColumn('name', array(
- 'header' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Name'),
- 'index' => 'name',
- ));
-
- return parent::_prepareColumns();
- }
-
- /**
- * Row click url
- *
- * @return string
- */
- public function getRowUrl($row)
- {
- return $this->getUrl('*/*/edit', array('variable_id' => $row->getId()));
- }
-}
View
104 app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid.php
@@ -1,104 +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 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- */
-class Mage_Adminhtml_Block_Tax_Rate_Grid extends Mage_Adminhtml_Block_Widget_Grid
-{
-
- protected function _construct()
- {
- parent::_construct();
- $this->setDefaultSort('region_name');
- $this->setDefaultDir('asc');
- $this->setId('tax_rate_grid');
- $this->setSaveParametersInSession(true);
- }
-
- protected function _prepareCollection()
- {
- $rateCollection = Mage::getModel('Mage_Tax_Model_Calculation_Rate')->getCollection()
- ->joinRegionTable();
-
- $this->setCollection($rateCollection);
- return parent::_prepareCollection();
- }
-
- protected function _prepareColumns()
- {
- $this->addColumn('code', array(
- 'header' => Mage::helper('Mage_Tax_Helper_Data')->__('Tax Identifier'),
- 'header_export' => Mage::helper('Mage_Tax_Helper_Data')->__('Code'),
- 'align' =>'left',
- 'index' => 'code',
- 'filter_index' => 'main_table.code',
- ));
-
- $this->addColumn('tax_country_id', array(
- 'header' => Mage::helper('Mage_Tax_Helper_Data')->__('Country'),
- 'type' => 'country',
- 'align' => 'left',
- 'index' => 'tax_country_id',
- 'filter_index' => 'main_table.tax_country_id',
- 'renderer' => 'Mage_Adminhtml_Block_Tax_Rate_Grid_Renderer_Country',
- 'sortable' => false
- ));
-
- $this->addColumn('region_name', array(
- 'header' => Mage::helper('Mage_Tax_Helper_Data')->__('State/Region'),
- 'header_export' => Mage::helper('Mage_Tax_Helper_Data')->__('State'),
- 'align' =>'left',
- 'index' => 'region_name',
- 'filter_index' => 'region_table.code',
- 'default' => '*',
- ));
-
- $this->addColumn('tax_postcode', array(
- 'header' => Mage::helper('Mage_Tax_Helper_Data')->__('Zip/Post Code'),
- 'align' =>'left',
- 'index' => 'tax_postcode',
- 'default' => '*',
- ));
-
- $this->addColumn('rate', array(
- 'header' => Mage::helper('Mage_Tax_Helper_Data')->__('Rate'),
- 'align' =>'right',
- 'index' => 'rate',
- 'type' => 'number',
- 'default' => '0.00',
- 'renderer' => 'Mage_Adminhtml_Block_Tax_Rate_Grid_Renderer_Data',
- ));
-
- $this->addExportType('*/*/exportCsv', Mage::helper('Mage_Tax_Helper_Data')->__('CSV'));
- $this->addExportType('*/*/exportXml', Mage::helper('Mage_Tax_Helper_Data')->__('Excel XML'));
-
- return parent::_prepareColumns();
- }
-
- public function getRowUrl($row)
- {
- return $this->getUrl('*/*/edit', array('rate' => $row->getTaxCalculationRateId()));
- }
-
-}
-
View
125 app/code/core/Mage/Adminhtml/Block/Urlrewrite/Grid.php
@@ -1,125 +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 X.commerce, Inc. (http://www.magentocommerce.com)
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
- */
-
-/**
- * Adminhtml URL rewrite grid block
- *
- * @category Mage
- * @package Mage_Adminhtml
- * @author Magento Core Team <core@magentocommerce.com>
- */
-class Mage_Adminhtml_Block_Urlrewrite_Grid extends Mage_Adminhtml_Block_Widget_Grid
-{
-
- protected function _construct()
- {
- parent::_construct();
- $this->setId('urlrewriteGrid');
- $this->setDefaultSort('url_rewrite_id');
- }
-
- protected function _prepareCollection()
- {
- $collection = Mage::getResourceModel('Mage_Core_Model_Resource_Url_Rewrite_Collection');
- $this->setCollection($collection);
- return parent::_prepareCollection();
- }
-
- protected function _prepareColumns()
- {
- $this->addColumn('url_rewrite_id', array(
- 'header' => $this->__('ID'),
- 'width' => '50px',
- 'index' => 'url_rewrite_id'
- ));
-
- if (!Mage::app()->isSingleStoreMode()) {
- $this->addColumn('store_id', array(
- 'header' => $this->__('Store View'),
- 'width' => '200px',
- 'index' => 'store_id',
- 'type' => 'store',
- 'store_view' => true,
- ));
- }
-
- $this->addColumn('is_system', array(
- 'header' =>$this->__('Type'),
- 'width' => '50px',
- 'index' => 'is_system',
- 'type' => 'options',
- 'options' => array(
- 1 => $this->__('System'),
- 0 => $this->__('Custom')
- ),
- ));
-
- $this->addColumn('id_path', array(
- 'header' => $this->__('ID Path'),
- 'width' => '50px',
- 'index' => 'id_path'
- ));
- $this->addColumn('request_path', array(
- 'header' => $this->__('Request Path'),
- 'width' => '50px',
- 'index' => 'request_path'
- ));
- $this->addColumn('target_path', array(
- 'header' => $this->__('Target Path'),
- 'width' => '50px',
- 'index' => 'target_path'
- ));
- $this->addColumn('options', array(
- 'header' => $this->__('Options'),
- 'width' => '50px',
- 'index' => 'options'
- ));
- $this->addColumn('actions', array(
- 'header' => $this->__('Action'),
- 'width' => '15px',
- 'sortable' => false,
- 'filter' => false,
- 'type' => 'action',
- 'actions' => array(
- array(
- 'url' => $this->getUrl('*/*/edit') . 'id/$url_rewrite_id',
- 'caption' => $this->__('Edit'),
- ),
- )
- ));
- //$this->addExportType('*/*/exportCsv', $this->__('CSV'));
- //$this->addExportType('*/*/exportXml', $this->__('XML'));
- return parent::_prepareColumns();
- }
-
- public function getRowUrl($row)
- {
- return $this->getUrl('*/*/edit', array('id'=>$row->getId()));
- //return $this->getUrl('*/*/view', array('id' => $row->getId()));
- }
-
-}
-
View
60 app/code/core/Mage/Adminhtml/Model/UrlRewriteOptions.php
@@ -0,0 +1,60 @@
+<?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_Users
+ * @copyright Copyright (c) 2012 X.commerce, Inc. (http://www.magentocommerce.com)
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+ */
+
+/**
+ * User statuses option array
+ *
+ * @category Mage
+ * @package Mage_Adminhtml
+ * @author Magento Core Team <core@magentocommerce.com>
+ */
+class Mage_Adminhtml_Model_UrlRewriteOptions implements Mage_Core_Model_Option_ArrayInterface
+{
+ /**
+ * Backend Helper
+ *
+ * @var Mage_Adminhtml_Helper_Data
+ */
+ protected $_helper;
+
+ /**
+ * @param Mage_Adminhtml_Helper_Data $helper
+ */
+ public function __construct(Mage_Adminhtml_Helper_Data $helper)
+ {
+ $this->_helper = $helper;
+ }
+
+ /**
+ * Return statuses array
+ * @return array
+ */
+ public function toOptionArray()
+ {
+ return array('1' => $this->_helper->__('System'),
+ '0' => $this->_helper->__('Custom'));
+ }
+}
View
3  app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php
@@ -349,6 +349,9 @@ public function saveAction()
}
$category->unsetData('use_post_data_config');
+ if (isset($data['general']['entity_id'])) {
+ throw new Mage_Core_Exception($this->__('Unable to save the category'));
+ }
$category->save();
$this->_getSession()->addSuccess(Mage::helper('Mage_Catalog_Helper_Data')->__('The category has been saved.'));
View
16 app/code/core/Mage/Adminhtml/controllers/Catalog/Product/SetController.php
@@ -50,13 +50,6 @@ public function indexAction()
Mage::helper('Mage_Catalog_Helper_Data')->__('Manage Attribute Sets'),
Mage::helper('Mage_Catalog_Helper_Data')->__('Manage Attribute Sets'));
- $this->_addContent(
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Toolbar_Main')
- );
- $this->_addContent(
- $this->getLayout()->createBlock('Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Grid')
- );
-
$this->renderLayout();
}
@@ -95,11 +88,10 @@ public function editAction()
public function setGridAction()
{
- $this->_setTypeId();
- $this->getResponse()->setBody(
- $this->getLayout()
- ->createBlock('Mage_Adminhtml_Block_Catalog_Product_Attribute_Set_Grid')
- ->toHtml());
+
+ $this->_setTypeId();
+ $this->loadLayout(false);
+ $this->renderLayout();
}
/**
View
7 app/code/core/Mage/Adminhtml/controllers/Catalog/SearchController.php
@@ -41,9 +41,8 @@ public function indexAction()
$this->_title($this->__('Catalog'))->_title($this->__('Search Terms'));
$this->_initAction()
- ->_addBreadcrumb(Mage::helper('Mage_Catalog_Helper_Data')->__('Catalog'), Mage::helper('Mage_Catalog_Helper_Data')->__('Catalog'))
- ->_addContent($this->getLayout()->createBlock('Mage_Adminhtml_Block_Catalog_Search'))
- ->renderLayout();
+ ->_addBreadcrumb(Mage::helper('Mage_Catalog_Helper_Data')->__('Catalog'), Mage::helper('Mage_Catalog_Helper_Data')->__('Catalog'));
+ $this->renderLayout();
}
public function newAction()
@@ -81,7 +80,7 @@ public function editAction()
$this->getLayout()->getBlock('head')->setCanLoadRulesJs(true);
- $this->getLayout()->getBlock('catalog_search_edit')
+ $this->getLayout()->getBlock('adminhtml.catalog.search.edit')
->setData('action', $this->getUrl('*/catalog_search/save'));
$this
View
8 app/code/core/Mage/Adminhtml/controllers/Newsletter/ProblemController.php
@@ -51,10 +51,6 @@ public function indexAction()
$this->_addBreadcrumb(Mage::helper('Mage_Newsletter_Helper_Data')->__('Newsletter Problem Reports'), Mage::helper('Mage_Newsletter_Helper_Data')-></