Skip to content

Commit 656ff62

Browse files
committed
Changes after QA test
1 parent 2f04066 commit 656ff62

File tree

9 files changed

+38
-18
lines changed

9 files changed

+38
-18
lines changed

Block/Adminhtml/System/Config/Form/Info.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function render(\Magento\Framework\Data\Form\Element\AbstractElement $ele
4343
{
4444
$m = $this->moduleList->getOne($this->getModuleName());
4545
$html = '<div style="padding:10px;background-color:#f8f8f8;border:1px solid #ddd;margin-bottom:7px;">
46-
Blog Extension v' . $m['setup_version'] . ' was developed by <a href="http://magefan.com/" target="_blank">MageFan</a>.
46+
Blog Extension v' . $m['setup_version'] . ' was developed by <a href="https://magefan.com?utm_source=m2admin_blog_config&utm_medium=link&utm_campaign=regular" target="_blank">Magefan</a>.
4747
</div>';
4848

4949
return $html;

Block/Adminhtml/System/Config/Form/UpdateInfo.php

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,33 +21,56 @@ class UpdateInfo extends \Magento\Backend\Block\Template
2121
const PATH_TO_JSON_FILE = 'https://magefan.com/media/product-versions.json';
2222
const LATESTS_VERSION_CACHE_KEY = 'magefan_latests_product_versions';
2323

24+
/**
25+
* @var \Magento\Framework\HTTP\Client\Curl
26+
*/
2427
protected $curlClient;
25-
protected $_moduleList;
28+
29+
/**
30+
* @var ModuleListInterface
31+
*/
32+
protected $moduleList;
33+
34+
/**
35+
* @var mixed
36+
*/
2637
protected $latestVersion;
38+
39+
/**
40+
* @var mixed
41+
*/
2742
protected $currentVersion;
43+
44+
/**
45+
* @var AdminNotificationFeed
46+
*/
2847
protected $adminNotificationFeed;
48+
49+
/**
50+
* @var \Magento\Framework\App\CacheInterface
51+
*/
2952
protected $cacheManager;
3053

3154
/**
3255
* UpdateInfo constructor.
3356
* @param \Magento\Backend\Block\Template\Context $context
3457
* @param \Magento\Framework\HTTP\Client\Curl $curl
3558
* @param \Magento\Framework\Json\Helper\Data $jsonHelper
59+
* @param AdminNotificationFeed $adminNotificationFeed
3660
* @param ModuleListInterface $moduleList
3761
* @param array $data
3862
*/
3963
public function __construct(
40-
\Magento\Framework\App\CacheInterface $cacheManager,
4164
\Magento\Backend\Block\Template\Context $context,
4265
\Magento\Framework\HTTP\Client\Curl $curl,
4366
\Magento\Framework\Json\Helper\Data $jsonHelper,
4467
AdminNotificationFeed $adminNotificationFeed,
4568
ModuleListInterface $moduleList,
4669
array $data = []
4770
) {
48-
$this->cacheManager = $cacheManager;
71+
$this->cacheManager = $context->getCache();
4972
$this->adminNotificationFeed = $adminNotificationFeed;
50-
$this->_moduleList = $moduleList;
73+
$this->moduleList = $moduleList;
5174
$this->jsonHelper = $jsonHelper;
5275
$this->curlClient = $curl;
5376
parent::__construct($context, $data);
@@ -59,7 +82,7 @@ public function __construct(
5982
public function getCurrentVersion()
6083
{
6184
if (null === $this->currentVersion) {
62-
$this->currentVersion = $this->_moduleList
85+
$this->currentVersion = $this->moduleList
6386
->getOne($this->getModuleName())['setup_version'];
6487
}
6588

view/adminhtml/layout/blog_category_grid.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/layout_generic.xsd">
1111
<update handle="formkey"/>
1212
<update handle="blog_category_grid_block"/>
13-
<update handle="blog_update_info"/>
1413
<container name="root">
1514
<block class="Magento\Backend\Block\Widget\Grid\Container" name="blog.category.container" template="Magento_Backend::widget/grid/container/empty.phtml"/>
1615
</container>

view/adminhtml/layout/blog_category_index.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
-->
1010
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
1111
<update handle="formkey"/>
12-
<update handle="blog_category_grid_block"/>
1312
<update handle="blog_update_info"/>
13+
<update handle="blog_category_grid_block"/>
1414
<body>
1515
<referenceContainer name="content">
1616
<block class="Magefan\Blog\Block\Adminhtml\Category" name="blog.category.container"/>

view/adminhtml/layout/blog_comment_grid.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/layout_generic.xsd">
1111
<update handle="formkey"/>
1212
<update handle="blog_comment_grid_block"/>
13-
<update handle="blog_update_info"/>
1413
<container name="root">
1514
<block class="Magento\Backend\Block\Widget\Grid\Container" name="blog.comment.container" template="Magento_Backend::widget/grid/container/empty.phtml"/>
1615
</container>

view/adminhtml/layout/blog_comment_index.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
-->
1010
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
1111
<update handle="formkey"/>
12-
<update handle="blog_comment_grid_block"/>
1312
<update handle="blog_update_info"/>
13+
<update handle="blog_comment_grid_block"/>
1414
<body>
1515
<referenceContainer name="content">
1616
<block class="Magefan\Blog\Block\Adminhtml\Comment" name="blog.comment.container"/>

view/adminhtml/layout/blog_post_grid.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/layout_generic.xsd">
1111
<update handle="formkey"/>
1212
<update handle="blog_post_grid_block"/>
13-
<update handle="blog_update_info"/>
1413
<container name="root">
1514
<block class="Magento\Backend\Block\Widget\Grid\Container" name="blog.post.container" template="Magento_Backend::widget/grid/container/empty.phtml"/>
1615
</container>

view/adminhtml/templates/import.phtml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
<table>
5151
<tr>
5252
<td>
53-
<div class="itm-hld" onclick="window.open('https://magefan.com/migrate-joomla-to-magento2')">
53+
<div class="itm-hld" onclick="window.open('https://magefan.com/migrate-joomla-to-magento2?utm_source=m2admin_blog_import&utm_medium=link&utm_campaign=regular')">
5454
<img class="img" src="<?= $block->escapeUrl($this->getViewFileUrl('Magefan_Blog::images/joomla.jpg')) ?>" />
5555
<br/>
5656
<span class="lable">Import from Joomla<br/><br/></span>
@@ -63,7 +63,7 @@
6363
<table>
6464
<tr>
6565
<td>
66-
<div class="itm-hld" onclick="window.open('https://magefan.com/migrate-blogger-to-magento2')">
66+
<div class="itm-hld" onclick="window.open('https://magefan.com/migrate-blogger-to-magento2?utm_source=m2admin_blog_import&utm_medium=link&utm_campaign=regular')">
6767
<img class="img" src="<?= $block->escapeUrl($this->getViewFileUrl('Magefan_Blog::images/bloger.jpg')) ?>" />
6868
<br/>
6969
<span class="lable">Import from Blogger.com<br/><br/></span>
@@ -78,7 +78,7 @@
7878
<table>
7979
<tr>
8080
<td>
81-
<div class="itm-hld" onclick="window.open('https://magefan.com/migrate-drupal-to-magento2')">
81+
<div class="itm-hld" onclick="window.open('https://magefan.com/migrate-drupal-to-magento2?utm_source=m2admin_blog_import&utm_medium=link&utm_campaign=regular')">
8282
<img class="img" src="<?= $block->escapeUrl($this->getViewFileUrl('Magefan_Blog::images/drupal.jpg')) ?>" />
8383
<br/>
8484
<span class="lable">Import from Drupal<br/><br/></span>
@@ -91,7 +91,7 @@
9191
<table>
9292
<tr>
9393
<td>
94-
<div class="itm-hld" onclick="window.open('https://magefan.com/import-xml-csv-to-magento2-blog')">
94+
<div class="itm-hld" onclick="window.open('https://magefan.com/import-xml-csv-to-magento2-blog?utm_source=m2admin_blog_import&utm_medium=link&utm_campaign=regular')">
9595
<img class="img" src="<?= $block->escapeUrl($this->getViewFileUrl('Magefan_Blog::images/csv.jpg')) ?>" />
9696
<br/>
9797
<span class="lable">Import from CSV File<br/><br/></span>
@@ -104,7 +104,7 @@
104104
<table>
105105
<tr>
106106
<td>
107-
<div class="itm-hld" onclick="window.open('https://magefan.com/import-xml-csv-to-magento2-blog')">
107+
<div class="itm-hld" onclick="window.open('https://magefan.com/import-xml-csv-to-magento2-blog?utm_source=m2admin_blog_import&utm_medium=link&utm_campaign=regular')">
108108
<img class="img" src="<?= $block->escapeUrl($this->getViewFileUrl('Magefan_Blog::images/xml.jpg')) ?>" />
109109
<br/>
110110
<span class="lable">Import from XML File<br/><br/></span>
@@ -117,7 +117,7 @@
117117
<table>
118118
<tr>
119119
<td>
120-
<div class="itm-hld" onclick="window.open('http://magefan.com/contact/')">
120+
<div class="itm-hld" onclick="window.open('http://magefan.com/contact?utm_source=m2admin_blog_import&utm_medium=link&utm_campaign=regular')">
121121
<h2 class="img more">Need More?<br/><br/>Other CMS or Extension</h2>
122122
<span class="lable">Contact Magefan Team<br/><br/></span>
123123
</div>

view/adminhtml/templates/updateinfo.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<div class="messages">
1818
<div class="message message-notice notice">
1919
<div data-ui-id="messages-message-error">
20-
<?php $html = __('Important: It is recommended to update Blog Extension to the version %1. You can update it via composer or download the new versions archive from <a href="https://magefan.com/magento2-blog-extension?utm_source=update_blog_info_block_in_adminp&utm_medium=link1&utm_campaign=new_blog_version" target="_blank">Magefan Store</a>. Please <a href="https://magefan.com/contact?utm_source=update_blog_info_block_in_adminp&utm_medium=link2&utm_campaign=new_blog_version" target="_blank">contact</a> Magefan Team if you have any questions or need help with an update.', $block->getLatestVersion());
20+
<?php $html = __('Your Blog Extension is out of date. You can update it to the <strong>version %1</strong> via composer or you can download the new version archive from the <a href="https://magefan.com/magento2-blog-extension?utm_source=m2admin_blog_updateinfo&utm_medium=link1&utm_campaign=new_blog_version" target="_blank">Magefan Store</a>. Please <a href="https://magefan.com/contact?utm_source=m2admin_blog_updateinfo&utm_medium=link2&utm_campaign=new_blog_version" target="_blank">contact</a> Magefan Team if you have any questions or need help with an update.', $block->getLatestVersion());
2121
?>
2222
<?= $html ?>
2323
</div>

0 commit comments

Comments
 (0)