mirror of
https://github.com/Karaka-Management/oms-Help.git
synced 2026-01-11 12:58:41 +00:00
add pseudo de help doc
This commit is contained in:
parent
6ee3528893
commit
6faf8fa959
|
|
@ -158,7 +158,7 @@ final class BackendController extends Controller
|
|||
$summaryPath = __DIR__ . '/../../' . $request->getData('id') . '/Docs/Help/en/SUMMARY.md';
|
||||
$devSummaryPath = __DIR__ . '/../../' . $request->getData('id') . '/Docs/Dev/en/SUMMARY.md';
|
||||
|
||||
$toParse = \file_get_contents($path);
|
||||
$toParse = $path === '' ? '' : \file_get_contents($path);
|
||||
$summary = \file_exists($summaryPath) ? \file_get_contents($summaryPath) : '';
|
||||
$devSummary = \file_exists($devSummaryPath) ? \file_get_contents($devSummaryPath) : '';
|
||||
|
||||
|
|
@ -190,14 +190,26 @@ final class BackendController extends Controller
|
|||
if ($request->getData('page') === 'table-of-contencts' || $request->getData('page') === null) {
|
||||
$page = 'introduction';
|
||||
} else {
|
||||
$typePos = \stripos($request->getData('page'), '/');
|
||||
$decoded = \urldecode($request->getData('page'));
|
||||
$typePos = \stripos($decoded, '/');
|
||||
$typePos = $typePos === false ? -1 : $typePos;
|
||||
$page = \substr($request->getData('page'), $typePos + 1);
|
||||
$type = \substr($request->getData('page'), 0, $typePos);
|
||||
$page = \substr($decoded, $typePos + 1);
|
||||
$type = \substr($decoded, 0, $typePos);
|
||||
}
|
||||
|
||||
$basePath = __DIR__ . '/../../' . $request->getData('id') . '/Docs/' . $type . '/' . $request->getHeader()->getL11n()->getLanguage();
|
||||
$path = \realpath($basePath . '/' . $page . '.md');
|
||||
|
||||
if ($path === false) {
|
||||
$basePath = __DIR__ . '/../../' . $request->getData('id') . '/Docs/' . $type . '/' . $this->app->l11nServer->getLanguage();
|
||||
$path = \realpath($basePath . '/' . $page . '.md');
|
||||
}
|
||||
|
||||
if ($path === false) {
|
||||
$basePath = __DIR__ . '/../../' . $request->getData('id') . '/Docs/' . $type . '/en';
|
||||
$path = \realpath($basePath . '/' . $page . '.md');
|
||||
}
|
||||
|
||||
if ($path === false) {
|
||||
$path = \realpath($basePath . '/introduction.md');
|
||||
}
|
||||
|
|
|
|||
3
Docs/Help/de/SUMMARY.md
Normal file
3
Docs/Help/de/SUMMARY.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# User Content
|
||||
|
||||
* [Documentation]({%}&page=Help/documentation)
|
||||
17
Docs/Help/de/documentation.md
Normal file
17
Docs/Help/de/documentation.md
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# Documentation
|
||||
|
||||
A documentation can be added to every module by adding the `Docs/Help/{lang}` directory in the module. The language directory needs to be a 2 character ISO code. Inside of this directory you can add/find all the documentation files provided by the module.
|
||||
|
||||
Mandatory files are a `SUMMARY.md` file which contains the list of all documents and a `introduction.md` file which contains a general description of the module.
|
||||
|
||||
## SUMMARY.md example
|
||||
|
||||
```md
|
||||
# Table of Contents
|
||||
|
||||
* [Link Name 1]({%}&page=Help/document_name_1)
|
||||
* [Link Name 2]({%}&page=Help/document_name_2)
|
||||
* [Link Name 3]({%}&page=Help/document_name_3)
|
||||
```
|
||||
|
||||

|
||||
11
Docs/Help/de/introduction.md
Normal file
11
Docs/Help/de/introduction.md
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# Introduction
|
||||
|
||||
The **Help** module is one of the essential core modules that is always required. This module allows other modules to provide helpful documentation for users, administrators and developers.
|
||||
|
||||
## Target Group
|
||||
|
||||
The target group for this module is everyone.
|
||||
|
||||
# Setup
|
||||
|
||||
This module doesn't have any additional setup requirements since it is installed during the application install process. This module cannot be uninstalled if it is manually deleted from the hard drive please manually download the module from the page and put it into the `Modules/` directory.
|
||||
Loading…
Reference in New Issue
Block a user