mirror of
https://github.com/Karaka-Management/oms-Help.git
synced 2026-02-12 03:18:41 +00:00
Implement content+navigation like other help pages
This commit is contained in:
parent
d2262885b1
commit
bc08e052eb
|
|
@ -177,7 +177,7 @@ final class Controller extends ModuleAbstract implements WebInterface
|
||||||
$view = new View($this->app, $request, $response);
|
$view = new View($this->app, $request, $response);
|
||||||
|
|
||||||
if ($request->getData('page') === 'table-of-contencts' || $request->getData('page') === null) {
|
if ($request->getData('page') === 'table-of-contencts' || $request->getData('page') === null) {
|
||||||
$path = \realpath(__DIR__ . '/../' . $request->getData('id') . '/Docs/Help/en/table_of_contents.md');
|
$path = \realpath(__DIR__ . '/../' . $request->getData('id') . '/Docs/introduction.md');
|
||||||
} else {
|
} else {
|
||||||
$path = \realpath(__DIR__ . '/../' . $request->getData('id') . '/Docs/Help/en/' . $request->getData('page') . '.md');
|
$path = \realpath(__DIR__ . '/../' . $request->getData('id') . '/Docs/Help/en/' . $request->getData('page') . '.md');
|
||||||
}
|
}
|
||||||
|
|
@ -188,10 +188,12 @@ final class Controller extends ModuleAbstract implements WebInterface
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
||||||
$markdown = Markdown::parse(\file_get_contents($path));
|
$content = Markdown::parse(\file_get_contents($path));
|
||||||
|
$navigation = Markdown::parse(\file_get_contents(\realpath(__DIR__ . '/../' . $request->getData('id') . '/Docs/Help/en/table_of_contents.md')));
|
||||||
|
|
||||||
$view->setTemplate('/Modules/Help/Theme/Backend/help-module');
|
$view->setTemplate('/Modules/Help/Theme/Backend/help-module');
|
||||||
$view->setData('content', $markdown);
|
$view->setData('content', $content);
|
||||||
|
$view->setData('navigation', $navigation);
|
||||||
|
|
||||||
return $view;
|
return $view;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<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>
|
||||||
|
|
@ -8,4 +8,14 @@
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</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>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
Loading…
Reference in New Issue
Block a user