]> BookStack Code Mirror - bookstack/blob - resources/views/entities/list-item.blade.php
Updated attachment links to have dropdown for open type
[bookstack] / resources / views / entities / list-item.blade.php
1 @component('entities.list-item-basic', ['entity' => $entity])
2
3 <div class="entity-item-snippet">
4
5     @if($showPath ?? false)
6         @if($entity->relationLoaded('book') && $entity->book)
7             <span class="text-book">{{ $entity->book->getShortName(42) }}</span>
8             @if($entity->relationLoaded('chapter') && $entity->chapter)
9                 <span class="text-muted entity-list-item-path-sep">@icon('chevron-right')</span> <span class="text-chapter">{{ $entity->chapter->getShortName(42) }}</span>
10             @endif
11         @endif
12     @endif
13
14     <p class="text-muted break-text">{{ $entity->preview_content ?? $entity->getExcerpt() }}</p>
15 </div>
16
17 @if(($showTags ?? false) && $entity->tags->count() > 0)
18     <div class="entity-item-tags mt-xs">
19         @include('entities.tag-list', ['entity' => $entity, 'linked' => false ])
20     </div>
21 @endif
22
23 @if(($showUpdatedBy ?? false) && $entity->relationLoaded('updatedBy') && $entity->updatedBy)
24     <small title="{{ $entity->updated_at->toDayDateTimeString() }}">
25         {!! trans('entities.meta_updated_name', [
26             'timeLength' => $entity->updated_at->diffForHumans(),
27             'user' => e($entity->updatedBy->name)
28         ]) !!}
29     </small>
30 @endif
31
32 @endcomponent