1 @extends('layouts.tri')
4 <meta property="og:description" content="{{ Str::limit($shelf->description, 100, '...') }}">
6 <meta property="og:image" content="{{ $shelf->getBookCover() }}">
10 @include('entities.body-tag-classes', ['entity' => $shelf])
15 @include('entities.breadcrumbs', ['crumbs' => [
20 <main class="card content-wrap">
22 <div class="flex-container-row wrap v-center">
23 <h1 class="flex fit-content break-text">{{ $shelf->name }}</h1>
24 <div class="flex"></div>
25 <div class="flex fit-content text-m-right my-m ml-m">
26 @include('common.sort', ['options' => [
27 'default' => trans('common.sort_default'),
28 'name' => trans('common.sort_name'),
29 'created_at' => trans('common.sort_created_at'),
30 'updated_at' => trans('common.sort_updated_at'),
31 ], 'order' => $order, 'sort' => $sort, 'type' => 'shelf_books'])
35 <div class="book-content">
36 <p class="text-muted">{!! nl2br(e($shelf->description)) !!}</p>
37 @if(count($sortedVisibleShelfBooks) > 0)
39 <div class="entity-list">
40 @foreach($sortedVisibleShelfBooks as $book)
41 @include('books.parts.list-item', ['book' => $book])
45 <div class="grid third">
46 @foreach($sortedVisibleShelfBooks as $book)
47 @include('entities.grid-item', ['entity' => $book])
54 <p class="text-muted italic mt-xl mb-m">{{ trans('entities.shelves_empty_contents') }}</p>
55 <div class="icon-list inline block">
56 @if(userCan('book-create-all') && userCan('bookshelf-update', $shelf))
57 <a href="{{ $shelf->getUrl('/create-book') }}" class="icon-list-item text-book">
58 <span class="icon">@icon('add')</span>
59 <span>{{ trans('entities.books_create') }}</span>
62 @if(userCan('bookshelf-update', $shelf))
63 <a href="{{ $shelf->getUrl('/edit') }}" class="icon-list-item text-bookshelf">
64 <span class="icon">@icon('edit')</span>
65 <span>{{ trans('entities.shelves_edit_and_assign') }}</span>
78 @if($shelf->tags->count() > 0)
79 <div id="tags" class="mb-xl">
80 @include('entities.tag-list', ['entity' => $shelf])
84 <div id="details" class="mb-xl">
85 <h5>{{ trans('common.details') }}</h5>
86 <div class="blended-links">
87 @include('entities.meta', ['entity' => $shelf])
88 @if($shelf->hasPermissions())
89 <div class="active-restriction">
90 @if(userCan('restrictions-manage', $shelf))
91 <a href="{{ $shelf->getUrl('/permissions') }}" class="entity-meta-item">
93 <div>{{ trans('entities.shelves_permissions_active') }}</div>
96 <div class="entity-meta-item">
98 <div>{{ trans('entities.shelves_permissions_active') }}</div>
106 @if(count($activity) > 0)
108 <h5>{{ trans('entities.recent_activity') }}</h5>
109 @include('common.activity-list', ['activity' => $activity])
115 <div class="actions mb-xl">
116 <h5>{{ trans('common.actions') }}</h5>
117 <div class="icon-list text-primary">
119 @if(userCan('book-create-all') && userCan('bookshelf-update', $shelf))
120 <a href="{{ $shelf->getUrl('/create-book') }}" class="icon-list-item">
121 <span class="icon">@icon('add')</span>
122 <span>{{ trans('entities.books_new_action') }}</span>
126 @include('entities.view-toggle', ['view' => $view, 'type' => 'shelf'])
128 <hr class="primary-background">
130 @if(userCan('bookshelf-update', $shelf))
131 <a href="{{ $shelf->getUrl('/edit') }}" class="icon-list-item">
132 <span>@icon('edit')</span>
133 <span>{{ trans('common.edit') }}</span>
137 @if(userCan('restrictions-manage', $shelf))
138 <a href="{{ $shelf->getUrl('/permissions') }}" class="icon-list-item">
139 <span>@icon('lock')</span>
140 <span>{{ trans('entities.permissions') }}</span>
144 @if(userCan('bookshelf-delete', $shelf))
145 <a href="{{ $shelf->getUrl('/delete') }}" class="icon-list-item">
146 <span>@icon('delete')</span>
147 <span>{{ trans('common.delete') }}</span>
152 <hr class="primary-background">
153 @include('entities.favourite-action', ['entity' => $shelf])