mirror of
https://github.com/Karaka-Management/oms-Admin.git
synced 2026-02-14 03:28:41 +00:00
fix img. minification action
This commit is contained in:
parent
12c6144c59
commit
ba5217dda4
2
.github/workflows/image.yml
vendored
2
.github/workflows/image.yml
vendored
|
|
@ -19,6 +19,6 @@ jobs:
|
||||||
uses: actions/checkout@master
|
uses: actions/checkout@master
|
||||||
|
|
||||||
- name: Compress Images
|
- name: Compress Images
|
||||||
uses: calibreapp/image-actions@master
|
uses: calibreapp/image-actions@main
|
||||||
with:
|
with:
|
||||||
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
@ -149,4 +149,15 @@ return [
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
'^.*/admin/module/hook/list\?.*$' => [
|
||||||
|
[
|
||||||
|
'dest' => '\Modules\Admin\Controller\BackendController:viewModuleHookList',
|
||||||
|
'verb' => RouteVerb::GET,
|
||||||
|
'permission' => [
|
||||||
|
'module' => BackendController::NAME,
|
||||||
|
'type' => PermissionType::READ,
|
||||||
|
'state' => PermissionCategory::MODULE,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -442,6 +442,47 @@ final class BackendController extends Controller
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method which generates the module profile view.
|
||||||
|
*
|
||||||
|
* @param RequestAbstract $request Request
|
||||||
|
* @param ResponseAbstract $response Response
|
||||||
|
* @param mixed $data Generic data
|
||||||
|
*
|
||||||
|
* @return RenderableInterface Response can be rendered
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function viewModuleHookList(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
|
||||||
|
{
|
||||||
|
$view = new View($this->app->l11nManager, $request, $response);
|
||||||
|
$view->setTemplate('/Modules/Admin/Theme/Backend/modules-hook-list');
|
||||||
|
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1000105001, $request, $response));
|
||||||
|
|
||||||
|
$module = $request->getData('id') ?? '';
|
||||||
|
$view->setData('module', $module);
|
||||||
|
|
||||||
|
$appPath = __DIR__ . '/../../../Web';
|
||||||
|
$activeHooks = [];
|
||||||
|
|
||||||
|
$apps = \scandir($appPath);
|
||||||
|
if ($apps === false) {
|
||||||
|
$apps = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($apps as $app) {
|
||||||
|
if (!\is_file(__DIR__ . '/../../../Web/' . $app . '/Hooks.php')) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$activeHooks[$app] = include __DIR__ . '/../../../Web/' . $app . '/Hooks.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
$view->setData('hooks', $activeHooks);
|
||||||
|
|
||||||
|
return $view;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method which generates the module profile view.
|
* Method which generates the module profile view.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -162,6 +162,7 @@ return ['Admin' => [
|
||||||
'Uppercase' => 'Uppercase',
|
'Uppercase' => 'Uppercase',
|
||||||
'Username' => 'Username',
|
'Username' => 'Username',
|
||||||
'Value' => 'Value',
|
'Value' => 'Value',
|
||||||
|
'Verb' => 'Verb',
|
||||||
'Version' => 'Version',
|
'Version' => 'Version',
|
||||||
'VeryFast' => 'Very Fast',
|
'VeryFast' => 'Very Fast',
|
||||||
'VeryHeavy' => 'Very Heavy',
|
'VeryHeavy' => 'Very Heavy',
|
||||||
|
|
|
||||||
109
Theme/Backend/modules-hook-list.tpl.php
Normal file
109
Theme/Backend/modules-hook-list.tpl.php
Normal file
|
|
@ -0,0 +1,109 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Karaka
|
||||||
|
*
|
||||||
|
* PHP Version 8.0
|
||||||
|
*
|
||||||
|
* @package Modules\Admin\Template\Backend
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link https://karaka.app
|
||||||
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
use phpOMS\Message\Http\HttpHeader;
|
||||||
|
use phpOMS\Router\RouteVerb;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var \phpOMS\Views\View $this
|
||||||
|
*/
|
||||||
|
$hooks = $this->getData('hooks') ?? [];
|
||||||
|
$module = $this->getData('module') ?? '';
|
||||||
|
|
||||||
|
echo $this->getData('nav')->render();
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<div class="portlet">
|
||||||
|
<div class="portlet-head"><?= $this->getHtml('Hooks'); ?><i class="fa fa-download floatRight download btn"></i></div>
|
||||||
|
<div class="slider">
|
||||||
|
<table id="navElements" class="default sticky">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td><?= $this->getHtml('Active'); ?>
|
||||||
|
<td><?= $this->getHtml('App'); ?>
|
||||||
|
<label for="navElements-sort-1">
|
||||||
|
<input type="radio" name="navElements-sort" id="navElements-sort-1">
|
||||||
|
<i class="sort-asc fa fa-chevron-up"></i>
|
||||||
|
</label>
|
||||||
|
<label for="navElements-sort-2">
|
||||||
|
<input type="radio" name="navElements-sort" id="navElements-sort-2">
|
||||||
|
<i class="sort-desc fa fa-chevron-down"></i>
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<i class="filter fa fa-filter"></i>
|
||||||
|
</label>
|
||||||
|
<td><?= $this->getHtml('Verb'); ?>
|
||||||
|
<label for="navElements-sort-3">
|
||||||
|
<input type="radio" name="navElements-sort" id="navElements-sort-3">
|
||||||
|
<i class="sort-asc fa fa-chevron-up"></i>
|
||||||
|
</label>
|
||||||
|
<label for="navElements-sort-4">
|
||||||
|
<input type="radio" name="navElements-sort" id="navElements-sort-4">
|
||||||
|
<i class="sort-desc fa fa-chevron-down"></i>
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<i class="filter fa fa-filter"></i>
|
||||||
|
</label>
|
||||||
|
<td><?= $this->getHtml('Route'); ?>
|
||||||
|
<label for="navElements-sort-5">
|
||||||
|
<input type="radio" name="navElements-sort" id="navElements-sort-5">
|
||||||
|
<i class="sort-asc fa fa-chevron-up"></i>
|
||||||
|
</label>
|
||||||
|
<label for="navElements-sort-6">
|
||||||
|
<input type="radio" name="navElements-sort" id="navElements-sort-6">
|
||||||
|
<i class="sort-desc fa fa-chevron-down"></i>
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<i class="filter fa fa-filter"></i>
|
||||||
|
</label>
|
||||||
|
<td><?= $this->getHtml('Destination'); ?>
|
||||||
|
<label for="navElements-sort-7">
|
||||||
|
<input type="radio" name="navElements-sort" id="navElements-sort-7">
|
||||||
|
<i class="sort-asc fa fa-chevron-up"></i>
|
||||||
|
</label>
|
||||||
|
<label for="navElements-sort-8">
|
||||||
|
<input type="radio" name="navElements-sort" id="navElements-sort-8">
|
||||||
|
<i class="sort-desc fa fa-chevron-down"></i>
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<i class="filter fa fa-filter"></i>
|
||||||
|
</label>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php $c = 0;
|
||||||
|
foreach ($hooks as $app => $appHooks) :
|
||||||
|
foreach ($appHooks as $uri => $destinations) :
|
||||||
|
foreach ($destinations as $route) :
|
||||||
|
if (\stripos($route['dest'], '\Modules\\' . $module . '\Controller') === false) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
++$c;
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td><label class="checkbox" for="iActive-<?= $c ?>">
|
||||||
|
<input id="iActive-<?= $c ?>" type="checkbox" name="active_route" value="<?= $this->printHtml($uri); ?>"<?= true ? ' checked' : ''; ?>>
|
||||||
|
<span class="checkmark"></span>
|
||||||
|
</label>
|
||||||
|
<td><?= $app; ?>
|
||||||
|
<td><?= RouteVerb::getName((string) $route['verb']); ?>
|
||||||
|
<td><?= $uri; ?>
|
||||||
|
<td><?= $route['dest']; ?>
|
||||||
|
<?php endforeach; endforeach; endforeach; ?>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
use phpOMS\Message\Http\HttpHeader;
|
use phpOMS\Message\Http\HttpHeader;
|
||||||
|
use phpOMS\Router\RouteVerb;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var \phpOMS\Views\View $this
|
* @var \phpOMS\Views\View $this
|
||||||
|
|
@ -44,6 +45,18 @@ echo $this->getData('nav')->render();
|
||||||
<label>
|
<label>
|
||||||
<i class="filter fa fa-filter"></i>
|
<i class="filter fa fa-filter"></i>
|
||||||
</label>
|
</label>
|
||||||
|
<td><?= $this->getHtml('Verb'); ?>
|
||||||
|
<label for="navElements-sort-3">
|
||||||
|
<input type="radio" name="navElements-sort" id="navElements-sort-3">
|
||||||
|
<i class="sort-asc fa fa-chevron-up"></i>
|
||||||
|
</label>
|
||||||
|
<label for="navElements-sort-4">
|
||||||
|
<input type="radio" name="navElements-sort" id="navElements-sort-4">
|
||||||
|
<i class="sort-desc fa fa-chevron-down"></i>
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<i class="filter fa fa-filter"></i>
|
||||||
|
</label>
|
||||||
<td><?= $this->getHtml('Route'); ?>
|
<td><?= $this->getHtml('Route'); ?>
|
||||||
<label for="navElements-sort-5">
|
<label for="navElements-sort-5">
|
||||||
<input type="radio" name="navElements-sort" id="navElements-sort-5">
|
<input type="radio" name="navElements-sort" id="navElements-sort-5">
|
||||||
|
|
@ -86,6 +99,7 @@ echo $this->getData('nav')->render();
|
||||||
<span class="checkmark"></span>
|
<span class="checkmark"></span>
|
||||||
</label>
|
</label>
|
||||||
<td><?= $app; ?>
|
<td><?= $app; ?>
|
||||||
|
<td><?= RouteVerb::getName((string) $route['verb']); ?>
|
||||||
<td><?= $uri; ?>
|
<td><?= $uri; ?>
|
||||||
<td><?= $route['dest']; ?>
|
<td><?= $route['dest']; ?>
|
||||||
<?php endforeach; endforeach; endforeach; ?>
|
<?php endforeach; endforeach; endforeach; ?>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user