]> BookStack Code Mirror - bookstack/blob - resources/views/partials/breadcrumbs.blade.php
54d7b74cbf05cced74b3e5a9ba4f0255be8e680e
[bookstack] / resources / views / partials / breadcrumbs.blade.php
1 <div class="breadcrumbs text-center">
2     <?php $breadcrumbCount = 0; ?>
3     @foreach($crumbs as $key => $crumb)
4         @if (is_null($crumb))
5             <?php continue; ?>
6         @endif
7         @if ($breadcrumbCount !== 0)
8             <div class="separator">@icon('chevron-right')</div>
9         @endif
10
11         @if (is_string($crumb))
12             <a href="{{  baseUrl($key)  }}">
13                 {{ $crumb }}
14             </a>
15         @elseif (is_array($crumb))
16             <a href="{{  baseUrl($key)  }}">
17                 @icon($crumb['icon']) {{ $crumb['text'] }}
18             </a>
19         @elseif($crumb instanceof \BookStack\Entities\Entity)
20             <a href="{{ $crumb->getUrl() }}" class="text-{{$crumb->getType()}}">
21                 @icon($crumb->getType()){{ $crumb->getShortName() }}
22             </a>
23         @endif
24         <?php $breadcrumbCount++; ?>
25     @endforeach
26
27     {{--@if (isset($book) && userCan('view', $book))--}}
28         {{--<a href="{{ $book->getUrl() }}" class="text-book">--}}
29             {{--@icon('book'){{ $book->getShortName() }}--}}
30         {{--</a>--}}
31         {{--<div class="separator">@icon('chevron-right')</div>--}}
32     {{--@endif--}}
33     {{--@if(isset($chapter) && userCan('view', $chapter))--}}
34         {{--<a href="{{ $chapter->getUrl() }}" class="text-chapter">--}}
35             {{--@icon('chapter'){{ $chapter->getShortName() }}--}}
36         {{--</a>--}}
37         {{--@if (isset($page))--}}
38             {{--<div class="separator">@icon('chevron-right')</div>--}}
39         {{--@endif--}}
40     {{--@endif--}}
41     {{--@if(isset($page) && userCan('view', $page))--}}
42         {{--<a href="{{ $page->getUrl() }}" class="text-page">--}}
43             {{--@icon('page'){{ $page->getShortName() }}--}}
44         {{--</a>--}}
45     {{--@endif--}}
46 </div>