Skip to content

Commit 8c4e196

Browse files
committed
Added feedback block to the blog admin panel pages
1 parent 46567f0 commit 8c4e196

File tree

7 files changed

+59
-0
lines changed

7 files changed

+59
-0
lines changed

view/adminhtml/layout/blog_import_aw.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<css src="jquery/fileUploader/css/jquery.fileupload-ui.css"/>
1313
</head>
1414
<update handle="editor"/>
15+
<update handle="blog_update_info"/>
1516
<body>
1617
<referenceContainer name="content">
1718
<block class="Magefan\Blog\Block\Adminhtml\Import\Aw" name="blog.import.aw" />

view/adminhtml/layout/blog_import_index.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<css src="Magefan_Blog::css/import.css"/>
1414
</head>
1515
<update handle="editor"/>
16+
<update handle="blog_update_info"/>
1617
<body>
1718
<referenceContainer name="content">
1819
<block class="Magento\Backend\Block\Template" name="blog.import" template="Magefan_Blog::import.phtml" />

view/adminhtml/layout/blog_import_wordpress.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<css src="jquery/fileUploader/css/jquery.fileupload-ui.css"/>
1313
</head>
1414
<update handle="editor"/>
15+
<update handle="blog_update_info"/>
1516
<body>
1617
<referenceContainer name="content">
1718
<block class="Magefan\Blog\Block\Adminhtml\Import\Wordpress" name="blog.import.wordpress" />

view/adminhtml/layout/blog_update_info.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
-->
1010
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
1111
<body>
12+
<referenceContainer name="header.inner.left">
13+
<block class="Magento\Backend\Block\Template" name="blog.feedback.button" after="-" template="Magefan_Blog::feedback_button.phtml"/>
14+
</referenceContainer>
1215
<referenceContainer name="content">
1316
<block class="Magefan\Blog\Block\Adminhtml\System\Config\Form\UpdateInfo" name="blog.update.info" template="Magefan_Blog::updateinfo.phtml"/>
1417
</referenceContainer>
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<?php
2+
/**
3+
* Copyright © Magefan ([email protected]). All rights reserved.
4+
* See LICENSE.txt for license details (http://opensource.org/licenses/osl-3.0.php).
5+
*
6+
* Glory to Ukraine! Glory to the heroes!
7+
*/
8+
?>
9+
<?php
10+
/**
11+
* Blog feedback button
12+
*
13+
* @var $block \Magento\Backend\Block\Template
14+
*/
15+
?>
16+
<div id="blog-feedback-block">
17+
<div class="blog-leave-feedback blog-leave-review">
18+
<img src="<?= $block->escapeUrl($this->getViewFileUrl('Magefan_Blog::images/feedback-ico.png')) ?>" />
19+
<a target="_blank" href="https://magefan.com/review/product/list/id/1797/?utm_source=m2admin_blog_leave_feedback&utm_medium=link&utm_campaign=regular">
20+
<?= __('Leave a review about the blog extension') ?>
21+
</a>
22+
</div>
23+
<div class="blog-leave-feedback blog-leave-suggest">
24+
<img src="<?= $block->escapeUrl($this->getViewFileUrl('Magefan_Blog::images/add-feature-ico.png')) ?>" />
25+
<a target="_blank" href="https://magefan.com/contact?utm_source=m2admin_blog_leave_suggest&utm_medium=link&utm_campaign=regular">
26+
<?= __('Suggest a new blog feature') ?>
27+
</a>
28+
</div>
29+
</div>
30+
31+
<style>
32+
.blog-leave-feedback {display:inline-block;padding: 15px 15px 0 0}
33+
.blog-leave-feedback a {color:#000;text-decoration:underline}
34+
.blog-leave-feedback img {float:left; margin-right: 10px; height:20px}
35+
</style>
36+
37+
<script>
38+
require(['jquery', 'jquery/ui', 'domReady!'], function($){
39+
$(document).ready( function() {
40+
if (Math.floor(Math.random() * 10) == 1) {
41+
var s = 1000;
42+
var d = 2000;
43+
for(var i=0;i<3;i++) {
44+
setTimeout(function () {
45+
$('#blog-feedback-block').animate({opacity: "0.2"}, parseInt(d/2)).animate({opacity: "1"}, d);
46+
}, s);
47+
s+=d;
48+
}
49+
50+
}
51+
});
52+
});
53+
</script>
583 Bytes
Loading
573 Bytes
Loading

0 commit comments

Comments
 (0)