2021-08-22 08:15:58 -04:00
|
|
|
@extends('layouts.simple')
|
2015-08-31 15:11:44 -04:00
|
|
|
|
2019-02-03 08:45:45 -05:00
|
|
|
@section('body')
|
2020-06-27 08:29:00 -04:00
|
|
|
<div class="container mt-xl" id="search-system">
|
2015-08-31 15:11:44 -04:00
|
|
|
|
2019-03-30 10:27:00 -04:00
|
|
|
<div class="grid right-focus reverse-collapse gap-xl">
|
2019-02-03 08:45:45 -05:00
|
|
|
<div>
|
|
|
|
<div>
|
2020-06-27 08:29:00 -04:00
|
|
|
<h5>{{ trans('entities.search_advanced') }}</h5>
|
2019-02-03 08:45:45 -05:00
|
|
|
|
2020-06-27 08:29:00 -04: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 08:45:45 -05:00
|
|
|
<div class="form-group">
|
2020-06-27 08:29:00 -04:00
|
|
|
|
|
|
|
<?php
|
|
|
|
$types = explode('|', $options->filters['type'] ?? '');
|
|
|
|
$hasTypes = $types[0] !== '';
|
|
|
|
?>
|
2021-08-22 08:15:58 -04: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 08:45:45 -05:00
|
|
|
<br>
|
2021-08-22 08:15:58 -04: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 08:45:45 -05:00
|
|
|
</div>
|
|
|
|
|
2020-06-27 08:29:00 -04:00
|
|
|
<h6>{{ trans('entities.search_exact_matches') }}</h6>
|
2021-08-22 08:15:58 -04:00
|
|
|
@include('search.parts.term-list', ['type' => 'exact', 'currentList' => $options->exacts])
|
2020-06-27 08:29:00 -04:00
|
|
|
|
|
|
|
<h6>{{ trans('entities.search_tags') }}</h6>
|
2021-08-22 08:15:58 -04:00
|
|
|
@include('search.parts.term-list', ['type' => 'tags', 'currentList' => $options->tags])
|
2019-02-03 08:45:45 -05:00
|
|
|
|
|
|
|
@if(signedInUser())
|
2020-06-27 08:29:00 -04:00
|
|
|
<h6>{{ trans('entities.search_options') }}</h6>
|
|
|
|
|
2021-08-22 08:15:58 -04:00
|
|
|
@component('search.parts.boolean-filter', ['filters' => $options->filters, 'name' => 'viewed_by_me', 'value' => null])
|
2019-02-03 08:45:45 -05:00
|
|
|
{{ trans('entities.search_viewed_by_me') }}
|
2020-06-27 08:29:00 -04:00
|
|
|
@endcomponent
|
2021-08-22 08:15:58 -04:00
|
|
|
@component('search.parts.boolean-filter', ['filters' => $options->filters, 'name' => 'not_viewed_by_me', 'value' => null])
|
2019-02-03 08:45:45 -05:00
|
|
|
{{ trans('entities.search_not_viewed_by_me') }}
|
2020-06-27 08:29:00 -04:00
|
|
|
@endcomponent
|
2021-08-22 08:15:58 -04:00
|
|
|
@component('search.parts.boolean-filter', ['filters' => $options->filters, 'name' => 'is_restricted', 'value' => null])
|
2019-02-03 08:45:45 -05:00
|
|
|
{{ trans('entities.search_permissions_set') }}
|
2020-06-27 08:29:00 -04:00
|
|
|
@endcomponent
|
2021-08-22 08:15:58 -04:00
|
|
|
@component('search.parts.boolean-filter', ['filters' => $options->filters, 'name' => 'created_by', 'value' => 'me'])
|
2019-02-03 08:45:45 -05:00
|
|
|
{{ trans('entities.search_created_by_me') }}
|
2020-06-27 08:29:00 -04:00
|
|
|
@endcomponent
|
2021-08-22 08:15:58 -04:00
|
|
|
@component('search.parts.boolean-filter', ['filters' => $options->filters, 'name' => 'updated_by', 'value' => 'me'])
|
2019-02-03 08:45:45 -05:00
|
|
|
{{ trans('entities.search_updated_by_me') }}
|
2020-06-27 08:29:00 -04:00
|
|
|
@endcomponent
|
2021-08-22 08:15:58 -04:00
|
|
|
@component('search.parts.boolean-filter', ['filters' => $options->filters, 'name' => 'owned_by', 'value' => 'me'])
|
2021-02-14 05:40:38 -05:00
|
|
|
{{ trans('entities.search_owned_by_me') }}
|
|
|
|
@endcomponent
|
2019-02-03 08:45:45 -05:00
|
|
|
@endif
|
|
|
|
|
2020-06-27 08:29:00 -04:00
|
|
|
<h6>{{ trans('entities.search_date_options') }}</h6>
|
2021-08-22 08:15:58 -04: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 08:45:45 -05:00
|
|
|
|
2019-08-25 07:40:04 -04:00
|
|
|
<button type="submit" class="button">{{ trans('entities.search_update') }}</button>
|
2019-02-03 08:45:45 -05:00
|
|
|
</form>
|
2017-04-09 15:59:57 -04:00
|
|
|
|
2019-02-03 08:45:45 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div>
|
2020-06-27 08:29:00 -04:00
|
|
|
<div class="card content-wrap">
|
2019-02-03 08:45:45 -05:00
|
|
|
<h1 class="list-heading">{{ trans('entities.search_results') }}</h1>
|
2020-06-27 08:29:00 -04:00
|
|
|
|
2019-08-04 09:26:39 -04:00
|
|
|
<form action="{{ url('/search') }}" method="GET" class="search-box flexible hide-over-l">
|
2019-05-19 10:06:52 -04:00
|
|
|
<input value="{{$searchTerm}}" type="text" name="term" placeholder="{{ trans('common.search') }}">
|
|
|
|
<button type="submit">@icon('search')</button>
|
|
|
|
</form>
|
2020-06-27 08:29:00 -04:00
|
|
|
|
2019-02-03 08:45:45 -05:00
|
|
|
<h6 class="text-muted">{{ trans_choice('entities.search_total_results_found', $totalResults, ['count' => $totalResults]) }}</h6>
|
|
|
|
<div class="book-contents">
|
2021-08-22 08:15:58 -04:00
|
|
|
@include('entities.list', ['entities' => $entities, 'showPath' => true, 'showTags' => true])
|
2019-02-03 08:45:45 -05:00
|
|
|
</div>
|
2020-06-27 08:29:00 -04:00
|
|
|
|
2019-02-03 08:45:45 -05: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-26 12:17:04 -04:00
|
|
|
|
|
|
|
</div>
|
2018-02-03 09:45:36 -05:00
|
|
|
@stop
|