mirror of
https://github.com/Karaka-Management/oms-Navigation.git
synced 2026-01-11 16:18:42 +00:00
update
This commit is contained in:
parent
61011d719c
commit
3d57c9b4be
|
|
@ -17,23 +17,26 @@ declare(strict_types=1);
|
|||
*/
|
||||
|
||||
/* Looping through all links */
|
||||
if (isset($this->nav[\Modules\Navigation\Models\NavigationType::CONTENT_SIDE])) {
|
||||
echo '<div class="b b-5 c3-2 c3" id="i3-2-5">'
|
||||
. '<h1>' . $this->getHtml('Navigation', 'Navigation')
|
||||
. '<i class="fa fa-minus min"></i><i class="fa fa-plus max vh"></i>'
|
||||
. '</h1>'
|
||||
. '<div class="bc-1">'
|
||||
. '<ul id="ms-nav" role="list">';
|
||||
|
||||
foreach ($this->nav[\Modules\Navigation\Models\NavigationType::CONTENT_SIDE] as $key => $parent) {
|
||||
foreach ($parent as $link) {
|
||||
/** @var array $data */
|
||||
if ($link['nav_parent'] == $data[1]) {
|
||||
echo '<li><a href="' . \phpOMS\Uri\UriFactory::build($link['nav_uri']) . '">'
|
||||
. $this->getHtml('5', 'Backend', $link['nav_name']) . '</a>';
|
||||
if (isset($this->nav[\Modules\Navigation\Models\NavigationType::CONTENT_SIDE])) : ?>
|
||||
<div>
|
||||
<h1>
|
||||
<?= $this->getHtml('Navigation', 'Navigation'); ?>
|
||||
<i class="fa fa-minus min"></i><i class="fa fa-plus max vh"></i>
|
||||
</h1>
|
||||
<div class="bc-1">
|
||||
<ul id="ms-nav" role="list">
|
||||
<?php
|
||||
foreach ($this->nav[\Modules\Navigation\Models\NavigationType::CONTENT_SIDE] as $key => $parent) {
|
||||
foreach ($parent as $link) {
|
||||
/** @var array $data */
|
||||
if ($link['nav_parent'] == $data[1]) {
|
||||
echo '<li><a href="' , \phpOMS\Uri\UriFactory::build($link['nav_uri']) , '">'
|
||||
, $this->getHtml('5', 'Backend', $link['nav_name']) , '</a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo '</ul></div></div>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;
|
||||
|
|
|
|||
|
|
@ -17,23 +17,31 @@ declare(strict_types=1);
|
|||
*/
|
||||
|
||||
if (isset($this->nav[\Modules\Navigation\Models\NavigationType::CONTENT])
|
||||
&& \phpOMS\Utils\ArrayUtils::inArrayRecursive($this->parent, $this->nav[\Modules\Navigation\Models\NavigationType::CONTENT], 'nav_parent')
|
||||
) {
|
||||
echo '<div class="row"><div class="col-xs-12"><ul class="nav-top" role="list">';
|
||||
&& \phpOMS\Utils\ArrayUtils::inArrayRecursive(
|
||||
$this->parent,
|
||||
$this->nav[\Modules\Navigation\Models\NavigationType::CONTENT],
|
||||
'nav_parent'
|
||||
)
|
||||
) : ?>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<ul class="nav-top" role="list">
|
||||
<?php
|
||||
$uriPath = $this->request->uri->getPath();
|
||||
|
||||
$uriPath = $this->request->uri->getPath();
|
||||
|
||||
foreach ($this->nav[\Modules\Navigation\Models\NavigationType::CONTENT] 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>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo '</ul></div></div>';
|
||||
}
|
||||
foreach ($this->nav[\Modules\Navigation\Models\NavigationType::CONTENT] 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;
|
||||
|
|
@ -45,4 +45,4 @@ if (isset($this->nav[NavigationType::SIDE])) : ?>
|
|||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
endif;
|
||||
endif;
|
||||
|
|
@ -22,14 +22,15 @@ if (isset($this->nav[NavigationType::TOP])) : ?>
|
|||
<?php $unread = $this->data['unread'];
|
||||
foreach ($this->nav[NavigationType::TOP] as $key => $parent) :
|
||||
foreach ($parent as $id => $link) : ?>
|
||||
<li><a id="link-<?= $id; ?>" target="<?= $link['nav_target']; ?>" href="<?= \phpOMS\Uri\UriFactory::build($link['nav_uri']); ?>"<?= $link['nav_action'] !== null ? ' data-action=\'' . $link['nav_action'] . '\'' : ''; ?>>
|
||||
|
||||
<li><a
|
||||
id="link-<?= $id; ?>"
|
||||
target="<?= $link['nav_target']; ?>"
|
||||
href="<?= \phpOMS\Uri\UriFactory::build($link['nav_uri']); ?>"
|
||||
<?= $link['nav_action'] !== null ? ' data-action=\'' . $link['nav_action'] . '\'' : ''; ?>>
|
||||
<?php if (isset($link['nav_icon'])) : ?>
|
||||
<i class="<?= $this->printHtml($link['nav_icon']); ?> infoIcon"><?php if (isset($unread[$link['nav_from']]) && $unread[$link['nav_from']] > 0) : ?><span class="badge"><?= $unread[$link['nav_from']]; ?></span><?php endif; ?></i>
|
||||
<?php endif; ?>
|
||||
|
||||
<span class="link"><?= $this->getHtml($link['nav_name'], 'Navigation'); ?><span></a>
|
||||
<?php endforeach;
|
||||
endforeach; ?>
|
||||
<?php endforeach; endforeach; ?>
|
||||
</ul>
|
||||
<?php endif;
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ final class SearchControllerTest extends \PHPUnit\Framework\TestCase
|
|||
$request->setData('app', 'Backend');
|
||||
|
||||
$this->module->searchGoto($request, $response);
|
||||
self::assertInstanceOf(Redirect::class, $response->get(''));
|
||||
self::assertInstanceOf(Redirect::class, $response->getData(''));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user