mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-01 01:36:00 -04:00
Added book and chapter icons to pages in global search results. Closes #19.
This commit is contained in:
parent
7039695b65
commit
965851d112
@ -32,6 +32,13 @@
|
||||
.book {
|
||||
border-left: 5px solid $color-book;
|
||||
}
|
||||
.meta {
|
||||
margin-top: -$-m;
|
||||
font-size: 0.95em;
|
||||
}
|
||||
.meta span {
|
||||
margin-right: $-s;
|
||||
}
|
||||
}
|
||||
.chapter-toggle {
|
||||
cursor: pointer;
|
||||
|
@ -2,6 +2,16 @@
|
||||
<h3>
|
||||
<a href="{{ $page->getUrl() }}" class="text-page"><i class="zmdi zmdi-file-text"></i>{{ $page->name }}</a>
|
||||
</h3>
|
||||
|
||||
@if(isset($showMeta) && $showMeta)
|
||||
<div class="meta">
|
||||
<span class="text-book"><i class="zmdi zmdi-book"></i> {{ $page->book->name }}</span>
|
||||
@if($page->chapter)
|
||||
<span class="text-chapter"><i class="zmdi zmdi-collection-bookmark"></i> {{ $page->chapter->name }}</span>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(isset($page->searchSnippet))
|
||||
<p class="text-muted">{!! $page->searchSnippet !!}</p>
|
||||
@else
|
||||
|
@ -13,7 +13,7 @@
|
||||
<div class="page-list">
|
||||
@if(count($pages) > 0)
|
||||
@foreach($pages as $page)
|
||||
@include('pages/list-item', ['page' => $page])
|
||||
@include('pages/list-item', ['page' => $page, 'showMeta' => true])
|
||||
<hr>
|
||||
@endforeach
|
||||
@else
|
||||
|
Loading…
Reference in New Issue
Block a user