-
Notifications
You must be signed in to change notification settings - Fork 64
ModulesGarden #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
ModulesGarden #41
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
f31104f
ModulesGarden changelog:
2ea0944
Translations, License,
c805f1b
Whole Base
264b813
Merged master+dashboard
707693f
signup method
2dace50
Magento Dashboard Grid Fix
c418f94
Bulk Action Error Handling,
be782cf
Authorization when viewing ticket
cf2b377
Sale Totals Synchronization Fix
0289e42
Sync Logging
d7793e5
Customer Open Ticket SSO
5ef7eb3
Stats Removed
a1538ef
SSO Disabled Fix, Create Ticket Blank Page Fix
b421177
Massaction Views Fix
6fc5318
Upgrade 1.3.0/1-1.4.0
2a0ca03
Dashboard Grid Type Dropdown Filter
251b260
Subject Filtering Fix
544343e
Config API Views Blank Page Fix,
b8e970f
UI Grid Fixes
7623adc
Indentation, EOF Fixes
a79a9fe
Reformat
4adffd8
Magento Exception Handling,
97814ab
Separate User Settings
51da83f
Separate User Settings
73e5d14
User Settings moved on other branch
5d022aa
Refactoring
f242cf8
Sync: default last log in date
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
56 changes: 56 additions & 0 deletions
56
src/app/code/community/Zendesk/Zendesk/Block/Adminhtml/Config/Buttons/Sync.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| <?php | ||
| /** | ||
| * Copyright 2013 Zendesk. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| class Zendesk_Zendesk_Block_Adminhtml_Config_Buttons_Sync extends Mage_Adminhtml_Block_System_Config_Form_Field | ||
| { | ||
| protected function _prepareLayout() | ||
| { | ||
| parent::_prepareLayout(); | ||
| if (!$this->getTemplate()) { | ||
| $this->setTemplate('zendesk/config/button-sync.phtml'); | ||
| } | ||
| return $this; | ||
| } | ||
|
|
||
| public function render(Varien_Data_Form_Element_Abstract $element) | ||
| { | ||
| $element->unsScope()->unsCanUseWebsiteValue()->unsCanUseDefaultValue(); | ||
| return parent::render($element); | ||
| } | ||
|
|
||
| protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) | ||
| { | ||
| $originalData = $element->getOriginalData(); | ||
| $this->addData(array( | ||
| 'button_label' => Mage::helper('zendesk')->__($originalData['button_label']), | ||
| 'html_id' => $element->getHtmlId(), | ||
| 'url' => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/zendesk/sync') | ||
| )); | ||
|
|
||
| return $this->_toHtml(); | ||
| } | ||
|
|
||
| public function getTestUrl() | ||
| { | ||
| return Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/zendesk/sync'); | ||
| } | ||
|
|
||
| public function getAuthHeader() | ||
| { | ||
| return 'Token token="' . Mage::helper('zendesk')->getApiToken(false) . '"'; | ||
| } | ||
| } | ||
47 changes: 47 additions & 0 deletions
47
src/app/code/community/Zendesk/Zendesk/Block/Adminhtml/Create/Customer.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| <?php | ||
| /** | ||
| * Copyright 2015 Zendesk | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| class Zendesk_Zendesk_Block_Adminhtml_Create_Customer extends Mage_Adminhtml_Block_Widget_Form_Container | ||
| { | ||
|
|
||
| public function __construct() | ||
| { | ||
| parent::__construct(); | ||
| $this->setId('zendesk_create_customer_search'); | ||
| } | ||
|
|
||
| public function getHeaderText() | ||
| { | ||
| return Mage::helper('zendesk')->__('Please Select User to Add'); | ||
| } | ||
|
|
||
| public function getButtonsHtml() | ||
| { | ||
| $addButtonData = array( | ||
| 'label' => Mage::helper('zendesk')->__('Select User'), | ||
| 'onclick' => 'showUsers()', | ||
| 'id' => 'show-users' | ||
| ); | ||
| return $this->getLayout()->createBlock('adminhtml/widget_button')->setData($addButtonData)->toHtml(); | ||
| } | ||
|
|
||
| public function getHeaderCssClass() | ||
| { | ||
| return 'head-catalog-customer'; | ||
| } | ||
|
|
||
| } |
103 changes: 103 additions & 0 deletions
103
src/app/code/community/Zendesk/Zendesk/Block/Adminhtml/Create/Customer/Grid.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,103 @@ | ||
| <?php | ||
| /** | ||
| * Copyright 2015 Zendesk | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| class Zendesk_Zendesk_Block_Adminhtml_Create_Customer_Grid extends Mage_Adminhtml_Block_Widget_Grid | ||
| { | ||
|
|
||
| public function __construct() | ||
| { | ||
| parent::__construct(); | ||
| $this->setId('zendesk_create_customer_search_grid'); | ||
| $this->setDefaultSort('entity_id'); | ||
| $this->setUseAjax(true); | ||
| if ($this->getRequest()->getParam('collapse')) { | ||
| $this->setIsCollapsed(true); | ||
| } | ||
| } | ||
|
|
||
| /** | ||
| * Retrieve quote store object | ||
| * @return Mage_Core_Model_Store | ||
| */ | ||
| public function getStore() | ||
| { | ||
| return Mage::getSingleton('adminhtml/session_quote')->getStore(); | ||
| } | ||
|
|
||
| /** | ||
| * Prepare collection to be displayed in the grid | ||
| * | ||
| * @return Mage_Adminhtml_Block_Sales_Order_Create_Search_Grid | ||
| */ | ||
| protected function _prepareCollection() | ||
| { | ||
| $collection = Mage::getModel('customer/customer')->getCollection() | ||
| ->addAttributeToSelect('firstname') | ||
| ->addAttributeToSelect('lastname') | ||
| ->addAttributeToSelect('email'); | ||
|
|
||
|
|
||
| $this->setCollection($collection); | ||
| return parent::_prepareCollection(); | ||
| } | ||
|
|
||
| /** | ||
| * Prepare columns | ||
| * | ||
| * @return Mage_Adminhtml_Block_Sales_Order_Create_Search_Grid | ||
| */ | ||
| protected function _prepareColumns() | ||
| { | ||
| $this->addColumn('entity_id', array( | ||
| 'header' => Mage::helper('zendesk')->__('ID'), | ||
| 'sortable' => true, | ||
| 'width' => '60', | ||
| 'index' => 'entity_id' | ||
| )); | ||
| $this->addColumn('firstname', array( | ||
| 'header' => Mage::helper('zendesk')->__('Firstname'), | ||
| 'index' => 'firstname' | ||
| )); | ||
| $this->addColumn('lastname', array( | ||
| 'header' => Mage::helper('zendesk')->__('Lastname'), | ||
| 'index' => 'lastname' | ||
| )); | ||
| $this->addColumn('email', array( | ||
| 'header' => Mage::helper('zendesk')->__('Email'), | ||
| 'index' => 'email' | ||
| )); | ||
| $this->addColumn('action', array( | ||
| 'header' => Mage::helper('zendesk')->__('Action'), | ||
| 'renderer' => 'zendesk/adminhtml_create_customer_grid_renderer_action', | ||
| 'filter' => false, | ||
| 'sortable' => false | ||
| )); | ||
|
|
||
| return parent::_prepareColumns(); | ||
| } | ||
|
|
||
| public function getGridUrl() | ||
| { | ||
| return $this->getUrl('adminhtml/zendesk/loadBlock', array('block'=>'customer_grid', '_current' => true, 'collapse' => null)); | ||
| } | ||
|
|
||
| public function getRowUrl($row) | ||
| { | ||
| return ""; | ||
| } | ||
|
|
||
| } |
27 changes: 27 additions & 0 deletions
27
...p/code/community/Zendesk/Zendesk/Block/Adminhtml/Create/Customer/Grid/Renderer/Action.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| <?php | ||
| /** | ||
| * Copyright 2015 Zendesk | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| class Zendesk_Zendesk_Block_Adminhtml_Create_Customer_Grid_Renderer_Action extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract | ||
| { | ||
| public function render(Varien_Object $row) | ||
| { | ||
| if ($row->getId()) { | ||
| return "<button title='".Mage::helper('zendesk')->__('Add')."' type='button' class='scalable' onclick='javascript:insertUser(".$row->getId()."); return false;'><span><span><span>".Mage::helper('zendesk')->__('Add')."</span></span></span></button>"; | ||
| } | ||
| } | ||
|
|
||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
src/app/code/community/Zendesk/Zendesk/Block/Adminhtml/Create/Order.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| <?php | ||
| /** | ||
| * Copyright 2015 Zendesk | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| class Zendesk_Zendesk_Block_Adminhtml_Create_Order extends Mage_Adminhtml_Block_Widget_Form_Container | ||
| { | ||
|
|
||
| public function __construct() | ||
| { | ||
| parent::__construct(); | ||
| $this->setId('zendesk_create_order_search'); | ||
| } | ||
|
|
||
| public function getHeaderText() | ||
| { | ||
| return Mage::helper('zendesk')->__('Please Select Order to Add'); | ||
| } | ||
|
|
||
| public function getButtonsHtml() | ||
| { | ||
| $addButtonData = array( | ||
| 'label' => Mage::helper('zendesk')->__('Select Order'), | ||
| 'onclick' => 'showOrders()', | ||
| 'id' => 'show-orders' | ||
| ); | ||
| return $this->getLayout()->createBlock('adminhtml/widget_button')->setData($addButtonData)->toHtml(); | ||
| } | ||
|
|
||
| public function getHeaderCssClass() | ||
| { | ||
| return 'head-catalog-order'; | ||
| } | ||
|
|
||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've got a license fine in the root of the repo (https://github.com/zendesk/magento_extension/blob/master/LICENSE). I'm happy to not have these at the top of each file going forward.