Skip to content

Commit

Permalink
styleci
Browse files Browse the repository at this point in the history
  • Loading branch information
denisdulici committed Apr 11, 2019
1 parent 47ee64b commit 81d45de
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 19 deletions.
File renamed without changes.
8 changes: 4 additions & 4 deletions src/Presenters/Admin/Argon.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function getCloseTagWrapper()
public function getMenuWithoutDropdownWrapper($item)
{
$html = '<li class="nav-item">';
$html .= ' <a class="nav-link' . $this->getActiveState($item) .'" href="' . $item->getUrl() . '" ' . $item->getAttributes() . '>';
$html .= ' <a class="nav-link' . $this->getActiveState($item) . '" href="' . $item->getUrl() . '" ' . $item->getAttributes() . '>';
$html .= $item->getIcon();
$html .= ' <span class="nav-link-text">' . $item->title . '</span>';
$html .= ' </a>';
Expand Down Expand Up @@ -99,11 +99,11 @@ public function getHeaderWrapper($item)
public function getMenuWithDropDownWrapper($item)
{
return '<li class="nav-item">
<a class="nav-link' . $this->getActiveStateOnChild($item) .'" href="#navbar-' . mb_strtolower($item->title) . '" data-toggle="collapse" role="button" aria-expanded="false" aria-controls="navbar-' . mb_strtolower($item->title) . '">
<a class="nav-link' . $this->getActiveStateOnChild($item) . '" href="#navbar-' . mb_strtolower($item->title) . '" data-toggle="collapse" role="button" aria-expanded="false" aria-controls="navbar-' . mb_strtolower($item->title) . '">
' . $item->getIcon() . '
<span class="nav-link-text">' . $item->title . '</span>
</a>
<div class="collapse' . $this->getShowStateOnChild($item) .'" id="navbar-' . mb_strtolower($item->title) . '">
<div class="collapse' . $this->getShowStateOnChild($item) . '" id="navbar-' . mb_strtolower($item->title) . '">
<ul class="nav nav-sm flex-column">
' . $this->getChildMenuItems($item) . '
</ul>
Expand All @@ -122,7 +122,7 @@ public function getMenuWithDropDownWrapper($item)
public function getMultiLevelDropdownWrapper($item)
{
return '<li class="nav-item">
<a class="nav-link' . $this->getActiveState($item) .'" href="#navbar-' . mb_strtolower($item->title) . '" data-toggle="collapse" role="button" aria-expanded="false" aria-controls="navbar-' . mb_strtolower($item->title) . '">
<a class="nav-link' . $this->getActiveState($item) . '" href="#navbar-' . mb_strtolower($item->title) . '" data-toggle="collapse" role="button" aria-expanded="false" aria-controls="navbar-' . mb_strtolower($item->title) . '">
' . $item->getIcon() . '
<span class="nav-link-text">' . $item->title . '</span>
</a>
Expand Down
25 changes: 16 additions & 9 deletions src/Presenters/Admin/MetronicHorizontal.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,47 +10,54 @@

use Akaunting\Menu\Presenters\Presenter;

class MetronicHorizontal extends Presenter {
class MetronicHorizontal extends Presenter
{

/**
* {@inheritdoc }
*/
public function getOpenTagWrapper() {
public function getOpenTagWrapper()
{
return PHP_EOL . '<ul class="m-menu__nav m-menu__nav--submenu-arrow ">' . PHP_EOL;
}

/**
* {@inheritdoc }
*/
public function getCloseTagWrapper() {
public function getCloseTagWrapper()
{
return PHP_EOL . '</ul>' . PHP_EOL;
}

/**
* {@inheritdoc }
*/
public function getMenuWithoutDropdownWrapper($item) {
public function getMenuWithoutDropdownWrapper($item)
{
return '<li ' . $this->getActiveState($item) . '>' . $item->getIcon() . '<a href="' . $item->getUrl() . '" class="m-menu__link"><span class="m-menu__item-here"></span><span class="m-menu__link-text">' . $item->title . '</span></a></li>';
}

/**
* {@inheritdoc }
*/
public function getActiveState($item) {
public function getActiveState($item)
{
return \Request::is($item->getRequest()) ? ' class="m-menu__item m-menu__item--rel active"' : 'class="m-menu__item m-menu__item--rel"';
}

/**
* {@inheritdoc }
*/
public function getDividerWrapper() {
public function getDividerWrapper()
{
return '';
}

/**
* {@inheritdoc }
*/
public function getMenuWithDropDownWrapper($item) {
public function getMenuWithDropDownWrapper($item)
{
if ($item->title == '...') {
return '<li class="m-menu__item m-menu__item--submenu m-menu__item--rel" data-menu-submenu-toggle="click" aria-haspopup="true">
<a href="#" class="m-menu__link m-menu__toggle">
Expand Down Expand Up @@ -85,7 +92,8 @@ public function getMenuWithDropDownWrapper($item) {
}
}

public function getMultiLevelDropdownWrapper($item) {
public function getMultiLevelDropdownWrapper($item)
{
return '<li class="m-menu__item m-menu__item--submenu" data-menu-submenu-toggle="hover" data-redirect="true" aria-haspopup="true">
<a href="#" class="m-menu__link m-menu__toggle">
' . $item->getIcon() . '
Expand All @@ -103,5 +111,4 @@ public function getMultiLevelDropdownWrapper($item) {
</div>
</li>' . PHP_EOL;
}

}
12 changes: 6 additions & 6 deletions src/Presenters/Foundation/Zurb.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function getCloseTagWrapper()
*/
public function getMenuWithoutDropdownWrapper($item)
{
return '<li'.$this->getActiveState($item).'><a href="'. $item->getUrl() .'">'.$item->title.'</a></li>';
return '<li' . $this->getActiveState($item) . '><a href="' . $item->getUrl() . '">' . $item->title . '</a></li>';
}

/**
Expand All @@ -53,9 +53,9 @@ public function getDividerWrapper()
public function getMenuWithDropDownWrapper($item)
{
return '<li class="dropdown dropdown-primary">
<a class="dropdown-toggle" href="#">'.$item->title.'</a>
<a class="dropdown-toggle" href="#">' . $item->title . '</a>
<ul class="menu">
'.$this->getChildMenuItems($item).'
' . $this->getChildMenuItems($item) . '
</ul>
</li>' . PHP_EOL;
}
Expand All @@ -67,10 +67,10 @@ public function getMenuWithDropDownWrapper($item)
public function getMultiLevelDropdownWrapper($item)
{
return '<li>
<a href="#">'.$item->title . '</a>
<a href="#">' . $item->title . '</a>
<ul class="menu">
' . $this->getChildMenuItems($item) . '
</ul>
</li>'. PHP_EOL;
</li>' . PHP_EOL;
}
}
}

0 comments on commit 81d45de

Please sign in to comment.