2021-08-22 20:15:58 +08:00
|
|
|
@extends('layouts.tri')
|
2018-08-27 21:18:09 +08:00
|
|
|
|
2020-12-22 13:20:13 +08:00
|
|
|
@push('social-meta')
|
2021-06-24 03:42:48 +08:00
|
|
|
<meta property="og:description" content="{{ Str::limit($shelf->description, 100, '...') }}">
|
|
|
|
@if($shelf->cover)
|
|
|
|
<meta property="og:image" content="{{ $shelf->getBookCover() }}">
|
|
|
|
@endif
|
2020-12-22 13:20:13 +08:00
|
|
|
@endpush
|
|
|
|
|
2022-07-24 01:29:04 +08:00
|
|
|
@include('entities.body-tag-classes', ['entity' => $shelf])
|
|
|
|
|
2019-02-03 21:45:45 +08:00
|
|
|
@section('body')
|
|
|
|
|
2023-10-03 21:59:35 +08:00
|
|
|
<div class="mb-s print-hidden">
|
2021-08-22 20:15:58 +08:00
|
|
|
@include('entities.breadcrumbs', ['crumbs' => [
|
2019-03-30 23:15:01 +08:00
|
|
|
$shelf,
|
|
|
|
]])
|
|
|
|
</div>
|
|
|
|
|
2019-08-25 22:44:51 +08:00
|
|
|
<main class="card content-wrap">
|
2021-01-29 14:58:17 +08:00
|
|
|
|
2021-03-22 07:06:15 +08:00
|
|
|
<div class="flex-container-row wrap v-center">
|
|
|
|
<h1 class="flex fit-content break-text">{{ $shelf->name }}</h1>
|
|
|
|
<div class="flex"></div>
|
|
|
|
<div class="flex fit-content text-m-right my-m ml-m">
|
2022-10-30 23:16:06 +08:00
|
|
|
@include('common.sort', $listOptions->getSortControlData())
|
2021-01-29 14:58:17 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2019-02-03 21:45:45 +08:00
|
|
|
<div class="book-content">
|
2023-12-21 01:40:58 +08:00
|
|
|
<div class="text-muted break-text">{!! $shelf->descriptionHtml() !!}</div>
|
2021-01-31 11:25:31 +08:00
|
|
|
@if(count($sortedVisibleShelfBooks) > 0)
|
2019-10-30 18:23:42 +08:00
|
|
|
@if($view === 'list')
|
|
|
|
<div class="entity-list">
|
2021-01-31 11:25:31 +08:00
|
|
|
@foreach($sortedVisibleShelfBooks as $book)
|
2021-08-22 20:15:58 +08:00
|
|
|
@include('books.parts.list-item', ['book' => $book])
|
2019-10-30 18:23:42 +08:00
|
|
|
@endforeach
|
|
|
|
</div>
|
|
|
|
@else
|
|
|
|
<div class="grid third">
|
2021-03-22 07:06:15 +08:00
|
|
|
@foreach($sortedVisibleShelfBooks as $book)
|
2021-08-22 20:15:58 +08:00
|
|
|
@include('entities.grid-item', ['entity' => $book])
|
2019-10-30 18:23:42 +08:00
|
|
|
@endforeach
|
|
|
|
</div>
|
|
|
|
@endif
|
2019-02-03 21:45:45 +08:00
|
|
|
@else
|
2019-04-13 18:24:41 +08:00
|
|
|
<div class="mt-xl">
|
2019-02-03 21:45:45 +08:00
|
|
|
<hr>
|
2019-04-13 18:24:41 +08:00
|
|
|
<p class="text-muted italic mt-xl mb-m">{{ trans('entities.shelves_empty_contents') }}</p>
|
|
|
|
<div class="icon-list inline block">
|
2019-04-16 03:43:25 +08:00
|
|
|
@if(userCan('book-create-all') && userCan('bookshelf-update', $shelf))
|
|
|
|
<a href="{{ $shelf->getUrl('/create-book') }}" class="icon-list-item text-book">
|
2019-04-02 23:35:46 +08:00
|
|
|
<span class="icon">@icon('add')</span>
|
|
|
|
<span>{{ trans('entities.books_create') }}</span>
|
|
|
|
</a>
|
|
|
|
@endif
|
2019-04-13 18:24:41 +08:00
|
|
|
@if(userCan('bookshelf-update', $shelf))
|
|
|
|
<a href="{{ $shelf->getUrl('/edit') }}" class="icon-list-item text-bookshelf">
|
|
|
|
<span class="icon">@icon('edit')</span>
|
|
|
|
<span>{{ trans('entities.shelves_edit_and_assign') }}</span>
|
|
|
|
</a>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-08-27 21:18:09 +08:00
|
|
|
@endif
|
|
|
|
</div>
|
2019-08-25 22:44:51 +08:00
|
|
|
</main>
|
2019-02-03 21:45:45 +08:00
|
|
|
|
2018-08-27 21:18:09 +08:00
|
|
|
@stop
|
|
|
|
|
2019-02-03 21:45:45 +08:00
|
|
|
@section('left')
|
2018-08-27 21:18:09 +08:00
|
|
|
|
2018-09-17 02:34:09 +08:00
|
|
|
@if($shelf->tags->count() > 0)
|
2019-02-03 21:45:45 +08:00
|
|
|
<div id="tags" class="mb-xl">
|
2021-08-22 20:15:58 +08:00
|
|
|
@include('entities.tag-list', ['entity' => $shelf])
|
2019-02-03 21:45:45 +08:00
|
|
|
</div>
|
2018-08-27 21:18:09 +08:00
|
|
|
@endif
|
|
|
|
|
2019-02-03 21:45:45 +08:00
|
|
|
<div id="details" class="mb-xl">
|
|
|
|
<h5>{{ trans('common.details') }}</h5>
|
2022-05-14 01:03:43 +08:00
|
|
|
<div class="blended-links">
|
2023-08-17 21:59:28 +08:00
|
|
|
@include('entities.meta', ['entity' => $shelf, 'watchOptions' => null])
|
2022-10-10 23:22:51 +08:00
|
|
|
@if($shelf->hasPermissions())
|
2018-08-27 21:18:09 +08:00
|
|
|
<div class="active-restriction">
|
2018-09-17 02:34:09 +08:00
|
|
|
@if(userCan('restrictions-manage', $shelf))
|
2022-05-14 01:03:43 +08:00
|
|
|
<a href="{{ $shelf->getUrl('/permissions') }}" class="entity-meta-item">
|
|
|
|
@icon('lock')
|
|
|
|
<div>{{ trans('entities.shelves_permissions_active') }}</div>
|
|
|
|
</a>
|
2018-08-27 21:18:09 +08:00
|
|
|
@else
|
2022-05-14 01:03:43 +08:00
|
|
|
<div class="entity-meta-item">
|
|
|
|
@icon('lock')
|
|
|
|
<div>{{ trans('entities.shelves_permissions_active') }}</div>
|
|
|
|
</div>
|
2018-08-27 21:18:09 +08:00
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@if(count($activity) > 0)
|
2023-09-12 01:50:39 +08:00
|
|
|
<div id="recent-activity" class="mb-xl">
|
2019-02-03 21:45:45 +08:00
|
|
|
<h5>{{ trans('entities.recent_activity') }}</h5>
|
2021-08-22 20:15:58 +08:00
|
|
|
@include('common.activity-list', ['activity' => $activity])
|
2018-08-27 21:18:09 +08:00
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
@stop
|
|
|
|
|
2019-02-03 21:45:45 +08:00
|
|
|
@section('right')
|
|
|
|
<div class="actions mb-xl">
|
|
|
|
<h5>{{ trans('common.actions') }}</h5>
|
2023-01-29 00:06:11 +08:00
|
|
|
<div class="icon-list text-link">
|
2018-08-27 21:18:09 +08:00
|
|
|
|
2019-04-16 03:43:25 +08:00
|
|
|
@if(userCan('book-create-all') && userCan('bookshelf-update', $shelf))
|
2022-11-05 21:39:17 +08:00
|
|
|
<a href="{{ $shelf->getUrl('/create-book') }}" data-shortcut="new" class="icon-list-item">
|
2019-04-15 17:56:21 +08:00
|
|
|
<span class="icon">@icon('add')</span>
|
2019-04-16 03:43:25 +08:00
|
|
|
<span>{{ trans('entities.books_new_action') }}</span>
|
2019-04-15 17:56:21 +08:00
|
|
|
</a>
|
|
|
|
@endif
|
|
|
|
|
2022-11-10 03:30:08 +08:00
|
|
|
@include('entities.view-toggle', ['view' => $view, 'type' => 'bookshelf'])
|
2019-10-30 18:23:42 +08:00
|
|
|
|
2019-04-16 03:43:25 +08:00
|
|
|
<hr class="primary-background">
|
|
|
|
|
2019-02-03 21:45:45 +08:00
|
|
|
@if(userCan('bookshelf-update', $shelf))
|
2022-11-05 21:39:17 +08:00
|
|
|
<a href="{{ $shelf->getUrl('/edit') }}" data-shortcut="edit" class="icon-list-item">
|
2019-02-16 23:05:18 +08:00
|
|
|
<span>@icon('edit')</span>
|
2019-02-03 21:45:45 +08:00
|
|
|
<span>{{ trans('common.edit') }}</span>
|
|
|
|
</a>
|
2018-08-27 21:18:09 +08:00
|
|
|
@endif
|
|
|
|
|
2019-02-03 21:45:45 +08:00
|
|
|
@if(userCan('restrictions-manage', $shelf))
|
2022-11-05 21:39:17 +08:00
|
|
|
<a href="{{ $shelf->getUrl('/permissions') }}" data-shortcut="permissions" class="icon-list-item">
|
2019-02-16 23:05:18 +08:00
|
|
|
<span>@icon('lock')</span>
|
2019-02-03 21:45:45 +08:00
|
|
|
<span>{{ trans('entities.permissions') }}</span>
|
|
|
|
</a>
|
|
|
|
@endif
|
2018-08-27 21:18:09 +08:00
|
|
|
|
2019-02-03 21:45:45 +08:00
|
|
|
@if(userCan('bookshelf-delete', $shelf))
|
2022-11-05 21:39:17 +08:00
|
|
|
<a href="{{ $shelf->getUrl('/delete') }}" data-shortcut="delete" class="icon-list-item">
|
2019-02-16 23:05:18 +08:00
|
|
|
<span>@icon('delete')</span>
|
2019-02-03 21:45:45 +08:00
|
|
|
<span>{{ trans('common.delete') }}</span>
|
|
|
|
</a>
|
|
|
|
@endif
|
|
|
|
|
2023-09-16 20:18:35 +08:00
|
|
|
@if(!user()->isGuest())
|
2021-05-16 17:26:28 +08:00
|
|
|
<hr class="primary-background">
|
2021-08-22 20:15:58 +08:00
|
|
|
@include('entities.favourite-action', ['entity' => $shelf])
|
2021-05-16 17:26:28 +08:00
|
|
|
@endif
|
|
|
|
|
2019-02-03 21:45:45 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-08-27 21:18:09 +08:00
|
|
|
@stop
|
2019-02-03 21:45:45 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|