Merge branch 'develop'

This commit is contained in:
Dennis Eichhorn 2024-04-24 23:44:22 +00:00
commit 18741d4d0c
71 changed files with 115 additions and 110 deletions

View File

@ -13,10 +13,15 @@ on:
- cron: '0 0 1,15 * *'
jobs:
general_module_workflow:
general_module_workflow_php:
uses: Karaka-Management/Karaka/.github/workflows/php_template.yml@develop
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_PAT: ${{ secrets.GH_PAT }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
general_module_workflow_js:
uses: Karaka-Management/Karaka/.github/workflows/js_template.yml@develop
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_PAT: ${{ secrets.GH_PAT }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

View File

@ -19,7 +19,7 @@
"type": 2,
"subtype": 1,
"name": "General",
"uri": "{/base}/help/general?{?}",
"uri": "{/base}/help/general",
"target": "self",
"icon": null,
"order": 5,
@ -34,7 +34,7 @@
"type": 2,
"subtype": 1,
"name": "Modules",
"uri": "{/base}/help/module/list?{?}",
"uri": "{/base}/help/module/list",
"target": "self",
"icon": null,
"order": 10,
@ -49,7 +49,7 @@
"type": 2,
"subtype": 1,
"name": "Developer",
"uri": "{/base}/help/developer?{?}",
"uri": "{/base}/help/developer",
"target": "self",
"icon": null,
"order": 15,

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Help\Admin\Install
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Help\Admin\Install
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Help
* @copyright Dennis Eichhorn
@ -22,6 +22,7 @@ return [
[
'dest' => '\Modules\Help\Controller\SearchController:searchHelp',
'verb' => RouteVerb::ANY,
'active' => true,
'permission' => [
'module' => SearchController::NAME,
'type' => PermissionType::READ,
@ -33,6 +34,7 @@ return [
[
'dest' => '\Modules\Help\Controller\SearchController:searchHelp',
'verb' => RouteVerb::ANY,
'active' => true,
'permission' => [
'module' => SearchController::NAME,
'type' => PermissionType::READ,
@ -44,6 +46,7 @@ return [
[
'dest' => '\Modules\Help\Controller\SearchController:searchHelp',
'verb' => RouteVerb::ANY,
'active' => true,
'permission' => [
'module' => SearchController::NAME,
'type' => PermissionType::READ,
@ -55,6 +58,7 @@ return [
[
'dest' => '\Modules\Help\Controller\SearchController:searchHelp',
'verb' => RouteVerb::ANY,
'active' => true,
'permission' => [
'module' => SearchController::NAME,
'type' => PermissionType::READ,

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Help\Admin
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules
* @copyright Dennis Eichhorn
@ -18,10 +18,11 @@ use phpOMS\Account\PermissionType;
use phpOMS\Router\RouteVerb;
return [
'^.*/help/general(\?.*)?$' => [
'^/help/general(\?.*)?$' => [
[
'dest' => '\Modules\Help\Controller\BackendController:viewHelpGeneral',
'verb' => RouteVerb::GET,
'active' => true,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::READ,
@ -29,10 +30,11 @@ return [
],
],
],
'^.*/help/module/list(\?.*)?$' => [
'^/help/module/list(\?.*)?$' => [
[
'dest' => '\Modules\Help\Controller\BackendController:viewHelpModuleList',
'verb' => RouteVerb::GET,
'active' => true,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::READ,
@ -40,10 +42,11 @@ return [
],
],
],
'^.*/help/module/view(\?.*)?$' => [
'^/help/module/view(\?.*)?$' => [
[
'dest' => '\Modules\Help\Controller\BackendController:viewHelpModule',
'verb' => RouteVerb::GET,
'active' => true,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::READ,
@ -51,10 +54,11 @@ return [
],
],
],
'^.*/help/developer(\?.*)?$' => [
'^/help/developer(\?.*)?$' => [
[
'dest' => '\Modules\Help\Controller\BackendController:viewHelpDeveloper',
'verb' => RouteVerb::GET,
'active' => true,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::READ,

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Help\Admin
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Help\Admin
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Help\Admin
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Help
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Help
* @copyright Dennis Eichhorn
@ -72,6 +72,14 @@ final class BackendController extends Controller
$head->addAsset(AssetType::JSLATE, 'Modules/Help/Controller/Controller.js?v=' . self::VERSION, ['nonce' => $nonce, 'type' => 'module']);
}
private function loadMermaid(ResponseAbstract $response) : void
{
$head = $response->data['Content']->head;
$nonce = $this->app->appSettings->getOption('script-nonce');
$head->addAsset(AssetType::JSLATE, 'Resources/mermaid/mermaid.min.js?v=' . $this->app->version, ['nonce' => $nonce]);
}
/**
* Routing end-point for application behavior.
*
@ -274,10 +282,16 @@ final class BackendController extends Controller
$toParse = \file_get_contents($path);
$summary = \file_get_contents(__DIR__ . '/../../../Developer-Guide/SUMMARY.md');
$content = Markdown::parse($toParse === false ? '' : $toParse);
if (\stripos($toParse, '```mermaid') !== false) {
$this->loadMermaid($response);
}
$markdown = new Markdown();
$content = $markdown->parse($toParse === false ? '' : $toParse);
$navigation = Markdown::parse($summary === false ? '' : $summary);
$view->setTemplate('/Modules/Help/Theme/Backend/help-developer');
$view->setTemplate('/Modules/Help/Theme/Backend/help-general');
$view->data['content'] = $content;
$view->data['navigation'] = $navigation;

View File

@ -2,6 +2,7 @@ import { Autoloader } from '../../../jsOMS/Autoloader.js';
Autoloader.defineNamespace('omsApp.Modules');
/* global omsApp */
omsApp.Modules.Help = class {
/**
* @constructor
@ -13,17 +14,11 @@ omsApp.Modules.Help = class {
this.app = app;
};
bind (id)
bind ()
{
const e = typeof id === 'undefined' ? document.getElementsByTagName('code') : [document.getElementById(id)],
length = e.length;
/* global hljs */
hljs.highlightAll();
};
bindElement (code)
{
};
};
window.omsApp.moduleManager.get('Help').bind();
window.omsApp.moduleManager.get('Help').bind();

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Help
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Help
* @copyright Dennis Eichhorn

0
ICAL.txt → ICLA.txt Executable file → Normal file
View File

View File

@ -46,3 +46,7 @@ Unless required by applicable law or agreed to in writing, Licensor provides the
7. Limitation of Liability
In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
8. Future Changes
The Licensor may change the License for future versions as he sees fit.

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Help\Models
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Localization
* @copyright Dennis Eichhorn

View File

@ -1,17 +0,0 @@
<div class="row">
<div class="col-xs-12 col-md-8 col-lg-9">
<section class="portlet">
<article>
<?= $this->data['content']; ?>
</article>
</section>
</div>
<div class="col-xs-12 col-md-4 col-lg-3 pH">
<section class="portlet">
<article>
<?= $this->data['navigation']; ?>
</article>
</section>
</div>
</div>

View File

@ -9,9 +9,9 @@
<div class="col-xs-12 col-md-4 col-lg-3 pH">
<section class="portlet">
<article>
<nav class="content-side-nav">
<?= $this->data['navigation']; ?>
</article>
</nav>
</section>
</div>
</div>

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Admin\Template\Backend
* @copyright Dennis Eichhorn
@ -23,13 +23,13 @@ $modules = $this->data['modules'];
$tableView = $this->data['tableView'];
$tableView->id = 'helpModuleList';
$tableView->baseUri = 'help/module/list';
$tableView->exportUri = '{/api}admin/module/list/export';
$tableView->exportUri = '{/api}admin/module/list/export?csrf={$CSRF}';
$tableView->setObjects($modules);
?>
<div class="row">
<div class="col-xs-12">
<div class="portlet">
<section class="portlet">
<div class="portlet-head">
<?= $tableView->renderTitle(
$this->getHtml('Modules'),
@ -68,6 +68,6 @@ $tableView->setObjects($modules);
<?php endif; ?>
</table>
</div>
</div>
</section>
</div>
</div>

View File

@ -18,17 +18,13 @@
<?php if (!empty($this->data['navigation'] ?? '')) : ?>
<section class="portlet">
<div class="portlet-body">
<article><?= $this->data['navigation']; ?></article>
</div>
<nav class="content-side-nav"><?= $this->data['navigation']; ?></nav>
</section>
<?php endif; ?>
<?php if (!empty($this->data['devNavigation'] ?? '')) : ?>
<section class="portlet">
<div class="portlet-body">
<article><?= $this->data['devNavigation']; ?></article>
</div>
<nav class="content-side-nav"><?= $this->data['devNavigation']; ?></nav>
</section>
<?php endif; ?>
</div>

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package tests
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules/tests
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package Modules\Help\tests
* @copyright Dennis Eichhorn

View File

@ -2,7 +2,7 @@
/**
* Jingga
*
* PHP Version 8.1
* PHP Version 8.2
*
* @package tests
* @copyright Dennis Eichhorn