-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
11 additions
and
80 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1,7 +1,5 @@ | ||
<?php | ||
/** | ||
* Magenerds\Dashboard\Block\AfterPrice | ||
* | ||
* Copyright (c) 2017 Magenerds | ||
* All rights reserved | ||
* | ||
|
@@ -12,21 +10,14 @@ | |
* [email protected] | ||
*/ | ||
|
||
/** | ||
* @category Magenerds | ||
* @package Magenerds_Dashboard | ||
* @subpackage Block | ||
* @copyright Copyright (c) 2017 Magenerds (http://www.magenerds.com) | ||
* @link http://www.magenerds.com/ | ||
* @author Florian Sydekum <[email protected]> | ||
*/ | ||
namespace Magenerds\Dashboard\Block\Adminhtml; | ||
|
||
use Magento\Backend\Block\Template; | ||
|
||
/** | ||
* Class Dashboard | ||
* @package Magenerds\Dashboard\Block\Adminhtml | ||
* @copyright Copyright (c) 2017 Magenerds (http://www.magenerds.com) | ||
* @link http://www.magenerds.com/ | ||
* @author Florian Sydekum <[email protected]> | ||
*/ | ||
class Dashboard extends Template | ||
{ | ||
|
@@ -62,19 +53,10 @@ public function getBlogFeeds() | |
|
||
$ctr = 1; | ||
foreach ($reader->import(self::BLOG_FEED_URL) as $feed) { | ||
$matches = []; | ||
preg_match('/^src=".*\..{3}"/', $feed->getContent(), $matches); | ||
$img = ''; | ||
|
||
if (count($matches)) { | ||
$img = substr($matches[0], 4, strlen($matches[0])); | ||
} | ||
|
||
$feeds[] = [ | ||
'link' => $feed->getLink(), | ||
'title' => $feed->getTitle(), | ||
'date' => substr($feed->getDateCreated(), 0, 10), | ||
'image' => $img, | ||
'description' => $feed->getDescription() | ||
]; | ||
if ($ctr == self::NUMBER_BLOG_FEEDS) break; | ||
|
@@ -96,20 +78,11 @@ public function getNewsFeeds() | |
|
||
$ctr = 1; | ||
foreach ($reader->import(self::NEWS_FEED_URL) as $feed) { | ||
$matches = []; | ||
preg_match('/^src=".*\..{3}"/', $feed->getContent(), $matches); | ||
$img = ''; | ||
|
||
if (count($matches)) { | ||
$img = substr($matches[0], 4, strlen($matches[0])); | ||
} | ||
|
||
$feeds[] = [ | ||
'link' => $feed->getLink(), | ||
'title' => $feed->getTitle(), | ||
'date' => substr($feed->getDateCreated(), 0, 10), | ||
'image' => $img, | ||
'description' => $feed->getDescription() | ||
'content' => $feed->getContent() | ||
]; | ||
if ($ctr == self::NUMBER_NEWS_FEEDS) break; | ||
$ctr++; | ||
|
This file contains 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 |
---|---|---|
@@ -1,7 +1,5 @@ | ||
<?php | ||
/** | ||
* Magenerds\Dashboard\Block\AfterPrice | ||
* | ||
* Copyright (c) 2017 Magenerds | ||
* All rights reserved | ||
* | ||
|
@@ -12,23 +10,16 @@ | |
* [email protected] | ||
*/ | ||
|
||
/** | ||
* @category Magenerds | ||
* @package Magenerds_Dashboard | ||
* @subpackage Controller | ||
* @copyright Copyright (c) 2017 Magenerds (http://www.magenerds.com) | ||
* @link http://www.magenerds.com/ | ||
* @author Florian Sydekum <[email protected]> | ||
*/ | ||
namespace Magenerds\Dashboard\Controller\Adminhtml\Dashboard; | ||
|
||
use Magento\Backend\App\Action\Context; | ||
use Magento\Framework\View\Result\PageFactory; | ||
use Magento\Backend\App\Action; | ||
|
||
/** | ||
* Class Index | ||
* @package Magenerds\Dashboard\Controller\Adminhtml\Dashboard | ||
* @copyright Copyright (c) 2017 Magenerds (http://www.magenerds.com) | ||
* @link http://www.magenerds.com/ | ||
* @author Florian Sydekum <[email protected]> | ||
*/ | ||
class Index extends Action | ||
{ | ||
|
This file contains 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 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 |
---|---|---|
|
@@ -12,9 +12,6 @@ | |
*/ | ||
/** | ||
* @category Magenerds | ||
* @package Magenerds_Dashboard | ||
* @subpackage etc | ||
* @copyright Copyright (c) 2017 Magenerds (http://www.magenerds.com) | ||
* @link http://www.magenerds.com/ | ||
* @author Florian Sydekum <[email protected]> | ||
|
This file contains 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 |
---|---|---|
|
@@ -12,9 +12,6 @@ | |
*/ | ||
/** | ||
* @category Magenerds | ||
* @package Magenerds_Dashboard | ||
* @subpackage etc | ||
* @copyright Copyright (c) 2017 Magenerds (http://www.magenerds.com) | ||
* @link http://www.magenerds.com/ | ||
* @author Florian Sydekum <[email protected]> | ||
|
This file contains 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 |
---|---|---|
|
@@ -12,9 +12,6 @@ | |
*/ | ||
/** | ||
* @category Magenerds | ||
* @package Magenerds_Dashboard | ||
* @subpackage etc | ||
* @copyright Copyright (c) 2017 Magenerds (http://www.magenerds.com) | ||
* @link http://www.magenerds.com/ | ||
* @author Florian Sydekum <[email protected]> | ||
|
This file contains 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 |
---|---|---|
|
@@ -12,9 +12,6 @@ | |
*/ | ||
/** | ||
* @category Magenerds | ||
* @package Magenerds_Dashboard | ||
* @subpackage etc | ||
* @copyright Copyright (c) 2017 Magenerds (http://www.magenerds.com) | ||
* @link http://www.magenerds.com/ | ||
* @author Florian Sydekum <[email protected]> | ||
|
This file contains 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 |
---|---|---|
@@ -1,7 +1,5 @@ | ||
<?php | ||
/** | ||
* Magenerds\Dashboard\Block\AfterPrice | ||
* | ||
* Copyright (c) 2017 Magenerds | ||
* All rights reserved | ||
* | ||
|
@@ -13,9 +11,6 @@ | |
*/ | ||
|
||
/** | ||
* @category Magenerds | ||
* @package Magenerds_Dashboard | ||
* @subpackage Module | ||
* @copyright Copyright (c) 2017 Magenerds (http://www.magenerds.com) | ||
* @link http://www.magenerds.com/ | ||
* @author Florian Sydekum <[email protected]> | ||
|
This file contains 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 |
---|---|---|
|
@@ -12,9 +12,6 @@ | |
*/ | ||
/** | ||
* @category Magenerds | ||
* @package Magenerds_Dashboard | ||
* @subpackage view | ||
* @copyright Copyright (c) 2017 Magenerds (http://www.magenerds.com) | ||
* @link http://www.magenerds.com/ | ||
* @author Florian Sydekum <[email protected]> | ||
|
This file contains 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 |
---|---|---|
|
@@ -11,9 +11,6 @@ | |
*/ | ||
|
||
/** | ||
* @category Magenerds | ||
* @package Magenerds_Dashboard | ||
* @subpackage view | ||
* @copyright Copyright (c) 2017 Magenerds (http://www.magenerds.com) | ||
* @link http://www.magenerds.com/ | ||
* @author Florian Sydekum <[email protected]> | ||
|
@@ -59,10 +56,10 @@ | |
to for contacting us. We only support cases issued via our bug report form. | ||
</div> | ||
<div class="buttons"> | ||
<button class="action-primary" title="Get support" id="support" onclick="setLocation('')"> | ||
<button class="action-primary" title="Get support" id="support" onclick="setLocation('http://www.magenerds.com/report-a-bug/')"> | ||
<span>Get support</span> | ||
</button> | ||
<button class="action-primary" title="Documentation" id="documentation" onclick="setLocation('')"> | ||
<button class="action-primary" title="Documentation" id="documentation" onclick="setLocation('http://doc.magenerds.com/')"> | ||
<span>Documentation</span> | ||
</button> | ||
<button class="action-primary" title="Website" id="website" onclick="setLocation('http://www.magenerds.com')"> | ||
|
@@ -83,9 +80,6 @@ | |
<?php foreach ($block->getBlogFeeds() as $feed): ?> | ||
<li> | ||
<div class="title"><a href="<?php echo $feed['link'] ?>" target="_blank"><?php echo $feed['title'] ?></a> (<?php echo $feed['date']; ?>)</div> | ||
<?php if ($feed['image'] != ''): ?> | ||
<div><img src="<?php echo $feed['image'] ?>" /></div> | ||
<?php endif; ?> | ||
<div class="description"><?php echo $feed['description'] ?>... <a href="<?php echo $feed['link'] ?>" target="_blank">(read more)</a></div> | ||
</li> | ||
<?php endforeach; ?> | ||
|
@@ -96,11 +90,8 @@ | |
<ul> | ||
<?php foreach ($block->getNewsFeeds() as $feed): ?> | ||
<li> | ||
<div class="title"><a href="<?php echo $feed['link'] ?>" target="_blank"><?php echo $feed['title'] ?></a> (<?php echo $feed['date']; ?>)</div> | ||
<?php if ($feed['image'] != ''): ?> | ||
<div><img src="<?php echo $feed['image'] ?>" /></div> | ||
<?php endif; ?> | ||
<div class="description"><?php echo $feed['description'] ?>... <a href="<?php echo $feed['link'] ?>" target="_blank">(read more)</a></div> | ||
<div class="title"><?php echo $feed['title'] ?></div> | ||
<div class="content"><?php echo $feed['content'] ?></div> | ||
</li> | ||
<?php endforeach; ?> | ||
</ul> | ||
|
This file contains 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 |
---|---|---|
|
@@ -10,9 +10,6 @@ | |
*/ | ||
|
||
/** | ||
* @category Magenerds | ||
* @package Magenerds_Dashboard | ||
* @subpackage view | ||
* @copyright Copyright (c) 2017 Magenerds (http://www.magenerds.com) | ||
* @link http://www.magenerds.com/ | ||
* @author Florian Sydekum <[email protected]> | ||
|