2013-11-21 15:16:27 +01:00
|
|
|
<?php
|
2014-04-29 21:35:29 +02:00
|
|
|
Assets::setSubtitle('help');
|
2014-05-02 22:30:14 +02:00
|
|
|
Assets::addStylesheet('static-help.css');
|
2014-02-01 11:17:02 +01:00
|
|
|
|
2014-04-29 21:35:29 +02:00
|
|
|
$tabs = getConfig()->help->subTitles;
|
2013-11-21 15:16:27 +01:00
|
|
|
$firstTab = !empty($tabs) ? array_keys($tabs)[0] : null;
|
2014-02-16 11:44:42 +01:00
|
|
|
$showTabs = count($tabs) > 1;
|
2013-11-21 15:16:27 +01:00
|
|
|
?>
|
|
|
|
|
2014-02-16 11:44:42 +01:00
|
|
|
<?php if ($showTabs): ?>
|
2013-11-30 00:03:59 +01:00
|
|
|
<nav class="tabs">
|
|
|
|
<ul>
|
|
|
|
<?php foreach ($tabs as $tab => $text): ?>
|
|
|
|
<?php if ($tab == $this->context->tab): ?>
|
2014-04-27 14:44:06 +02:00
|
|
|
<li class="selected <?= $tab ?>">
|
2013-11-30 00:03:59 +01:00
|
|
|
<?php else: ?>
|
2014-04-27 14:44:06 +02:00
|
|
|
<li class="<?= $tab ?>">
|
2013-11-30 00:03:59 +01:00
|
|
|
<?php endif ?>
|
2014-04-30 00:11:13 +02:00
|
|
|
<a href="<?= \Chibi\Router::linkTo(
|
2014-05-02 22:30:14 +02:00
|
|
|
['StaticPagesController', 'helpView'],
|
2014-04-30 00:11:13 +02:00
|
|
|
$tab == $firstTab ? [] : ['tab' => $tab]) ?>">
|
2014-04-27 14:44:06 +02:00
|
|
|
<?= $text ?>
|
2013-11-30 00:03:59 +01:00
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<?php endforeach ?>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
2014-02-16 11:44:42 +01:00
|
|
|
|
|
|
|
<div class="tab-content">
|
2013-11-21 15:16:27 +01:00
|
|
|
<?php endif ?>
|
|
|
|
|
2014-04-27 14:44:06 +02:00
|
|
|
<?= TextHelper::parseMarkdown(file_get_contents($this->context->path)) ?>
|
2014-02-16 11:44:42 +01:00
|
|
|
|
|
|
|
<?php if ($showTabs): ?>
|
|
|
|
</div>
|
|
|
|
<?php endif ?>
|