| 
									
										
										
										
											2019-02-03 21:45:45 +08:00
										 |  |  | @extends('tri-layout') | 
					
						
							| 
									
										
										
										
											2018-08-27 21:18:09 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-03 21:45:45 +08:00
										 |  |  | @section('body') | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-03-30 23:15:01 +08:00
										 |  |  |     <div class="mb-s"> | 
					
						
							|  |  |  |         @include('partials.breadcrumbs', ['crumbs' => [ | 
					
						
							|  |  |  |             $shelf, | 
					
						
							|  |  |  |         ]]) | 
					
						
							|  |  |  |     </div> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-25 22:44:51 +08:00
										 |  |  |     <main class="card content-wrap"> | 
					
						
							| 
									
										
										
										
											2019-02-03 21:45:45 +08:00
										 |  |  |         <h1 class="break-text">{{$shelf->name}}</h1> | 
					
						
							|  |  |  |         <div class="book-content"> | 
					
						
							|  |  |  |             <p class="text-muted">{!! nl2br(e($shelf->description)) !!}</p> | 
					
						
							| 
									
										
										
										
											2019-10-05 19:55:01 +08:00
										 |  |  |             @if(count($shelf->visibleBooks) > 0) | 
					
						
							| 
									
										
										
										
											2019-02-03 21:45:45 +08:00
										 |  |  |                 <div class="entity-list"> | 
					
						
							| 
									
										
										
										
											2019-10-05 19:55:01 +08:00
										 |  |  |                     @foreach($shelf->visibleBooks as $book) | 
					
						
							| 
									
										
										
										
											2019-04-07 19:00:09 +08:00
										 |  |  |                         @include('books.list-item', ['book' => $book]) | 
					
						
							| 
									
										
										
										
											2019-02-03 21:45:45 +08:00
										 |  |  |                     @endforeach | 
					
						
							| 
									
										
										
										
											2018-08-27 21:18:09 +08:00
										 |  |  |                 </div> | 
					
						
							| 
									
										
										
										
											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"> | 
					
						
							| 
									
										
										
										
											2018-09-17 02:34:09 +08:00
										 |  |  |             @include('components.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> | 
					
						
							|  |  |  |         <div class="text-small text-muted blended-links"> | 
					
						
							| 
									
										
										
										
											2018-09-17 02:34:09 +08:00
										 |  |  |             @include('partials.entity-meta', ['entity' => $shelf]) | 
					
						
							|  |  |  |             @if($shelf->restricted) | 
					
						
							| 
									
										
										
										
											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)) | 
					
						
							|  |  |  |                         <a href="{{ $shelf->getUrl('/permissions') }}">@icon('lock'){{ trans('entities.shelves_permissions_active') }}</a> | 
					
						
							| 
									
										
										
										
											2018-08-27 21:18:09 +08:00
										 |  |  |                     @else | 
					
						
							| 
									
										
										
										
											2018-09-17 02:34:09 +08:00
										 |  |  |                         @icon('lock'){{ trans('entities.shelves_permissions_active') }} | 
					
						
							| 
									
										
										
										
											2018-08-27 21:18:09 +08:00
										 |  |  |                     @endif | 
					
						
							|  |  |  |                 </div> | 
					
						
							|  |  |  |             @endif | 
					
						
							|  |  |  |         </div> | 
					
						
							|  |  |  |     </div> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     @if(count($activity) > 0) | 
					
						
							| 
									
										
										
										
											2019-02-03 21:45:45 +08:00
										 |  |  |         <div class="mb-xl"> | 
					
						
							|  |  |  |             <h5>{{ trans('entities.recent_activity') }}</h5> | 
					
						
							|  |  |  |             @include('partials.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> | 
					
						
							|  |  |  |         <div class="icon-list text-primary"> | 
					
						
							| 
									
										
										
										
											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)) | 
					
						
							| 
									
										
										
										
											2019-04-15 17:56:21 +08:00
										 |  |  |                 <a href="{{ $shelf->getUrl('/create-book') }}" class="icon-list-item"> | 
					
						
							|  |  |  |                     <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 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											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)) | 
					
						
							|  |  |  |                 <a href="{{ $shelf->getUrl('/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)) | 
					
						
							|  |  |  |                 <a href="{{ $shelf->getUrl('/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)) | 
					
						
							|  |  |  |                 <a href="{{ $shelf->getUrl('/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 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         </div> | 
					
						
							|  |  |  |     </div> | 
					
						
							| 
									
										
										
										
											2018-08-27 21:18:09 +08:00
										 |  |  | @stop | 
					
						
							| 
									
										
										
										
											2019-02-03 21:45:45 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 |