| 
									
										
										
										
											2018-08-27 21:18:09 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-02 19:41:41 +08:00
										 |  |  | <div class="container{{ $view === 'list' ? ' small' : '' }}"> | 
					
						
							|  |  |  |     {{--TODO - Align with books page, Have sorting operations--}} | 
					
						
							|  |  |  |     {{--TODO - Create unique list item--}} | 
					
						
							| 
									
										
										
										
											2018-08-27 21:18:09 +08:00
										 |  |  |     <h1>{{ trans('entities.shelves') }}</h1> | 
					
						
							|  |  |  |     @if(count($shelves) > 0) | 
					
						
							| 
									
										
										
										
											2019-02-02 19:41:41 +08:00
										 |  |  |         @if($view === 'grid') | 
					
						
							| 
									
										
										
										
											2018-08-27 21:18:09 +08:00
										 |  |  |             <div class="grid third"> | 
					
						
							|  |  |  |                 @foreach($shelves as $key => $shelf) | 
					
						
							|  |  |  |                     @include('shelves/grid-item', ['bookshelf' => $shelf]) | 
					
						
							|  |  |  |                 @endforeach | 
					
						
							|  |  |  |             </div> | 
					
						
							|  |  |  |         @else | 
					
						
							|  |  |  |             @foreach($shelves as $shelf) | 
					
						
							|  |  |  |                 @include('shelves/list-item', ['bookshelf' => $shelf]) | 
					
						
							|  |  |  |                 <hr> | 
					
						
							|  |  |  |             @endforeach | 
					
						
							|  |  |  |         @endif | 
					
						
							|  |  |  |         <div> | 
					
						
							|  |  |  |             {!! $shelves->render() !!} | 
					
						
							|  |  |  |         </div> | 
					
						
							|  |  |  |     @else | 
					
						
							|  |  |  |         <p class="text-muted">{{ trans('entities.shelves_empty') }}</p> | 
					
						
							|  |  |  |         @if(userCan('bookshelf-create-all')) | 
					
						
							|  |  |  |             <a href="{{ baseUrl("/create-shelf") }}" class="button outline">@icon('edit'){{ trans('entities.create_now') }}</a> | 
					
						
							|  |  |  |         @endif | 
					
						
							|  |  |  |     @endif | 
					
						
							|  |  |  | </div> |