2018-12-09 17:51:31 +01:00
|
|
|
<div class="breadcrumbs text-center">
|
2019-01-13 16:54:55 +01:00
|
|
|
<?php $breadcrumbCount = 0; ?>
|
2019-02-24 16:57:35 +01:00
|
|
|
|
|
|
|
{{--Show top level item--}}
|
|
|
|
@if (count($crumbs) > 0 && $crumbs[0] instanceof \BookStack\Entities\Book)
|
|
|
|
<a href="{{ baseUrl('/books') }}" class="icon-list-item">
|
|
|
|
<span>@icon('books')</span>
|
|
|
|
<span>{{ trans('entities.books') }}</span>
|
|
|
|
</a>
|
|
|
|
<?php $breadcrumbCount++; ?>
|
|
|
|
@endif
|
|
|
|
|
2019-01-13 16:54:55 +01:00
|
|
|
@foreach($crumbs as $key => $crumb)
|
2019-02-24 16:57:35 +01:00
|
|
|
<?php $isEntity = ($crumb instanceof \BookStack\Entities\Entity); ?>
|
|
|
|
|
2019-01-13 16:54:55 +01:00
|
|
|
@if (is_null($crumb))
|
|
|
|
<?php continue; ?>
|
|
|
|
@endif
|
2019-02-24 16:57:35 +01:00
|
|
|
@if ($breadcrumbCount !== 0 && !$isEntity)
|
2019-01-13 16:54:55 +01:00
|
|
|
<div class="separator">@icon('chevron-right')</div>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
@if (is_string($crumb))
|
|
|
|
<a href="{{ baseUrl($key) }}">
|
|
|
|
{{ $crumb }}
|
|
|
|
</a>
|
2019-02-17 12:44:02 +01:00
|
|
|
@elseif (is_array($crumb))
|
2019-02-17 18:52:42 +01:00
|
|
|
<a href="{{ baseUrl($key) }}" class="icon-list-item">
|
|
|
|
<span>@icon($crumb['icon'])</span>
|
|
|
|
<span>{{ $crumb['text'] }}</span>
|
2019-02-17 12:44:02 +01:00
|
|
|
</a>
|
2019-02-24 16:57:35 +01:00
|
|
|
@elseif($isEntity && userCan('view', $crumb))
|
|
|
|
@if($breadcrumbCount > 0)
|
|
|
|
@include('partials.breadcrumb-listing', ['entity' => $crumb])
|
|
|
|
@endif
|
2019-02-17 18:52:42 +01:00
|
|
|
<a href="{{ $crumb->getUrl() }}" class="text-{{$crumb->getType()}} icon-list-item">
|
|
|
|
<span>@icon($crumb->getType())</span>
|
2019-02-24 16:57:35 +01:00
|
|
|
<span>
|
|
|
|
{{ $crumb->getShortName() }}
|
|
|
|
</span>
|
2019-01-13 16:54:55 +01:00
|
|
|
</a>
|
|
|
|
@endif
|
|
|
|
<?php $breadcrumbCount++; ?>
|
|
|
|
@endforeach
|
2018-11-11 14:11:36 +01:00
|
|
|
</div>
|