-
Notifications
You must be signed in to change notification settings - Fork 22
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
16 changed files
with
388 additions
and
1 deletion.
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
$(document).ready(function () { | ||
var $element = $('[data-menu-id="redirect/extensions"]'); | ||
$element.html('new'); | ||
$element.removeClass('empty'); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Vdlp\Redirect\Controllers; | ||
|
||
use Backend\Classes\Controller; | ||
use Backend\Facades\BackendMenu; | ||
use System\Classes\PluginManager; | ||
|
||
final class Extensions extends Controller | ||
{ | ||
/** @var string[] */ | ||
private static $extensions = [ | ||
'Vdlp.RedirectConditions', | ||
'Vdlp.RedirectConditionsDomain', | ||
'Vdlp.RedirectConditionsExample', | ||
'Vdlp.RedirectConditionsHeader', | ||
'Vdlp.RedirectConditionsUserAgent', | ||
]; | ||
|
||
public function __construct() | ||
{ | ||
parent::__construct(); | ||
|
||
BackendMenu::setContext('Vdlp.Redirect', 'redirect', 'extensions'); | ||
|
||
$this->addCss('/plugins/vdlp/redirect/assets/css/redirect.css'); | ||
$this->addJs('/plugins/vdlp/redirect/assets/javascript/redirect.js'); | ||
|
||
$this->pageTitle = 'Redirect Extensions (new)'; | ||
} | ||
|
||
public function index(): void | ||
{ | ||
$this->vars['extensions'] = []; | ||
|
||
foreach (self::$extensions as $extension) { | ||
$this->vars['extensions'][$extension] = PluginManager::instance()->hasPlugin($extension) | ||
&& !PluginManager::instance()->isDisabled($extension); | ||
} | ||
} | ||
} |
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
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
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<div class="pull-right"> | ||
<?php if ($installed): ?> | ||
<span class="pill success"><i class="icon icon-check"></i> installed</span> | ||
<?php else: ?> | ||
<span class="pill default">not installed</span> | ||
<?php endif; ?> | ||
</div> |
Oops, something went wrong.