Skip to content

Commit

Permalink
Issue #20924 - fix Pending Reviews label, add menu for pending review…
Browse files Browse the repository at this point in the history
…s, fix delete review alert and redirect issue if go to edit page from pending review grid
  • Loading branch information
dankhrapiyush committed Feb 3, 2019
1 parent ba5bf0d commit 01d68c6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/code/Magento/Review/Block/Adminhtml/Edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,13 @@ protected function _construct()
}

if ($this->getRequest()->getParam('ret', false) == 'pending') {
$this->buttonList->update('back', 'onclick', 'setLocation(\'' . $this->getUrl('catalog/*/pending') . '\')');
$this->buttonList->update('back', 'onclick', 'setLocation(\'' . $this->getUrl('review/*/pending') . '\')');
$this->buttonList->update(
'delete',
'onclick',
'deleteConfirm(' . '\'' . __(
'Are you sure you want to do this?'
) . '\' ' . '\'' . $this->getUrl(
) . '\', ' . '\'' . $this->getUrl(
'*/*/delete',
[$this->_objectId => $this->getRequest()->getParam($this->_objectId), 'ret' => 'pending']
) . '\'' . ')'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function execute()
if ($nextId) {
$resultRedirect->setPath('review/*/edit', ['id' => $nextId]);
} elseif ($this->getRequest()->getParam('ret') == 'pending') {
$resultRedirect->setPath('*/*/pending');
$resultRedirect->setPath('review/*/pending');
} else {
$resultRedirect->setPath('*/*/');
}
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Review/etc/acl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<resource id="Magento_Backend::marketing">
<resource id="Magento_Backend::marketing_user_content">
<resource id="Magento_Review::reviews_all" title="Reviews" translate="title" sortOrder="10"/>
<resource id="Magento_Review::pending" title="Reviews" translate="title" sortOrder="20"/>
<resource id="Magento_Review::pending" title="Pending Reviews" translate="title" sortOrder="20"/>
</resource>
</resource>
</resource>
Expand Down
1 change: 1 addition & 0 deletions app/code/Magento/Review/etc/adminhtml/menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<menu>
<add id="Magento_Review::catalog_reviews_ratings_ratings" title="Rating" translate="title" module="Magento_Review" sortOrder="60" parent="Magento_Backend::stores_attributes" action="review/rating/" resource="Magento_Review::ratings"/>
<add id="Magento_Review::catalog_reviews_ratings_reviews_all" title="Reviews" translate="title" module="Magento_Review" parent="Magento_Backend::marketing_user_content" sortOrder="10" action="review/product/index" resource="Magento_Review::reviews_all"/>
<add id="Magento_Review::catalog_reviews_ratings_pending" title="Pending Reviews" translate="title" module="Magento_Review" parent="Magento_Backend::marketing_user_content" sortOrder="20" action="review/product/pending" resource="Magento_Review::pending"/>
<add id="Magento_Review::report_review" title="Reviews" translate="title" module="Magento_Reports" sortOrder="20" parent="Magento_Reports::report" resource="Magento_Reports::review"/>
<add id="Magento_Review::report_review_customer" title="By Customers" translate="title" sortOrder="10" module="Magento_Review" parent="Magento_Review::report_review" action="reports/report_review/customer" resource="Magento_Reports::review_customer"/>
<add id="Magento_Review::report_review_product" title="By Products" translate="title" sortOrder="20" module="Magento_Review" parent="Magento_Review::report_review" action="reports/report_review/product" resource="Magento_Reports::review_product"/>
Expand Down

0 comments on commit 01d68c6

Please sign in to comment.