-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7c349c9
commit 6286cce
Showing
7 changed files
with
52 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
use Arcanesoft\Sidebar\Entities\Item; | ||
/** | ||
* Render sidebar item. | ||
* | ||
* @param \Arcanesoft\Sidebar\Entities\Item $item | ||
* | ||
* @return string | ||
*/ | ||
function renderSidebarItem(Item $item) | ||
{ | ||
$output = []; | ||
$output[] = '<li class="'.trim($item->childrenClass().' '.$item->activeClass('active open')).'">'; | ||
if ($item->hasChildren()) { | ||
$output[] = '<a href="javascript:void(0);">'; | ||
$output[] = '<i class="'.$item->icon().'"></i> <span>'.$item->title().'</span> <i class="fa fa-angle-left pull-right"></i>'; | ||
$output[] = '</a>'; | ||
$output[] = '<ul class="treeview-menu">'; | ||
$output[] = $item->children()->transform(function ($child) { return renderSidebarItem($child); })->implode(PHP_EOL); | ||
$output[] = '</ul>'; | ||
} | ||
else { | ||
$output[] = '<a href="'.$item->url().'">'; | ||
$output[] = '<i class="'.$item->icon().'"></i> <span>'.$item->title().'</span>'; | ||
$output[] = '</a>'; | ||
} | ||
$output[] = '</li>'; | ||
return implode(PHP_EOL, $output); | ||
} | ||
?> | ||
|
||
<ul class="sidebar-menu"> | ||
<li class="header">{{ trans('foundation::navigation.sidebar.main-navigation') }}</li> | ||
@foreach($sidebarItems as $item) | ||
{!! renderSidebarItem($item) !!} | ||
@endforeach | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
resources/views/admin/system/log-viewer/_includes/timeline-pagination.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<li> | ||
<div class="timeline-item"> | ||
<div class="timeline-body text-center"> | ||
{!! $entries->render('foundation::admin_partials.pagination.small') !!} | ||
{!! $entries->render('foundation::admin._partials.pagination.small') !!} | ||
</div> | ||
</div> | ||
</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters