| 
									
										
										
										
											2021-08-22 20:15:58 +08:00
										 |  |  | @extends('layouts.simple') | 
					
						
							| 
									
										
										
										
											2015-09-01 03:11:44 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-03 21:45:45 +08:00
										 |  |  | @section('body') | 
					
						
							| 
									
										
										
										
											2020-06-27 20:29:00 +08:00
										 |  |  |     <div class="container mt-xl" id="search-system"> | 
					
						
							| 
									
										
										
										
											2015-09-01 03:11:44 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-03-30 22:27:00 +08:00
										 |  |  |         <div class="grid right-focus reverse-collapse gap-xl"> | 
					
						
							| 
									
										
										
										
											2019-02-03 21:45:45 +08:00
										 |  |  |             <div> | 
					
						
							|  |  |  |                 <div> | 
					
						
							| 
									
										
										
										
											2020-06-27 20:29:00 +08:00
										 |  |  |                     <h5>{{ trans('entities.search_advanced') }}</h5> | 
					
						
							| 
									
										
										
										
											2019-02-03 21:45:45 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-06-27 20:29:00 +08:00
										 |  |  |                     <form method="get" action="{{ url('/search') }}"> | 
					
						
							|  |  |  |                         <h6>{{ trans('entities.search_terms') }}</h6> | 
					
						
							|  |  |  |                         <input type="text" name="search" value="{{ implode(' ', $options->searches) }}"> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                         <h6>{{ trans('entities.search_content_type') }}</h6> | 
					
						
							| 
									
										
										
										
											2019-02-03 21:45:45 +08:00
										 |  |  |                         <div class="form-group"> | 
					
						
							| 
									
										
										
										
											2020-06-27 20:29:00 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |                             <?php | 
					
						
							|  |  |  |                             $types = explode('|', $options->filters['type'] ?? ''); | 
					
						
							|  |  |  |                             $hasTypes = $types[0] !== ''; | 
					
						
							|  |  |  |                             ?>
 | 
					
						
							| 
									
										
										
										
											2021-08-22 20:15:58 +08:00
										 |  |  |                             @include('search.parts.type-filter', ['checked' => !$hasTypes || in_array('page', $types), 'entity' => 'page', 'transKey' => 'page']) | 
					
						
							|  |  |  |                             @include('search.parts.type-filter', ['checked' => !$hasTypes || in_array('chapter', $types), 'entity' => 'chapter', 'transKey' => 'chapter']) | 
					
						
							| 
									
										
										
										
											2019-02-03 21:45:45 +08:00
										 |  |  |                             <br> | 
					
						
							| 
									
										
										
										
											2021-08-22 20:15:58 +08:00
										 |  |  |                                 @include('search.parts.type-filter', ['checked' => !$hasTypes || in_array('book', $types), 'entity' => 'book', 'transKey' => 'book']) | 
					
						
							|  |  |  |                                 @include('search.parts.type-filter', ['checked' => !$hasTypes || in_array('bookshelf', $types), 'entity' => 'bookshelf', 'transKey' => 'shelf']) | 
					
						
							| 
									
										
										
										
											2019-02-03 21:45:45 +08:00
										 |  |  |                         </div> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-06-27 20:29:00 +08:00
										 |  |  |                         <h6>{{ trans('entities.search_exact_matches') }}</h6> | 
					
						
							| 
									
										
										
										
											2021-08-22 20:15:58 +08:00
										 |  |  |                         @include('search.parts.term-list', ['type' => 'exact', 'currentList' => $options->exacts]) | 
					
						
							| 
									
										
										
										
											2020-06-27 20:29:00 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |                         <h6>{{ trans('entities.search_tags') }}</h6> | 
					
						
							| 
									
										
										
										
											2021-08-22 20:15:58 +08:00
										 |  |  |                         @include('search.parts.term-list', ['type' => 'tags', 'currentList' => $options->tags]) | 
					
						
							| 
									
										
										
										
											2019-02-03 21:45:45 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-09-16 20:18:35 +08:00
										 |  |  |                         @if(!user()->isGuest()) | 
					
						
							| 
									
										
										
										
											2020-06-27 20:29:00 +08:00
										 |  |  |                             <h6>{{ trans('entities.search_options') }}</h6> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-08-22 20:15:58 +08:00
										 |  |  |                             @component('search.parts.boolean-filter', ['filters' => $options->filters, 'name' => 'viewed_by_me', 'value' => null]) | 
					
						
							| 
									
										
										
										
											2019-02-03 21:45:45 +08:00
										 |  |  |                                 {{ trans('entities.search_viewed_by_me') }} | 
					
						
							| 
									
										
										
										
											2020-06-27 20:29:00 +08:00
										 |  |  |                             @endcomponent | 
					
						
							| 
									
										
										
										
											2021-08-22 20:15:58 +08:00
										 |  |  |                             @component('search.parts.boolean-filter', ['filters' => $options->filters, 'name' => 'not_viewed_by_me', 'value' => null]) | 
					
						
							| 
									
										
										
										
											2019-02-03 21:45:45 +08:00
										 |  |  |                                 {{ trans('entities.search_not_viewed_by_me') }} | 
					
						
							| 
									
										
										
										
											2020-06-27 20:29:00 +08:00
										 |  |  |                             @endcomponent | 
					
						
							| 
									
										
										
										
											2021-08-22 20:15:58 +08:00
										 |  |  |                             @component('search.parts.boolean-filter', ['filters' => $options->filters, 'name' => 'is_restricted', 'value' => null]) | 
					
						
							| 
									
										
										
										
											2019-02-03 21:45:45 +08:00
										 |  |  |                                 {{ trans('entities.search_permissions_set') }} | 
					
						
							| 
									
										
										
										
											2020-06-27 20:29:00 +08:00
										 |  |  |                             @endcomponent | 
					
						
							| 
									
										
										
										
											2021-08-22 20:15:58 +08:00
										 |  |  |                             @component('search.parts.boolean-filter', ['filters' => $options->filters, 'name' => 'created_by', 'value' => 'me']) | 
					
						
							| 
									
										
										
										
											2019-02-03 21:45:45 +08:00
										 |  |  |                                 {{ trans('entities.search_created_by_me') }} | 
					
						
							| 
									
										
										
										
											2020-06-27 20:29:00 +08:00
										 |  |  |                             @endcomponent | 
					
						
							| 
									
										
										
										
											2021-08-22 20:15:58 +08:00
										 |  |  |                             @component('search.parts.boolean-filter', ['filters' => $options->filters, 'name' => 'updated_by', 'value' => 'me']) | 
					
						
							| 
									
										
										
										
											2019-02-03 21:45:45 +08:00
										 |  |  |                                 {{ trans('entities.search_updated_by_me') }} | 
					
						
							| 
									
										
										
										
											2020-06-27 20:29:00 +08:00
										 |  |  |                             @endcomponent | 
					
						
							| 
									
										
										
										
											2021-08-22 20:15:58 +08:00
										 |  |  |                             @component('search.parts.boolean-filter', ['filters' => $options->filters, 'name' => 'owned_by', 'value' => 'me']) | 
					
						
							| 
									
										
										
										
											2021-02-14 18:40:38 +08:00
										 |  |  |                                 {{ trans('entities.search_owned_by_me') }} | 
					
						
							|  |  |  |                             @endcomponent | 
					
						
							| 
									
										
										
										
											2019-02-03 21:45:45 +08:00
										 |  |  |                         @endif | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-06-27 20:29:00 +08:00
										 |  |  |                         <h6>{{ trans('entities.search_date_options') }}</h6> | 
					
						
							| 
									
										
										
										
											2021-08-22 20:15:58 +08:00
										 |  |  |                         @include('search.parts.date-filter', ['name' => 'updated_after', 'filters' => $options->filters]) | 
					
						
							|  |  |  |                         @include('search.parts.date-filter', ['name' => 'updated_before', 'filters' => $options->filters]) | 
					
						
							|  |  |  |                         @include('search.parts.date-filter', ['name' => 'created_after', 'filters' => $options->filters]) | 
					
						
							|  |  |  |                         @include('search.parts.date-filter', ['name' => 'created_before', 'filters' => $options->filters]) | 
					
						
							| 
									
										
										
										
											2019-02-03 21:45:45 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-07 01:25:47 +08:00
										 |  |  |                         @if(isset($options->filters['created_by']) && $options->filters['created_by'] !== "me") | 
					
						
							| 
									
										
										
										
											2021-11-14 23:07:13 +08:00
										 |  |  |                             <input type="hidden" name="filters[created_by]" value="{{ $options->filters['created_by'] }}"> | 
					
						
							|  |  |  |                         @endif | 
					
						
							| 
									
										
										
										
											2022-10-07 01:25:47 +08:00
										 |  |  |                         @if(isset($options->filters['updated_by']) && $options->filters['updated_by'] !== "me") | 
					
						
							| 
									
										
										
										
											2021-11-14 23:07:13 +08:00
										 |  |  |                             <input type="hidden" name="filters[updated_by]" value="{{ $options->filters['updated_by'] }}"> | 
					
						
							|  |  |  |                         @endif | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-25 19:40:04 +08:00
										 |  |  |                         <button type="submit" class="button">{{ trans('entities.search_update') }}</button> | 
					
						
							| 
									
										
										
										
											2019-02-03 21:45:45 +08:00
										 |  |  |                     </form> | 
					
						
							| 
									
										
										
										
											2017-04-10 03:59:57 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-03 21:45:45 +08:00
										 |  |  |                 </div> | 
					
						
							|  |  |  |             </div> | 
					
						
							|  |  |  |             <div> | 
					
						
							| 
									
										
										
										
											2020-06-27 20:29:00 +08:00
										 |  |  |                 <div class="card content-wrap"> | 
					
						
							| 
									
										
										
										
											2019-02-03 21:45:45 +08:00
										 |  |  |                     <h1 class="list-heading">{{ trans('entities.search_results') }}</h1> | 
					
						
							| 
									
										
										
										
											2020-06-27 20:29:00 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-04 21:26:39 +08:00
										 |  |  |                     <form action="{{ url('/search') }}" method="GET"  class="search-box flexible hide-over-l"> | 
					
						
							| 
									
										
										
										
											2019-05-19 22:06:52 +08:00
										 |  |  |                         <input value="{{$searchTerm}}" type="text" name="term" placeholder="{{ trans('common.search') }}"> | 
					
						
							| 
									
										
										
										
											2024-09-27 23:01:01 +08:00
										 |  |  |                         <button type="submit" | 
					
						
							|  |  |  |                                 aria-label="{{ trans('common.search') }}" | 
					
						
							|  |  |  |                                 tabindex="-1">@icon('search')</button> | 
					
						
							| 
									
										
										
										
											2019-05-19 22:06:52 +08:00
										 |  |  |                     </form> | 
					
						
							| 
									
										
										
										
											2020-06-27 20:29:00 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-03 21:45:45 +08:00
										 |  |  |                     <h6 class="text-muted">{{ trans_choice('entities.search_total_results_found', $totalResults, ['count' => $totalResults]) }}</h6> | 
					
						
							|  |  |  |                     <div class="book-contents"> | 
					
						
							| 
									
										
										
										
											2021-08-22 20:15:58 +08:00
										 |  |  |                         @include('entities.list', ['entities' => $entities, 'showPath' => true, 'showTags' => true]) | 
					
						
							| 
									
										
										
										
											2019-02-03 21:45:45 +08:00
										 |  |  |                     </div> | 
					
						
							| 
									
										
										
										
											2020-06-27 20:29:00 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-02-03 21:45:45 +08:00
										 |  |  |                     @if($hasNextPage) | 
					
						
							|  |  |  |                         <div class="text-right mt-m"> | 
					
						
							|  |  |  |                             <a href="{{ $nextPageLink }}" class="button outline">{{ trans('entities.search_more') }}</a> | 
					
						
							|  |  |  |                         </div> | 
					
						
							|  |  |  |                     @endif | 
					
						
							|  |  |  |                 </div> | 
					
						
							|  |  |  |             </div> | 
					
						
							|  |  |  |         </div> | 
					
						
							| 
									
										
										
										
											2017-08-27 00:17:04 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  |     </div> | 
					
						
							| 
									
										
										
										
											2018-02-03 22:45:36 +08:00
										 |  |  | @stop |