1 @extends('simple-layout')
4 <input type="hidden" name="searchTerm" value="{{$searchTerm}}">
6 <div class="container" id="search-system">
12 <div class="grid right-focus reverse-collapse gap-xl">
15 <h5>{{ trans('entities.search_filters') }}</h5>
17 <form v-on:submit="updateSearch" v-cloak class="v-cloak anim fadeIn">
18 <h6 class="text-muted">{{ trans('entities.search_content_type') }}</h6>
19 <div class="form-group">
20 <label class="inline checkbox text-page"><input type="checkbox" v-on:change="typeChange" v-model="search.type.page" value="page">{{ trans('entities.page') }}</label>
21 <label class="inline checkbox text-chapter"><input type="checkbox" v-on:change="typeChange" v-model="search.type.chapter" value="chapter">{{ trans('entities.chapter') }}</label>
23 <label class="inline checkbox text-book"><input type="checkbox" v-on:change="typeChange" v-model="search.type.book" value="book">{{ trans('entities.book') }}</label>
24 <label class="inline checkbox text-bookshelf"><input type="checkbox" v-on:change="typeChange" v-model="search.type.bookshelf" value="bookshelf">{{ trans('entities.shelf') }}</label>
27 <h6 class="text-muted">{{ trans('entities.search_exact_matches') }}</h6>
28 <table cellpadding="0" cellspacing="0" border="0" class="no-style">
29 <tr v-for="(term, i) in search.exactTerms">
30 <td style="padding: 0 12px 6px 0;">
31 <input class="exact-input outline" v-on:input="exactChange" type="text" v-model="search.exactTerms[i]"></td>
33 <button type="button" class="text-neg text-button" v-on:click="removeExact(i)">
40 <button type="button" class="text-button" v-on:click="addExact">
41 @icon('add-circle'){{ trans('common.add') }}
47 <h6 class="text-muted">{{ trans('entities.search_tags') }}</h6>
48 <table cellpadding="0" cellspacing="0" border="0" class="no-style">
49 <tr v-for="(term, i) in search.tagTerms">
50 <td style="padding: 0 12px 6px 0;">
51 <input class="tag-input outline" v-on:input="tagChange" type="text" v-model="search.tagTerms[i]"></td>
53 <button type="button" class="text-neg text-button" v-on:click="removeTag(i)">
60 <button type="button" class="text-button" v-on:click="addTag">
61 @icon('add-circle'){{ trans('common.add') }}
68 <h6 class="text-muted">{{ trans('entities.search_options') }}</h6>
69 <label class="checkbox">
70 <input type="checkbox" v-on:change="optionChange('viewed_by_me')"
71 v-model="search.option.viewed_by_me" value="page">
72 {{ trans('entities.search_viewed_by_me') }}
74 <label class="checkbox">
75 <input type="checkbox" v-on:change="optionChange('not_viewed_by_me')"
76 v-model="search.option.not_viewed_by_me" value="page">
77 {{ trans('entities.search_not_viewed_by_me') }}
79 <label class="checkbox">
80 <input type="checkbox" v-on:change="optionChange('is_restricted')"
81 v-model="search.option.is_restricted" value="page">
82 {{ trans('entities.search_permissions_set') }}
84 <label class="checkbox">
85 <input type="checkbox" v-on:change="optionChange('created_by:me')"
86 v-model="search.option['created_by:me']" value="page">
87 {{ trans('entities.search_created_by_me') }}
89 <label class="checkbox">
90 <input type="checkbox" v-on:change="optionChange('updated_by:me')"
91 v-model="search.option['updated_by:me']" value="page">
92 {{ trans('entities.search_updated_by_me') }}
96 <h6 class="text-muted">{{ trans('entities.search_date_options') }}</h6>
97 <table cellpadding="0" cellspacing="0" border="0" class="no-style form-table">
99 <td width="200">{{ trans('entities.search_updated_after') }}</td>
101 <button type="button" class="text-button" v-if="!search.dates.updated_after"
102 v-on:click="enableDate('updated_after')">{{ trans('entities.search_set_date') }}</button>
106 <tr v-if="search.dates.updated_after">
108 <input v-if="search.dates.updated_after" class="tag-input"
109 v-on:input="dateChange('updated_after')" type="date" v-model="search.dates.updated_after"
110 pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}">
113 <button v-if="search.dates.updated_after" type="button" class="text-neg text-button"
114 v-on:click="dateRemove('updated_after')">
120 <td>{{ trans('entities.search_updated_before') }}</td>
122 <button type="button" class="text-button" v-if="!search.dates.updated_before"
123 v-on:click="enableDate('updated_before')">{{ trans('entities.search_set_date') }}</button>
127 <tr v-if="search.dates.updated_before">
129 <input v-if="search.dates.updated_before" class="tag-input"
130 v-on:input="dateChange('updated_before')" type="date" v-model="search.dates.updated_before"
131 pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}">
134 <button v-if="search.dates.updated_before" type="button" class="text-neg text-button"
135 v-on:click="dateRemove('updated_before')">
141 <td>{{ trans('entities.search_created_after') }}</td>
143 <button type="button" class="text-button" v-if="!search.dates.created_after"
144 v-on:click="enableDate('created_after')">{{ trans('entities.search_set_date') }}</button>
148 <tr v-if="search.dates.created_after">
150 <input v-if="search.dates.created_after" class="tag-input"
151 v-on:input="dateChange('created_after')" type="date" v-model="search.dates.created_after"
152 pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}">
155 <button v-if="search.dates.created_after" type="button" class="text-neg text-button"
156 v-on:click="dateRemove('created_after')">
162 <td>{{ trans('entities.search_created_before') }}</td>
164 <button type="button" class="text-button" v-if="!search.dates.created_before"
165 v-on:click="enableDate('created_before')">{{ trans('entities.search_set_date') }}</button>
169 <tr v-if="search.dates.created_before">
171 <input v-if="search.dates.created_before" class="tag-input"
172 v-on:input="dateChange('created_before')" type="date" v-model="search.dates.created_before"
173 pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}">
176 <button v-if="search.dates.created_before" type="button" class="text-neg text-button"
177 v-on:click="dateRemove('created_before')">
185 <button type="submit" class="button">{{ trans('entities.search_update') }}</button>
191 <div v-pre class="card content-wrap">
192 <h1 class="list-heading">{{ trans('entities.search_results') }}</h1>
193 <form action="{{ url('/search') }}" method="GET" class="search-box flexible hide-over-l">
194 <input value="{{$searchTerm}}" type="text" name="term" placeholder="{{ trans('common.search') }}">
195 <button type="submit">@icon('search')</button>
196 <button v-if="searching" v-cloak class="search-box-cancel text-neg" v-on:click="clearSearch" type="button">@icon('close')</button>
198 <h6 class="text-muted">{{ trans_choice('entities.search_total_results_found', $totalResults, ['count' => $totalResults]) }}</h6>
199 <div class="book-contents">
200 @include('partials.entity-list', ['entities' => $entities, 'showPath' => true])
203 <div class="text-right mt-m">
204 <a href="{{ $nextPageLink }}" class="button outline">{{ trans('entities.search_more') }}</a>