Version Notes
1.6.1.0
Download this release
Release Info
Developer | Magento Core Team |
Extension | Mage_Core_Adminhtml |
Version | 1.6.1.0 |
Comparing to | |
See all releases |
Version 1.6.1.0
- app/code/core/Mage/Adminhtml/Block/Abstract.php +47 -0
- app/code/core/Mage/Adminhtml/Block/Api/Buttons.php +102 -0
- app/code/core/Mage/Adminhtml/Block/Api/Editroles.php +64 -0
- app/code/core/Mage/Adminhtml/Block/Api/Edituser.php +57 -0
- app/code/core/Mage/Adminhtml/Block/Api/Grid/Role.php +81 -0
- app/code/core/Mage/Adminhtml/Block/Api/Role.php +46 -0
- app/code/core/Mage/Adminhtml/Block/Api/Role/Grid/User.php +182 -0
- app/code/core/Mage/Adminhtml/Block/Api/Roles.php +51 -0
- app/code/core/Mage/Adminhtml/Block/Api/Tab/Roleinfo.php +81 -0
- app/code/core/Mage/Adminhtml/Block/Api/Tab/Rolesedit.php +117 -0
- app/code/core/Mage/Adminhtml/Block/Api/Tab/Rolesusers.php +57 -0
- app/code/core/Mage/Adminhtml/Block/Api/Tab/Userroles.php +49 -0
- app/code/core/Mage/Adminhtml/Block/Api/User.php +45 -0
- app/code/core/Mage/Adminhtml/Block/Api/User/Edit.php +58 -0
- app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Form.php +45 -0
- app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Tab/Main.php +153 -0
- app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Tab/Roles.php +119 -0
- app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Tabs.php +62 -0
- app/code/core/Mage/Adminhtml/Block/Api/User/Grid.php +106 -0
- app/code/core/Mage/Adminhtml/Block/Api/Users.php +54 -0
- app/code/core/Mage/Adminhtml/Block/Backup.php +68 -0
- app/code/core/Mage/Adminhtml/Block/Backup/Grid.php +108 -0
- app/code/core/Mage/Adminhtml/Block/Cache.php +67 -0
- app/code/core/Mage/Adminhtml/Block/Cache/Additional.php +38 -0
- app/code/core/Mage/Adminhtml/Block/Cache/Grid.php +182 -0
- app/code/core/Mage/Adminhtml/Block/Cache/Notifications.php +66 -0
- app/code/core/Mage/Adminhtml/Block/Catalog.php +41 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Category/Abstract.php +209 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Category/Checkboxes/Tree.php +98 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Category/Edit.php +45 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Category/Edit/Form.php +234 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Image.php +44 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Pricestep.php +64 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Sortby/Available.php +67 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Sortby/Default.php +67 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Attributes.php +179 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Design.php +58 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/General.php +137 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Product.php +162 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tabs.php +167 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tree.php +352 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Category/Widget/Chooser.php +178 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Form.php +48 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Attribute/Urlkey.php +65 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Config/DateFieldsOrder.php +61 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Config/YearRange.php +54 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Fieldset/Element.php +183 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Helper/Form/Wysiwyg.php +72 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Helper/Form/Wysiwyg/Content.php +65 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product.php +94 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute.php +46 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit.php +101 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Form.php +46 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Front.php +106 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Main.php +261 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Options.php +36 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/System.php +134 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tabs.php +73 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Grid.php +123 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/New/Product/Attributes.php +94 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/New/Product/Created.php +89 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Grid.php +78 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main.php +409 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Formattribute.php +70 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Formgroup.php +88 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Formset.php +87 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Tree/Attribute.php +39 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Tree/Group.php +39 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Add.php +88 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Main.php +71 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Main/Filter.php +64 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Configure.php +74 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Error.php +47 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset.php +62 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Configurable.php +76 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Grouped.php +146 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Options.php +73 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Qty.php +75 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Update/Result.php +50 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Created.php +152 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit.php +249 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute.php +136 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Attributes.php +124 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Inventory.php +102 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Websites.php +75 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tabs.php +45 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Js.php +52 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Ajax/Serializer.php +71 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Alerts.php +77 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Alerts/Price.php +122 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Alerts/Stock.php +114 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes.php +161 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes/Create.php +103 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Categories.php +239 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Crosssell.php +260 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Inventory.php +145 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options.php +72 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Option.php +345 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Abstract.php +69 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Date.php +44 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/File.php +43 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Select.php +90 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Text.php +44 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price.php +63 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Recurring.php +49 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Tier.php +382 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Related.php +258 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Reviews.php +55 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Settings.php +90 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config.php +341 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid.php +312 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid/Filter/Inventory.php +56 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid/Renderer/Checkbox.php +72 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid/Renderer/Inventory.php +51 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Simple.php +196 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Group.php +236 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Settings.php +159 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Tag.php +108 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Tag/Customer.php +103 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Upsell.php +257 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Websites.php +111 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php +238 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs/Configurable.php +59 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs/Grouped.php +46 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Frontend/Product/Watermark.php +107 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php +291 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Apply.php +71 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Boolean.php +50 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Config.php +70 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery.php +191 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery/Content.php +170 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Image.php +64 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Msrp/Enabled.php +49 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Msrp/Price.php +49 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Price.php +90 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Price.php +37 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Widget/Chooser.php +294 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Product/Widget/Chooser/Container.php +46 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Search.php +46 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Search/Edit.php +59 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Search/Edit/Form.php +157 -0
- app/code/core/Mage/Adminhtml/Block/Catalog/Search/Grid.php +178 -0
- app/code/core/Mage/Adminhtml/Block/Checkout/Agreement.php +44 -0
- app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Edit.php +66 -0
- app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Edit/Form.php +151 -0
- app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Grid.php +110 -0
- app/code/core/Mage/Adminhtml/Block/Cms/Block.php +45 -0
- app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit.php +83 -0
- app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit/Form.php +140 -0
- app/code/core/Mage/Adminhtml/Block/Cms/Block/Grid.php +132 -0
- app/code/core/Mage/Adminhtml/Block/Cms/Block/Widget/Chooser.php +159 -0
- app/code/core/Mage/Adminhtml/Block/Cms/Page.php +67 -0
- app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit.php +142 -0
- app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Form.php +46 -0
- app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Content.php +153 -0
- app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Design.php +184 -0
- app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Main.php +175 -0
- app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Meta.php +135 -0
- app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tabs.php +44 -0
- app/code/core/Mage/Adminhtml/Block/Cms/Page/Grid.php +150 -0
- app/code/core/Mage/Adminhtml/Block/Cms/Page/Grid/Renderer/Action.php +41 -0
- app/code/core/Mage/Adminhtml/Block/Cms/Page/Widget/Chooser.php +165 -0
- app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content.php +161 -0
- app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Files.php +155 -0
- app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Newfolder.php +37 -0
- app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Uploader.php +71 -0
- app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Tree.php +99 -0
- app/code/core/Mage/Adminhtml/Block/Customer.php +46 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Edit.php +123 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Edit/Form.php +60 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Newpass.php +56 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Region.php +69 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php +244 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Addresses.php +274 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Cart.php +158 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Carts.php +64 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter.php +99 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid.php +126 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Filter/Status.php +71 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Renderer/Action.php +73 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Renderer/Status.php +65 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Orders.php +136 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Reviews.php +55 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Tag.php +122 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Tags.php +122 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View.php +204 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Accordion.php +88 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Cart.php +123 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Grid/Renderer/Item.php +136 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Orders.php +126 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Sales.php +139 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Wishlist.php +137 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Wishlist.php +279 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Wishlist/Grid/Renderer/Description.php +42 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tabs.php +131 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Form/Element/Boolean.php +56 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Form/Element/File.php +212 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Form/Element/Image.php +104 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Grid.php +221 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Grid/Filter/Country.php +44 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Grid/Renderer/Multiaction.php +92 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Group.php +57 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Group/Edit.php +64 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Group/Edit/Form.php +98 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Group/Grid.php +90 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Online.php +60 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Online/Filter.php +77 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid.php +166 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Ip.php +42 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Type.php +42 -0
- app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Url.php +47 -0
- app/code/core/Mage/Adminhtml/Block/Dashboard.php +88 -0
- app/code/core/Mage/Adminhtml/Block/Dashboard/Abstract.php +80 -0
- app/code/core/Mage/Adminhtml/Block/Dashboard/Bar.php +116 -0
- app/code/core/Mage/Adminhtml/Block/Dashboard/Diagrams.php +59 -0
- app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php +560 -0
- app/code/core/Mage/Adminhtml/Block/Dashboard/Grid.php +50 -0
- app/code/core/Mage/Adminhtml/Block/Dashboard/Grids.php +89 -0
- app/code/core/Mage/Adminhtml/Block/Dashboard/Orders/Grid.php +124 -0
- app/code/core/Mage/Adminhtml/Block/Dashboard/Sales.php +71 -0
- app/code/core/Mage/Adminhtml/Block/Dashboard/Searches/Last.php +102 -0
- app/code/core/Mage/Adminhtml/Block/Dashboard/Searches/Renderer/Searchquery.php +47 -0
- app/code/core/Mage/Adminhtml/Block/Dashboard/Searches/Top.php +104 -0
- app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Amounts.php +69 -0
- app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Customers/Most.php +118 -0
- app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Customers/Newest.php +116 -0
- app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Orders.php +68 -0
- app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Products/Ordered.php +126 -0
- app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Products/Viewed.php +105 -0
- app/code/core/Mage/Adminhtml/Block/Dashboard/Totals.php +79 -0
- app/code/core/Mage/Adminhtml/Block/Denied.php +37 -0
- app/code/core/Mage/Adminhtml/Block/Html/Date.php +48 -0
- app/code/core/Mage/Adminhtml/Block/Html/Select.php +47 -0
- app/code/core/Mage/Adminhtml/Block/Media/Editor.php +152 -0
- app/code/core/Mage/Adminhtml/Block/Media/Uploader.php +218 -0
- app/code/core/Mage/Adminhtml/Block/Messages.php +48 -0
- app/code/core/Mage/Adminhtml/Block/Newsletter/Problem.php +90 -0
- app/code/core/Mage/Adminhtml/Block/Newsletter/Problem/Grid.php +102 -0
- app/code/core/Mage/Adminhtml/Block/Newsletter/Problem/Grid/Filter/Checkbox.php +46 -0
- app/code/core/Mage/Adminhtml/Block/Newsletter/Problem/Grid/Renderer/Checkbox.php +47 -0
- app/code/core/Mage/Adminhtml/Block/Newsletter/Queue.php +47 -0
- app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit.php +262 -0
- app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit/Form.php +202 -0
- app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Grid.php +130 -0
- app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Grid/Renderer/Action.php +79 -0
- app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Preview.php +79 -0
- app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Preview/Form.php +69 -0
- app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber.php +96 -0
- app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid.php +208 -0
- app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid/Filter/Checkbox.php +46 -0
- app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid/Filter/Website.php +71 -0
- app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid/Renderer/Checkbox.php +52 -0
- app/code/core/Mage/Adminhtml/Block/Newsletter/Template.php +59 -0
- app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Edit.php +350 -0
- app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Edit/Form.php +155 -0
- app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid.php +121 -0
- app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid/Renderer/Action.php +62 -0
- app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid/Renderer/Sender.php +51 -0
- app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Preview.php +76 -0
- app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Preview/Form.php +70 -0
- app/code/core/Mage/Adminhtml/Block/Notification/Baseurl.php +64 -0
- app/code/core/Mage/Adminhtml/Block/Notification/Grid.php +68 -0
app/code/core/Mage/Adminhtml/Block/Abstract.php
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Adminhtml abstract block
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Adminhtml
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Adminhtml_Block_Abstract extends Mage_Core_Block_Template
|
35 |
+
{
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Enter description here...
|
39 |
+
*
|
40 |
+
* @return string
|
41 |
+
*/
|
42 |
+
protected function _getUrlModelClass()
|
43 |
+
{
|
44 |
+
return 'adminhtml/url';
|
45 |
+
}
|
46 |
+
|
47 |
+
}
|
app/code/core/Mage/Adminhtml/Block/Api/Buttons.php
ADDED
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
class Mage_Adminhtml_Block_Api_Buttons extends Mage_Adminhtml_Block_Template
|
28 |
+
{
|
29 |
+
|
30 |
+
public function __construct()
|
31 |
+
{
|
32 |
+
parent::__construct();
|
33 |
+
$this->setTemplate('api/userinfo.phtml');
|
34 |
+
}
|
35 |
+
|
36 |
+
protected function _prepareLayout()
|
37 |
+
{
|
38 |
+
$this->setChild('backButton',
|
39 |
+
$this->getLayout()->createBlock('adminhtml/widget_button')
|
40 |
+
->setData(array(
|
41 |
+
'label' => Mage::helper('adminhtml')->__('Back'),
|
42 |
+
'onclick' => 'window.location.href=\''.$this->getUrl('*/*/').'\'',
|
43 |
+
'class' => 'back'
|
44 |
+
))
|
45 |
+
);
|
46 |
+
|
47 |
+
$this->setChild('resetButton',
|
48 |
+
$this->getLayout()->createBlock('adminhtml/widget_button')
|
49 |
+
->setData(array(
|
50 |
+
'label' => Mage::helper('adminhtml')->__('Reset'),
|
51 |
+
'onclick' => 'window.location.reload()'
|
52 |
+
))
|
53 |
+
);
|
54 |
+
|
55 |
+
$this->setChild('saveButton',
|
56 |
+
$this->getLayout()->createBlock('adminhtml/widget_button')
|
57 |
+
->setData(array(
|
58 |
+
'label' => Mage::helper('adminhtml')->__('Save Role'),
|
59 |
+
'onclick' => 'roleForm.submit();return false;',
|
60 |
+
'class' => 'save'
|
61 |
+
))
|
62 |
+
);
|
63 |
+
|
64 |
+
$this->setChild('deleteButton',
|
65 |
+
$this->getLayout()->createBlock('adminhtml/widget_button')
|
66 |
+
->setData(array(
|
67 |
+
'label' => Mage::helper('adminhtml')->__('Delete Role'),
|
68 |
+
'onclick' => 'deleteConfirm(\'' . Mage::helper('adminhtml')->__('Are you sure you want to do this?') . '\', \'' . $this->getUrl('*/*/delete', array('rid' => $this->getRequest()->getParam('rid'))) . '\')',
|
69 |
+
'class' => 'delete'
|
70 |
+
))
|
71 |
+
);
|
72 |
+
return parent::_prepareLayout();
|
73 |
+
}
|
74 |
+
|
75 |
+
public function getBackButtonHtml()
|
76 |
+
{
|
77 |
+
return $this->getChildHtml('backButton');
|
78 |
+
}
|
79 |
+
|
80 |
+
public function getResetButtonHtml()
|
81 |
+
{
|
82 |
+
return $this->getChildHtml('resetButton');
|
83 |
+
}
|
84 |
+
|
85 |
+
public function getSaveButtonHtml()
|
86 |
+
{
|
87 |
+
return $this->getChildHtml('saveButton');
|
88 |
+
}
|
89 |
+
|
90 |
+
public function getDeleteButtonHtml()
|
91 |
+
{
|
92 |
+
if( intval($this->getRequest()->getParam('rid')) == 0 ) {
|
93 |
+
return;
|
94 |
+
}
|
95 |
+
return $this->getChildHtml('deleteButton');
|
96 |
+
}
|
97 |
+
|
98 |
+
public function getUser()
|
99 |
+
{
|
100 |
+
return Mage::registry('user_data');
|
101 |
+
}
|
102 |
+
}
|
app/code/core/Mage/Adminhtml/Block/Api/Editroles.php
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
class Mage_Adminhtml_Block_Api_Editroles extends Mage_Adminhtml_Block_Widget_Tabs {
|
28 |
+
public function __construct()
|
29 |
+
{
|
30 |
+
parent::__construct();
|
31 |
+
$this->setId('role_info_tabs');
|
32 |
+
$this->setDestElementId('role_edit_form');
|
33 |
+
$this->setTitle(Mage::helper('adminhtml')->__('Role Information'));
|
34 |
+
}
|
35 |
+
|
36 |
+
protected function _beforeToHtml()
|
37 |
+
{
|
38 |
+
$roleId = $this->getRequest()->getParam('rid', false);
|
39 |
+
$role = Mage::getModel("api/roles")
|
40 |
+
->load($roleId);
|
41 |
+
|
42 |
+
$this->addTab('info', array(
|
43 |
+
'label' => Mage::helper('adminhtml')->__('Role Info'),
|
44 |
+
'title' => Mage::helper('adminhtml')->__('Role Info'),
|
45 |
+
'content' => $this->getLayout()->createBlock('adminhtml/api_tab_roleinfo')->setRole($role)->toHtml(),
|
46 |
+
'active' => true
|
47 |
+
));
|
48 |
+
|
49 |
+
$this->addTab('account', array(
|
50 |
+
'label' => Mage::helper('adminhtml')->__('Role Resources'),
|
51 |
+
'title' => Mage::helper('adminhtml')->__('Role Resources'),
|
52 |
+
'content' => $this->getLayout()->createBlock('adminhtml/api_tab_rolesedit')->toHtml(),
|
53 |
+
));
|
54 |
+
|
55 |
+
if( intval($roleId) > 0 ) {
|
56 |
+
$this->addTab('roles', array(
|
57 |
+
'label' => Mage::helper('adminhtml')->__('Role Users'),
|
58 |
+
'title' => Mage::helper('adminhtml')->__('Role Users'),
|
59 |
+
'content' => $this->getLayout()->createBlock('adminhtml/api_tab_rolesusers', 'role.users.grid')->toHtml(),
|
60 |
+
));
|
61 |
+
}
|
62 |
+
return parent::_beforeToHtml();
|
63 |
+
}
|
64 |
+
}
|
app/code/core/Mage/Adminhtml/Block/Api/Edituser.php
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
class Mage_Adminhtml_Block_Api_Edituser extends Mage_Adminhtml_Block_Widget_Tabs {
|
28 |
+
public function __construct()
|
29 |
+
{
|
30 |
+
parent::__construct();
|
31 |
+
$this->setId('customer_info_tabs');
|
32 |
+
$this->setDestElementId('user_edit_form');
|
33 |
+
}
|
34 |
+
|
35 |
+
protected function _beforeToHtml()
|
36 |
+
{
|
37 |
+
$this->addTab('account', array(
|
38 |
+
'label' => Mage::helper('adminhtml')->__('User Info'),
|
39 |
+
'title' => Mage::helper('adminhtml')->__('User Info'),
|
40 |
+
'content' => $this->getLayout()->createBlock('adminhtml/api_tab_useredit')->toHtml(),
|
41 |
+
'active' => true
|
42 |
+
));
|
43 |
+
if( $this->getUser()->getUserId() ) {
|
44 |
+
$this->addTab('roles', array(
|
45 |
+
'label' => Mage::helper('adminhtml')->__('Roles'),
|
46 |
+
'title' => Mage::helper('adminhtml')->__('Roles'),
|
47 |
+
'content' => $this->getLayout()->createBlock('adminhtml/api_tab_userroles')->toHtml(),
|
48 |
+
));
|
49 |
+
}
|
50 |
+
return parent::_beforeToHtml();
|
51 |
+
}
|
52 |
+
|
53 |
+
public function getUser()
|
54 |
+
{
|
55 |
+
return Mage::registry('user_data');
|
56 |
+
}
|
57 |
+
}
|
app/code/core/Mage/Adminhtml/Block/Api/Grid/Role.php
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* roles grid
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Adminhtml
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Adminhtml_Block_Api_Grid_Role extends Mage_Adminhtml_Block_Widget_Grid
|
35 |
+
{
|
36 |
+
public function __construct()
|
37 |
+
{
|
38 |
+
parent::__construct();
|
39 |
+
$this->setId('roleGrid');
|
40 |
+
$this->setSaveParametersInSession(true);
|
41 |
+
$this->setDefaultSort('role_id');
|
42 |
+
$this->setDefaultDir('asc');
|
43 |
+
$this->setUseAjax(true);
|
44 |
+
}
|
45 |
+
|
46 |
+
protected function _prepareCollection()
|
47 |
+
{
|
48 |
+
$collection = Mage::getModel("api/roles")->getCollection();
|
49 |
+
$this->setCollection($collection);
|
50 |
+
|
51 |
+
return parent::_prepareCollection();
|
52 |
+
}
|
53 |
+
|
54 |
+
protected function _prepareColumns()
|
55 |
+
{
|
56 |
+
|
57 |
+
$this->addColumn('role_id', array(
|
58 |
+
'header' =>Mage::helper('adminhtml')->__('ID'),
|
59 |
+
'index' =>'role_id',
|
60 |
+
'align' => 'right',
|
61 |
+
'width' => '50px'
|
62 |
+
));
|
63 |
+
|
64 |
+
$this->addColumn('role_name', array(
|
65 |
+
'header' =>Mage::helper('adminhtml')->__('Role Name'),
|
66 |
+
'index' =>'role_name'
|
67 |
+
));
|
68 |
+
|
69 |
+
return parent::_prepareColumns();
|
70 |
+
}
|
71 |
+
|
72 |
+
public function getGridUrl()
|
73 |
+
{
|
74 |
+
return $this->getUrl('*/*/roleGrid', array('_current'=>true));
|
75 |
+
}
|
76 |
+
|
77 |
+
public function getRowUrl($row)
|
78 |
+
{
|
79 |
+
return $this->getUrl('*/*/editrole', array('rid' => $row->getRoleId()));
|
80 |
+
}
|
81 |
+
}
|
app/code/core/Mage/Adminhtml/Block/Api/Role.php
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Adminhtml permissioms role block
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Adminhtml
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
|
35 |
+
class Mage_Adminhtml_Block_Api_Role extends Mage_Adminhtml_Block_Widget_Grid_Container
|
36 |
+
{
|
37 |
+
|
38 |
+
public function __construct()
|
39 |
+
{
|
40 |
+
$this->_controller = 'api_role';
|
41 |
+
$this->_headerText = Mage::helper('adminhtml')->__('Roles');
|
42 |
+
$this->_addButtonLabel = Mage::helper('adminhtml')->__('Add New Role');
|
43 |
+
parent::__construct();
|
44 |
+
}
|
45 |
+
|
46 |
+
}
|
app/code/core/Mage/Adminhtml/Block/Api/Role/Grid/User.php
ADDED
@@ -0,0 +1,182 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Acl role user grid
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Adminhtml
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Adminhtml_Block_Api_Role_Grid_User extends Mage_Adminhtml_Block_Widget_Grid
|
35 |
+
{
|
36 |
+
|
37 |
+
public function __construct()
|
38 |
+
{
|
39 |
+
parent::__construct();
|
40 |
+
$this->setDefaultSort('role_user_id');
|
41 |
+
$this->setDefaultDir('asc');
|
42 |
+
$this->setId('roleUserGrid');
|
43 |
+
$this->setDefaultFilter(array('in_role_users'=>1));
|
44 |
+
$this->setUseAjax(true);
|
45 |
+
}
|
46 |
+
|
47 |
+
protected function _addColumnFilterToCollection($column)
|
48 |
+
{
|
49 |
+
if ($column->getId() == 'in_role_users') {
|
50 |
+
$inRoleIds = $this->_getUsers();
|
51 |
+
if (empty($inRoleIds)) {
|
52 |
+
$inRoleIds = 0;
|
53 |
+
}
|
54 |
+
if ($column->getFilter()->getValue()) {
|
55 |
+
$this->getCollection()->addFieldToFilter('user_id', array('in'=>$inRoleIds));
|
56 |
+
}
|
57 |
+
else {
|
58 |
+
if($inRoleIds) {
|
59 |
+
$this->getCollection()->addFieldToFilter('user_id', array('nin'=>$inRoleIds));
|
60 |
+
}
|
61 |
+
}
|
62 |
+
}
|
63 |
+
else {
|
64 |
+
parent::_addColumnFilterToCollection($column);
|
65 |
+
}
|
66 |
+
return $this;
|
67 |
+
}
|
68 |
+
|
69 |
+
protected function _prepareCollection()
|
70 |
+
{
|
71 |
+
$roleId = $this->getRequest()->getParam('rid');
|
72 |
+
Mage::register('RID', $roleId);
|
73 |
+
$collection = Mage::getModel('api/roles')->getUsersCollection();
|
74 |
+
$this->setCollection($collection);
|
75 |
+
return parent::_prepareCollection();
|
76 |
+
}
|
77 |
+
|
78 |
+
protected function _prepareColumns()
|
79 |
+
{
|
80 |
+
$this->addColumn('in_role_users', array(
|
81 |
+
'header_css_class' => 'a-center',
|
82 |
+
'type' => 'checkbox',
|
83 |
+
'name' => 'in_role_users',
|
84 |
+
'values' => $this->_getUsers(),
|
85 |
+
'align' => 'center',
|
86 |
+
'index' => 'user_id'
|
87 |
+
));
|
88 |
+
|
89 |
+
$this->addColumn('role_user_id', array(
|
90 |
+
'header' =>Mage::helper('adminhtml')->__('User ID'),
|
91 |
+
'width' =>5,
|
92 |
+
'align' =>'left',
|
93 |
+
'sortable' =>true,
|
94 |
+
'index' =>'user_id'
|
95 |
+
));
|
96 |
+
|
97 |
+
$this->addColumn('role_user_username', array(
|
98 |
+
'header' =>Mage::helper('adminhtml')->__('User Name'),
|
99 |
+
'align' =>'left',
|
100 |
+
'index' =>'username'
|
101 |
+
));
|
102 |
+
|
103 |
+
$this->addColumn('role_user_firstname', array(
|
104 |
+
'header' =>Mage::helper('adminhtml')->__('First Name'),
|
105 |
+
'align' =>'left',
|
106 |
+
'index' =>'firstname'
|
107 |
+
));
|
108 |
+
|
109 |
+
$this->addColumn('role_user_lastname', array(
|
110 |
+
'header' =>Mage::helper('adminhtml')->__('Last Name'),
|
111 |
+
'align' =>'left',
|
112 |
+
'index' =>'lastname'
|
113 |
+
));
|
114 |
+
|
115 |
+
$this->addColumn('role_user_email', array(
|
116 |
+
'header' =>Mage::helper('adminhtml')->__('Email'),
|
117 |
+
'width' =>40,
|
118 |
+
'align' =>'left',
|
119 |
+
'index' =>'email'
|
120 |
+
));
|
121 |
+
|
122 |
+
$this->addColumn('role_user_is_active', array(
|
123 |
+
'header' => Mage::helper('adminhtml')->__('Status'),
|
124 |
+
'index' => 'is_active',
|
125 |
+
'align' =>'left',
|
126 |
+
'type' => 'options',
|
127 |
+
'options' => array('1' => Mage::helper('adminhtml')->__('Active'), '0' => Mage::helper('adminhtml')->__('Inactive')),
|
128 |
+
));
|
129 |
+
|
130 |
+
/*
|
131 |
+
$this->addColumn('grid_actions',
|
132 |
+
array(
|
133 |
+
'header'=>Mage::helper('adminhtml')->__('Actions'),
|
134 |
+
'width'=>5,
|
135 |
+
'sortable'=>false,
|
136 |
+
'filter' =>false,
|
137 |
+
'type' => 'action',
|
138 |
+
'actions' => array(
|
139 |
+
array(
|
140 |
+
'caption' => Mage::helper('adminhtml')->__('Remove'),
|
141 |
+
'onClick' => 'role.deleteFromRole($role_id);'
|
142 |
+
)
|
143 |
+
)
|
144 |
+
)
|
145 |
+
);
|
146 |
+
*/
|
147 |
+
|
148 |
+
return parent::_prepareColumns();
|
149 |
+
}
|
150 |
+
|
151 |
+
public function getGridUrl()
|
152 |
+
{
|
153 |
+
$roleId = $this->getRequest()->getParam('rid');
|
154 |
+
return $this->getUrl('*/*/editrolegrid', array('rid' => $roleId));
|
155 |
+
}
|
156 |
+
|
157 |
+
protected function _getUsers($json=false)
|
158 |
+
{
|
159 |
+
if ( $this->getRequest()->getParam('in_role_user') != "" ) {
|
160 |
+
return $this->getRequest()->getParam('in_role_user');
|
161 |
+
}
|
162 |
+
$roleId = ( $this->getRequest()->getParam('rid') > 0 ) ? $this->getRequest()->getParam('rid') : Mage::registry('RID');
|
163 |
+
$users = Mage::getModel('api/roles')->setId($roleId)->getRoleUsers();
|
164 |
+
if (sizeof($users) > 0) {
|
165 |
+
if ( $json ) {
|
166 |
+
$jsonUsers = Array();
|
167 |
+
foreach($users as $usrid) $jsonUsers[$usrid] = 0;
|
168 |
+
return Mage::helper('core')->jsonEncode((object)$jsonUsers);
|
169 |
+
} else {
|
170 |
+
return array_values($users);
|
171 |
+
}
|
172 |
+
} else {
|
173 |
+
if ( $json ) {
|
174 |
+
return '{}';
|
175 |
+
} else {
|
176 |
+
return array();
|
177 |
+
}
|
178 |
+
}
|
179 |
+
}
|
180 |
+
|
181 |
+
}
|
182 |
+
|
app/code/core/Mage/Adminhtml/Block/Api/Roles.php
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* user roles block
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Adminhtml
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Adminhtml_Block_Api_Roles extends Mage_Adminhtml_Block_Template
|
35 |
+
{
|
36 |
+
public function __construct()
|
37 |
+
{
|
38 |
+
parent::__construct();
|
39 |
+
$this->setTemplate('api/roles.phtml');
|
40 |
+
}
|
41 |
+
|
42 |
+
public function getAddNewUrl()
|
43 |
+
{
|
44 |
+
return $this->getUrl('*/*/editrole');
|
45 |
+
}
|
46 |
+
|
47 |
+
public function getGridHtml()
|
48 |
+
{
|
49 |
+
return $this->getLayout()->createBlock('adminhtml/api_grid_role')->toHtml();
|
50 |
+
}
|
51 |
+
}
|
app/code/core/Mage/Adminhtml/Block/Api/Tab/Roleinfo.php
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* implementing now
|
29 |
+
*
|
30 |
+
*/
|
31 |
+
class Mage_Adminhtml_Block_Api_Tab_Roleinfo extends Mage_Adminhtml_Block_Widget_Form
|
32 |
+
{
|
33 |
+
public function __construct()
|
34 |
+
{
|
35 |
+
parent::__construct();
|
36 |
+
}
|
37 |
+
|
38 |
+
public function _beforeToHtml() {
|
39 |
+
$this->_initForm();
|
40 |
+
|
41 |
+
return parent::_beforeToHtml();
|
42 |
+
}
|
43 |
+
|
44 |
+
protected function _initForm()
|
45 |
+
{
|
46 |
+
$roleId = $this->getRequest()->getParam('rid');
|
47 |
+
|
48 |
+
$form = new Varien_Data_Form();
|
49 |
+
|
50 |
+
$fieldset = $form->addFieldset('base_fieldset', array('legend'=>Mage::helper('adminhtml')->__('Role Information')));
|
51 |
+
|
52 |
+
$fieldset->addField('role_name', 'text',
|
53 |
+
array(
|
54 |
+
'name' => 'rolename',
|
55 |
+
'label' => Mage::helper('adminhtml')->__('Role Name'),
|
56 |
+
'id' => 'role_name',
|
57 |
+
'class' => 'required-entry',
|
58 |
+
'required' => true,
|
59 |
+
)
|
60 |
+
);
|
61 |
+
|
62 |
+
$fieldset->addField('role_id', 'hidden',
|
63 |
+
array(
|
64 |
+
'name' => 'role_id',
|
65 |
+
'id' => 'role_id',
|
66 |
+
)
|
67 |
+
);
|
68 |
+
|
69 |
+
$fieldset->addField('in_role_user', 'hidden',
|
70 |
+
array(
|
71 |
+
'name' => 'in_role_user',
|
72 |
+
'id' => 'in_role_userz',
|
73 |
+
)
|
74 |
+
);
|
75 |
+
|
76 |
+
$fieldset->addField('in_role_user_old', 'hidden', array('name' => 'in_role_user_old'));
|
77 |
+
|
78 |
+
$form->setValues($this->getRole()->getData());
|
79 |
+
$this->setForm($form);
|
80 |
+
}
|
81 |
+
}
|
app/code/core/Mage/Adminhtml/Block/Api/Tab/Rolesedit.php
ADDED
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
class Mage_Adminhtml_Block_Api_Tab_Rolesedit extends Mage_Adminhtml_Block_Widget_Form {
|
28 |
+
|
29 |
+
public function __construct() {
|
30 |
+
parent::__construct();
|
31 |
+
|
32 |
+
$rid = Mage::app()->getRequest()->getParam('rid', false);
|
33 |
+
|
34 |
+
$resources = Mage::getModel('api/roles')->getResourcesList();
|
35 |
+
|
36 |
+
$rules_set = Mage::getResourceModel('api/rules_collection')->getByRoles($rid)->load();
|
37 |
+
|
38 |
+
$selrids = array();
|
39 |
+
|
40 |
+
foreach ($rules_set->getItems() as $item) {
|
41 |
+
if (array_key_exists(strtolower($item->getResource_id()), $resources) && $item->getPermission() == 'allow') {
|
42 |
+
$resources[$item->getResource_id()]['checked'] = true;
|
43 |
+
array_push($selrids, $item->getResource_id());
|
44 |
+
}
|
45 |
+
}
|
46 |
+
|
47 |
+
$this->setSelectedResources($selrids);
|
48 |
+
|
49 |
+
$this->setTemplate('api/rolesedit.phtml');
|
50 |
+
//->assign('resources', $resources);
|
51 |
+
//->assign('checkedResources', join(',', $selrids));
|
52 |
+
}
|
53 |
+
|
54 |
+
public function getEverythingAllowed()
|
55 |
+
{
|
56 |
+
return in_array('all', $this->getSelectedResources());
|
57 |
+
}
|
58 |
+
|
59 |
+
public function getResTreeJson()
|
60 |
+
{
|
61 |
+
$rid = Mage::app()->getRequest()->getParam('rid', false);
|
62 |
+
$resources = Mage::getModel('api/roles')->getResourcesTree();
|
63 |
+
|
64 |
+
$rootArray = $this->_getNodeJson($resources,1);
|
65 |
+
|
66 |
+
$json = Mage::helper('core')->jsonEncode(isset($rootArray['children']) ? $rootArray['children'] : array());
|
67 |
+
|
68 |
+
return $json;
|
69 |
+
}
|
70 |
+
|
71 |
+
protected function _sortTree($a, $b)
|
72 |
+
{
|
73 |
+
return $a['sort_order']<$b['sort_order'] ? -1 : ($a['sort_order']>$b['sort_order'] ? 1 : 0);
|
74 |
+
}
|
75 |
+
|
76 |
+
|
77 |
+
protected function _getNodeJson($node, $level=0)
|
78 |
+
{
|
79 |
+
$item = array();
|
80 |
+
$selres = $this->getSelectedResources();
|
81 |
+
|
82 |
+
if ($level != 0) {
|
83 |
+
$item['text']= (string)$node->title;
|
84 |
+
$item['sort_order']= isset($node->sort_order) ? (string)$node->sort_order : 0;
|
85 |
+
$item['id'] = (string)$node->attributes()->aclpath;
|
86 |
+
|
87 |
+
if (in_array($item['id'], $selres))
|
88 |
+
$item['checked'] = true;
|
89 |
+
}
|
90 |
+
if (isset($node->children)) {
|
91 |
+
$children = $node->children->children();
|
92 |
+
} else {
|
93 |
+
$children = $node->children();
|
94 |
+
}
|
95 |
+
if (empty($children)) {
|
96 |
+
return $item;
|
97 |
+
}
|
98 |
+
|
99 |
+
if ($children) {
|
100 |
+
$item['children'] = array();
|
101 |
+
//$item['cls'] = 'fiche-node';
|
102 |
+
foreach ($children as $child) {
|
103 |
+
if ($child->getName()!='title' && $child->getName()!='sort_order' && $child->attributes()->module) {
|
104 |
+
if ($level != 0) {
|
105 |
+
$item['children'][] = $this->_getNodeJson($child, $level+1);
|
106 |
+
} else {
|
107 |
+
$item = $this->_getNodeJson($child, $level+1);
|
108 |
+
}
|
109 |
+
}
|
110 |
+
}
|
111 |
+
if (!empty($item['children'])) {
|
112 |
+
usort($item['children'], array($this, '_sortTree'));
|
113 |
+
}
|
114 |
+
}
|
115 |
+
return $item;
|
116 |
+
}
|
117 |
+
}
|
app/code/core/Mage/Adminhtml/Block/Api/Tab/Rolesusers.php
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
class Mage_Adminhtml_Block_Api_Tab_Rolesusers extends Mage_Adminhtml_Block_Widget_Tabs {
|
28 |
+
|
29 |
+
public function __construct()
|
30 |
+
{
|
31 |
+
parent::__construct();
|
32 |
+
|
33 |
+
$roleId = $this->getRequest()->getParam('rid', false);
|
34 |
+
|
35 |
+
$users = Mage::getModel("api/user")->getCollection()->load();
|
36 |
+
$this->setTemplate('api/rolesusers.phtml')
|
37 |
+
->assign('users', $users->getItems())
|
38 |
+
->assign('roleId', $roleId);
|
39 |
+
}
|
40 |
+
|
41 |
+
protected function _prepareLayout()
|
42 |
+
{
|
43 |
+
$this->setChild('userGrid', $this->getLayout()->createBlock('adminhtml/api_role_grid_user', 'roleUsersGrid'));
|
44 |
+
return parent::_prepareLayout();
|
45 |
+
}
|
46 |
+
|
47 |
+
protected function _getGridHtml()
|
48 |
+
{
|
49 |
+
return $this->getChildHtml('userGrid');
|
50 |
+
}
|
51 |
+
|
52 |
+
protected function _getJsObjectName()
|
53 |
+
{
|
54 |
+
return $this->getChild('userGrid')->getJsObjectName();
|
55 |
+
}
|
56 |
+
|
57 |
+
}
|
app/code/core/Mage/Adminhtml/Block/Api/Tab/Userroles.php
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
class Mage_Adminhtml_Block_Api_Tab_Userroles extends Mage_Adminhtml_Block_Widget_Tabs
|
27 |
+
{
|
28 |
+
|
29 |
+
public function __construct()
|
30 |
+
{
|
31 |
+
parent::__construct();
|
32 |
+
|
33 |
+
$uid = $this->getRequest()->getParam('id', false);
|
34 |
+
$uid = !empty($uid) ? $uid : 0;
|
35 |
+
$roles = Mage::getModel("api/roles")
|
36 |
+
->getCollection()
|
37 |
+
->load();
|
38 |
+
|
39 |
+
$user_roles = Mage::getModel("api/roles")
|
40 |
+
->getUsersCollection()
|
41 |
+
->setUserFilter($uid)
|
42 |
+
->load();
|
43 |
+
|
44 |
+
$this->setTemplate('api/userroles.phtml')
|
45 |
+
->assign('roles', $roles)
|
46 |
+
->assign('user_roles', $user_roles);
|
47 |
+
}
|
48 |
+
|
49 |
+
}
|
app/code/core/Mage/Adminhtml/Block/Api/User.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Adminhtml permissions user block
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Adminhtml
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Adminhtml_Block_Api_User extends Mage_Adminhtml_Block_Widget_Grid_Container
|
35 |
+
{
|
36 |
+
|
37 |
+
public function __construct()
|
38 |
+
{
|
39 |
+
$this->_controller = 'api_user';
|
40 |
+
$this->_headerText = Mage::helper('adminhtml')->__('Users');
|
41 |
+
$this->_addButtonLabel = Mage::helper('adminhtml')->__('Add New User');
|
42 |
+
parent::__construct();
|
43 |
+
}
|
44 |
+
|
45 |
+
}
|
app/code/core/Mage/Adminhtml/Block/Api/User/Edit.php
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Adminhtml permissions user edit page
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Adminhtml
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Adminhtml_Block_Api_User_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
|
35 |
+
{
|
36 |
+
|
37 |
+
public function __construct()
|
38 |
+
{
|
39 |
+
$this->_objectId = 'user_id';
|
40 |
+
$this->_controller = 'api_user';
|
41 |
+
|
42 |
+
parent::__construct();
|
43 |
+
|
44 |
+
$this->_updateButton('save', 'label', Mage::helper('adminhtml')->__('Save User'));
|
45 |
+
$this->_updateButton('delete', 'label', Mage::helper('adminhtml')->__('Delete User'));
|
46 |
+
}
|
47 |
+
|
48 |
+
public function getHeaderText()
|
49 |
+
{
|
50 |
+
if (Mage::registry('api_user')->getId()) {
|
51 |
+
return Mage::helper('adminhtml')->__("Edit User '%s'", $this->htmlEscape(Mage::registry('api_user')->getUsername()));
|
52 |
+
}
|
53 |
+
else {
|
54 |
+
return Mage::helper('adminhtml')->__('New User');
|
55 |
+
}
|
56 |
+
}
|
57 |
+
|
58 |
+
}
|
app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Form.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Magento
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the Open Software License (OSL 3.0)
|
8 |
+
* that is bundled with this package in the file LICENSE.txt.
|
9 |
+
* It is also available through the world-wide-web at this URL:
|
10 |
+
* http://opensource.org/licenses/osl-3.0.php
|
11 |
+
* If you did not receive a copy of the license and are unable to
|
12 |
+
* obtain it through the world-wide-web, please send an email
|
13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
+
*
|
15 |
+
* DISCLAIMER
|
16 |
+
*
|
17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
+
* versions in the future. If you wish to customize Magento for your
|
19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
+
*
|
21 |
+
* @category Mage
|
22 |
+
* @package Mage_Adminhtml
|
23 |
+
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
|
24 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
+
*/
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Adminhtml permissions user edit form
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Adminhtml
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_Adminhtml_Block_Api_User_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
|
35 |
+
{
|
36 |
+
|
37 |
+
protected function _prepareForm()
|
38 |
+
{
|
39 |
+
$form = new Varien_Data_Form(array('id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post'));
|
40 |
+
$form->setUseContainer(true);
|
41 |
+
$this->setForm($form);
|
42 |
+
return parent::_prepareForm();
|
43 |
+
}
|
44 |
+
|
45 |
+
}
|
app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Tab/Main.php
ADDED
@@ -0,0 +1,153 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|