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