Added the book view toggle option on the homepage.
Signed-off-by: Abijeet <abijeetpatro@gmail.com>
This commit is contained in:
		
							parent
							
								
									47cb99a2d6
								
							
						
					
					
						commit
						8254c3be8d
					
				| 
						 | 
					@ -3,16 +3,7 @@
 | 
				
			||||||
@section('toolbar')
 | 
					@section('toolbar')
 | 
				
			||||||
    <div class="col-xs-6">
 | 
					    <div class="col-xs-6">
 | 
				
			||||||
        <div class="action-buttons text-left">
 | 
					        <div class="action-buttons text-left">
 | 
				
			||||||
            <form action="{{ baseUrl("/settings/users/{$currentUser->id}/switch-book-view") }}" method="POST" class="inline">
 | 
					            @include('partials/book-view-toggle', ['booksViewType' => $booksViewType])
 | 
				
			||||||
                {!! csrf_field() !!}
 | 
					 | 
				
			||||||
                {!! method_field('PATCH') !!}
 | 
					 | 
				
			||||||
                <input type="hidden" value="{{ $booksViewType === 'list'? 'grid' : 'list' }}" name="book_view_type">
 | 
					 | 
				
			||||||
                @if ($booksViewType === 'list')
 | 
					 | 
				
			||||||
                    <button type="submit" class="text-pos text-button">@icon('grid'){{ trans('common.grid_view') }}</button>
 | 
					 | 
				
			||||||
                @else
 | 
					 | 
				
			||||||
                    <button type="submit" class="text-pos text-button">@icon('list'){{ trans('common.list_view') }}</button>
 | 
					 | 
				
			||||||
                @endif
 | 
					 | 
				
			||||||
            </form>
 | 
					 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div class="col-xs-6 faded">
 | 
					    <div class="col-xs-6 faded">
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,6 +4,7 @@
 | 
				
			||||||
    <div class="col-sm-6 faded">
 | 
					    <div class="col-sm-6 faded">
 | 
				
			||||||
        <div class="action-buttons text-left">
 | 
					        <div class="action-buttons text-left">
 | 
				
			||||||
            <a expand-toggle=".entity-list.compact .entity-item-snippet" class="text-primary text-button">@icon('expand-text'){{ trans('common.toggle_details') }}</a>
 | 
					            <a expand-toggle=".entity-list.compact .entity-item-snippet" class="text-primary text-button">@icon('expand-text'){{ trans('common.toggle_details') }}</a>
 | 
				
			||||||
 | 
					            @include('partials/book-view-toggle', ['booksViewType' => $booksViewType])
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
@stop
 | 
					@stop
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,10 @@
 | 
				
			||||||
 | 
					<form action="{{ baseUrl("/settings/users/{$currentUser->id}/switch-book-view") }}" method="POST" class="inline">
 | 
				
			||||||
 | 
					    {!! csrf_field() !!}
 | 
				
			||||||
 | 
					    {!! method_field('PATCH') !!}
 | 
				
			||||||
 | 
					    <input type="hidden" value="{{ $booksViewType === 'list'? 'grid' : 'list' }}" name="book_view_type">
 | 
				
			||||||
 | 
					    @if ($booksViewType === 'list')
 | 
				
			||||||
 | 
					        <button type="submit" class="text-pos text-button">@icon('grid'){{ trans('common.grid_view') }}</button>
 | 
				
			||||||
 | 
					    @else
 | 
				
			||||||
 | 
					        <button type="submit" class="text-pos text-button">@icon('list'){{ trans('common.list_view') }}</button>
 | 
				
			||||||
 | 
					    @endif
 | 
				
			||||||
 | 
					</form>
 | 
				
			||||||
		Loading…
	
		Reference in New Issue