From: Dan Brown Date: Wed, 14 Oct 2015 20:55:56 +0000 (+0100) Subject: Added book and chapter icons to pages in global search results. Closes #19. X-Git-Tag: v0.5.0~26 X-Git-Url: http://source.bookstackapp.com/bookstack/commitdiff_plain/965851d11243c7a8050ad06ae75f72e83817c092 Added book and chapter icons to pages in global search results. Closes #19. --- diff --git a/resources/assets/sass/_lists.scss b/resources/assets/sass/_lists.scss index f06e647ba..f90c7e2ba 100644 --- a/resources/assets/sass/_lists.scss +++ b/resources/assets/sass/_lists.scss @@ -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; diff --git a/resources/views/pages/list-item.blade.php b/resources/views/pages/list-item.blade.php index 891a5f7e2..37fe9e66a 100644 --- a/resources/views/pages/list-item.blade.php +++ b/resources/views/pages/list-item.blade.php @@ -2,6 +2,16 @@

{{ $page->name }}

+ + @if(isset($showMeta) && $showMeta) +
+ {{ $page->book->name }} + @if($page->chapter) + {{ $page->chapter->name }} + @endif +
+ @endif + @if(isset($page->searchSnippet))

{!! $page->searchSnippet !!}

@else diff --git a/resources/views/search/all.blade.php b/resources/views/search/all.blade.php index 122366610..688f61892 100644 --- a/resources/views/search/all.blade.php +++ b/resources/views/search/all.blade.php @@ -13,7 +13,7 @@
@if(count($pages) > 0) @foreach($pages as $page) - @include('pages/list-item', ['page' => $page]) + @include('pages/list-item', ['page' => $page, 'showMeta' => true])
@endforeach @else