mirror of
https://github.com/Karaka-Management/oms-Navigation.git
synced 2026-01-24 14:28:41 +00:00
impl. todos or move to Project.md
This commit is contained in:
parent
7634d7a411
commit
3f418c69e8
|
|
@ -12,14 +12,7 @@ If you have a good idea for improvement feel free to create a new issue with all
|
|||
|
||||
### Issues
|
||||
|
||||
Feel free to grab any open issue implement it and create a new pull request. Most issues can be found in the code and have the following structure:
|
||||
|
||||
```php
|
||||
/**
|
||||
* @todo Orange-Management/Orange-Management#ISSUE_NUMBER [d:difficulty]
|
||||
* Description for the issue
|
||||
*/
|
||||
```
|
||||
Feel free to grab any open issue implement it and create a new pull request. Most issues can be found in the `Project.md` file in the `Docs` repository.
|
||||
|
||||
The issue information can be used to provide additional information such as priority, difficulty and type. For your first issue try to find a issue marked `[d:first]` or `[d:beginner]`.
|
||||
|
||||
|
|
|
|||
|
|
@ -34,15 +34,9 @@ if (isset($this->nav[NavigationType::SIDE])) : ?>
|
|||
<?php if (isset($this->nav[NavigationType::SIDE][LinkType::LINK])) :
|
||||
foreach ($this->nav[NavigationType::SIDE][LinkType::LINK] as $key2 => $link) :
|
||||
if ($link['nav_parent'] === $key) :
|
||||
$uri = \phpOMS\Uri\UriFactory::build($link['nav_uri']);
|
||||
$parentUri = \explode('/', $uri);
|
||||
\array_pop($parentUri);
|
||||
$miniParent = \ltrim(\implode('/', $parentUri), '/') . '/';
|
||||
// todo: very simpleminded solution. doesn't work for root path /en/backend etc. e.g. dashboard
|
||||
// this also fails for urls which are not structured like a tree
|
||||
$uri = \phpOMS\Uri\UriFactory::build($link['nav_uri']);
|
||||
?>
|
||||
<li<?= (\count($parentUri) > 2 && \stripos($uriPath, $miniParent) !== false) ? ' class="active"' : ''; ?>>
|
||||
<a href="<?= $uri; ?>"><?= $this->getHtml($link['nav_name'], 'Navigation'); ?></a>
|
||||
<li><a href="<?= $uri; ?>"><?= $this->getHtml($link['nav_name'], 'Navigation'); ?></a>
|
||||
<?php endif;
|
||||
endforeach;
|
||||
endif; ?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user