mirror of
https://github.com/Karaka-Management/oms-Help.git
synced 2026-02-13 03:38:39 +00:00
Add developer doc
This commit is contained in:
parent
dc43e0edd5
commit
d2262885b1
|
|
@ -124,9 +124,8 @@ final class Controller extends ModuleAbstract implements WebInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($path === false) {
|
if ($path === false) {
|
||||||
$view->setTemplate('/Web/Backend/Error/403_inline');
|
|
||||||
$response->getHeader()->setStatusCode(RequestStatusCode::R_403);
|
$response->getHeader()->setStatusCode(RequestStatusCode::R_403);
|
||||||
return $view;
|
$path = \realpath(__DIR__ . '/../../Documentation/README.md');
|
||||||
}
|
}
|
||||||
|
|
||||||
$content = Markdown::parse(\file_get_contents($path));
|
$content = Markdown::parse(\file_get_contents($path));
|
||||||
|
|
@ -210,9 +209,24 @@ final class Controller extends ModuleAbstract implements WebInterface
|
||||||
public function viewHelpDeveloper(RequestAbstract $request, ResponseAbstract $response, $data = null) : \Serializable
|
public function viewHelpDeveloper(RequestAbstract $request, ResponseAbstract $response, $data = null) : \Serializable
|
||||||
{
|
{
|
||||||
$view = new View($this->app, $request, $response);
|
$view = new View($this->app, $request, $response);
|
||||||
$view->setTemplate('/Modules/Help/Theme/Backend/help-developer');
|
|
||||||
|
|
||||||
$view->setData('markdown', Markdown::parse(file_get_contents(__DIR__ . '/../../Developer-Guide/README.md')));
|
if ($request->getData('page') === 'README' || $request->getData('page') === null) {
|
||||||
|
$path = \realpath(__DIR__ . '/../../Developer-Guide/README.md');
|
||||||
|
} else {
|
||||||
|
$path = \realpath(__DIR__ . '/../../Developer-Guide/' . $request->getData('page') . '.md');
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($path === false) {
|
||||||
|
$response->getHeader()->setStatusCode(RequestStatusCode::R_403);
|
||||||
|
$path = \realpath(__DIR__ . '/../../Developer-Guide/README.md');
|
||||||
|
}
|
||||||
|
|
||||||
|
$content = Markdown::parse(\file_get_contents($path));
|
||||||
|
$navigation = Markdown::parse(\file_get_contents(__DIR__ . '/../../Developer-Guide/SUMMARY.md'));
|
||||||
|
|
||||||
|
$view->setTemplate('/Modules/Help/Theme/Backend/help-developer');
|
||||||
|
$view->setData('content', $content);
|
||||||
|
$view->setData('navigation', $navigation);
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,19 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12 col-md-8 col-lg-9">
|
||||||
<section class="box wf-100">
|
<section class="box wf-100">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<article>
|
<article>
|
||||||
<?= $this->getData('markdown'); ?>
|
<?= $this->getData('content'); ?>
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-xs-12 col-md-4 col-lg-3">
|
||||||
|
<section class="box wf-100">
|
||||||
|
<div class="inner">
|
||||||
|
<article>
|
||||||
|
<?= $this->getData('navigation'); ?>
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user