mirror of
https://github.com/Karaka-Management/oms-Navigation.git
synced 2026-01-30 09:08:41 +00:00
bug fixes
This commit is contained in:
parent
bd5c9ded95
commit
05d83083cb
2
.github/workflows/greetings.yml
vendored
2
.github/workflows/greetings.yml
vendored
|
|
@ -9,5 +9,5 @@ jobs:
|
|||
- uses: actions/first-interaction@v1
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-message: 'Thank you for createing this issue. We will check it as soon as possible.'
|
||||
issue-message: 'Thank you for creating this issue. We will check it as soon as possible.'
|
||||
pr-message: 'Thank you for your pull request. We will check it as soon as possible.'
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ echo $this->data['nav']->render(); ?>
|
|||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="portlet">
|
||||
<section class="portlet">
|
||||
<div class="portlet-head"><?= $this->getHtml('Routes'); ?><i class="g-icon download btn end-xs">download</i></div>
|
||||
<div class="slider">
|
||||
<table id="navList" class="default sticky">
|
||||
|
|
@ -201,6 +201,6 @@ echo $this->data['nav']->render(); ?>
|
|||
<a tabindex="0" class="button" href="<?= UriFactory::build($previous ?? ''); ?>"><?= $this->getHtml('Previous', '0', '0'); ?></a>
|
||||
<a tabindex="0" class="button" href="<?= UriFactory::build($next ?? ''); ?>"><?= $this->getHtml('Next', '0', '0'); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ echo $this->data['nav']->render(); ?>
|
|||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="portlet">
|
||||
<section class="portlet">
|
||||
<div class="portlet-head"><?= $this->getHtml('Navigation'); ?><i class="g-icon download btn end-xs">download</i></div>
|
||||
<div class="slider">
|
||||
<table id="navList" class="default sticky">
|
||||
|
|
@ -154,6 +154,6 @@ echo $this->data['nav']->render(); ?>
|
|||
<a tabindex="0" class="button" href="<?= UriFactory::build($next); ?>"><?= $this->getHtml('Next', '0', '0'); ?></a>
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -65,6 +65,36 @@ final class BackendController extends Controller
|
|||
return $navView;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create mid navigation
|
||||
*
|
||||
* @param int $pageId Page/parent Id for navigation
|
||||
* @param RequestAbstract $request Request
|
||||
* @param ResponseAbstract $response Response
|
||||
*
|
||||
* @return NavigationView
|
||||
*
|
||||
* @since 1.0.0
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
public function createNavigationMidSub(int $pageId, RequestAbstract $request, ResponseAbstract $response) : NavigationView
|
||||
{
|
||||
$nav = Navigation::getInstance(
|
||||
$request,
|
||||
$this->app->accountManager->get($request->header->account),
|
||||
$this->app->dbPool,
|
||||
$this->app->unitId,
|
||||
$this->app->appId
|
||||
);
|
||||
|
||||
$navView = new NavigationView($this->app->l11nManager, $request, $response);
|
||||
$navView->setTemplate('/Modules/Navigation/Theme/Backend/mid-sub');
|
||||
$navView->nav = $nav->nav;
|
||||
$navView->parent = $pageId;
|
||||
|
||||
return $navView;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get basic navigation view
|
||||
*
|
||||
|
|
|
|||
47
Theme/Backend/mid-sub.tpl.php
Normal file
47
Theme/Backend/mid-sub.tpl.php
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
<?php
|
||||
/**
|
||||
* Jingga
|
||||
*
|
||||
* PHP Version 8.2
|
||||
*
|
||||
* @package Modules\Navigation
|
||||
* @copyright Dennis Eichhorn
|
||||
* @license OMS License 2.0
|
||||
* @version 1.0.0
|
||||
* @link https://jingga.app
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* @var \Modules\Navigation\Views\NavigationView $this
|
||||
*/
|
||||
|
||||
if (isset($this->nav[\Modules\Navigation\Models\NavigationType::TAB])
|
||||
&& \phpOMS\Utils\ArrayUtils::inArrayRecursive(
|
||||
$this->parent,
|
||||
$this->nav[\Modules\Navigation\Models\NavigationType::TAB],
|
||||
'nav_parent'
|
||||
)
|
||||
) : ?>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 tab-2">
|
||||
<ul class="nav-top-sub tab-links" role="list">
|
||||
<?php
|
||||
$uriPath = $this->request->uri->getPath();
|
||||
|
||||
foreach ($this->nav[\Modules\Navigation\Models\NavigationType::TAB] as $key => $parent) {
|
||||
foreach ($parent as $link) {
|
||||
if ($link['nav_parent'] === $this->parent) {
|
||||
$uri = \phpOMS\Uri\UriFactory::build($link['nav_uri']);
|
||||
echo '<li'
|
||||
, (\stripos($uri, $uriPath) !== false ? ' class="active"' : '')
|
||||
, '><a tabindex="0" href="' , $uri , '">'
|
||||
, $this->getHtml($link['nav_name'], 'Navigation') , '</a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;
|
||||
Loading…
Reference in New Issue
Block a user